我正尝试在Android Emulator中播放m3u8文件。http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
它无法播放视频,但可以听到音频。
我得到了下面的错误E/OMXNodeInstance( 39): OMX_GetExtensionIndex failed。
我跟踪了这些调用,发现视频解码器没有正确实例化,
我发现OMXNodeInstance::enableGraphicBuffers正在被调用,
OMX_ERRORTYPE err = OMX_GetExtensionIndex(...,const_cast<OMX_STRING>("OMX.google.android.index.enableAndroidNativeBuffers"),...);
然后调用OMX_ERRORTYPE SoftOMXComponent::getExtensionIndex,
但是这个函数还没有实现。
它只返回UndefinedError (下面的代码)
OMX_ERRORTYPE SoftOMXComponent::getExtensionIndex(const char *name, OMX_INDEXTYPE *index)
{
return OMX_ErrorUndefined;
}有没有人能帮我解决这个GetExtentionIndex故障。下面的日志
/ChromiumHTTPDataSource( 39): connect to http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 @0
V/NuPlayer( 39): scanning sources haveAudio=0, haveVideo=0
V/NuPlayer( 39): in instantiateDecoder at 693 audio = 0
V/NuPlayer( 39): in instantiateDecoder at 693 audio = 1
I/ESQueue ( 39): found AAC codec config (22050 Hz, 1 channels)
I/avc_utils( 39): found AVC codec config (192 x 144, Baseline-profile level 1.1)
V/MediaPlayer( 583): in getCurrentPosition at : 425
V/MediaPlayerService( 39): getCurrentPosition
V/MediaPlayerService( 39): [1] getCurrentPosition = 0
V/NuPlayer( 39): scanning sources haveAudio=0, haveVideo=0
V/NuPlayer( 39): in instantiateDecoder at 701 mime = video/avc
V/ACodec ( 39): Now uninitialized
V/ACodec ( 39): Now uninitialized
V/ACodec ( 39): onAllocateComponent
I/MediaPlayerService( 39): MediaPlayerService::getOMX()
V/SoftOMXPlugin( 39): makeComponentInstance 'OMX.google.h264.decoder'
V/SoftOMXPlugin( 39): makeComponentInstance at 106
V/ACodec ( 39): onAllocateComponent
I/MediaPlayerService( 39): MediaPlayerService::getOMX()
V/SoftOMXPlugin( 39): makeComponentInstance at 128
V/SoftOMXPlugin( 39): makeComponentInstance 'OMX.google.aac.decoder'
V/SoftOMXPlugin( 39): makeComponentInstance at 106
V/SoftOMXPlugin( 39): makeComponentInstance at 128
V/ACodec ( 39): [OMX.google.h264.decoder] Now Loaded
V/ACodec ( 39): onConfigureComponent
V/ACodec ( 39): configureCodec at 870
V/ACodec ( 39): setupVideoDecoder at 1400
V/ACodec ( 39): setupVideoDecoder at 1402 mime = video/avc
V/ACodec ( 39): setupVideoDecoder at 1406
V/ACodec ( 39): setupVideoDecoder at 1414
V/ACodec ( 39): setupVideoDecoder at 1421
V/ACodec ( 39): setupVideoDecoder at 1429
V/ACodec ( 39): setupVideoDecoder at 1437
V/ACodec ( 39): initNativeWindow at 1962
V/ACodec ( 39): initNativeWindow at 1967
E/OMXNodeInstance( 39): OMX_GetExtensionIndex failed
V/OMXNodeInstance( 39): enableGraphicBuffers at 301 OMX_GetExtensionIndex returned 2147487745
V/ACodec ( 39): onStart
V/ACodec ( 39): [OMX.google.h264.decoder] Now Loaded->Idle发布于 2013-04-02 20:24:08
试着在真实的设备上运行它,因为我知道一些特定的软件开发工具包(如3.1)在播放m3u8文件时会崩溃。如果没有解决这个问题,也许你可以使用像Vitamio http://vitamio.org/这样的第三方补丁插件
发布于 2013-04-03 09:06:43
这是一个非常有趣的问题。从你的日志中,我想引用这部分
E/OMXNodeInstance( 39): OMX_GetExtensionIndex failed
V/OMXNodeInstance( 39): enableGraphicBuffers at 301 OMX_GetExtensionIndex returned 2147487745这两条错误消息是在ACodec从LOADED转换到IDLE状态的initNativeWindow调用过程中收到的。从OMX的角度来看,作为LOADED to IDLE转换的一部分,将调用ACodec::LoadedState::onConfigureComponent。作为此函数的一部分,将调用initNativeWindow。
在initNativeWindow中,有两个 distinct条件。另一种情况是用户没有向MediaPlayer引擎提供Surface。
V/ACodec ( 39): onStart
V/ACodec ( 39): [OMX.google.h264.decoder] Now Loaded->Idle从这些日志中可以观察到,initNativeWindow的返回码是ok,只有当控件分支到为NULL的情况时,它才是可能的,因为观察到的是here。
一些建议:
由于您使用的是NuPlayer,因此我建议您检查是否调用了NuPlayer::setVideoSurfaceTexture,以及是否将non-NULL对象从NuPlayer传递到下游组件。
从MediaPlayer的角度来看,您应该将表面设置为setSurface调用的一部分。
一般情况下,您需要提供视频解码器链的sink。
发布于 2013-04-19 14:36:41
E/OMXNodeInstance( 39): OMX_GetExtensionIndex failed
V/OMXNodeInstance( 39): enableGraphicBuffers at 301 OMX_GetExtensionIndex returned 2147487745对OMX_GetExtensionIndex的调用进入到只是一个存根函数并始终返回OMX_ErrorUndefined的SoftOMXComponent(here)中,这将导致enableGraphicBuffers失败
https://stackoverflow.com/questions/15760953
复制相似问题