媒体编解码器| Android |视频解码本机崩溃

时间:2015-02-09 16:31:43

标签: android video opengl-es-2.0 samsung-mobile mediacodec

一些背景知识:我的应用程序允许用户使用从API 16及更高版本开始的OpenGL和MediaCodec API在屏幕上预览多个视频。这些视频都是.mp4文件。

在解码表面上的视频后,我遇到类似的崩溃like here。但我的特定于三星设备

崩溃线:

A / libc:致命信号11(SIGSEGV)位于0x00000000(代码= 1),线程11685(MediaCodec_loop)

LogCat输出:

02-09 18:56:41.819    1902-1902/? I/DEBUG? *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-09 18:56:41.819    1902-1902/? I/DEBUG? Build fingerprint: 'samsung/m0zs/m0:4.1.2/JZO54K/I9300ZSEMK2:user/release-keys'
02-09 18:56:41.819    1902-1902/? I/DEBUG? pid: 16880, tid: 17266, name: MediaCodec_loop  >>> com.flambestudios.picplaypost <<<
02-09 18:56:41.819    1902-1902/? I/DEBUG? signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? r0 00000000  r1 00000000  r2 00008210  r3 00000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? r4 00000000  r5 00000000  r6 00000000  r7 00000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? r8 00000000  r9 64a44e80  sl 00000000  fp 00000001
02-09 18:56:42.084    1902-1902/? I/DEBUG? ip 00000000  sp 64a44d20  lr 00000000  pc 4010e55c  cpsr 20000010
02-09 18:56:42.084    1902-1902/? I/DEBUG? d0  443b400046180400  d1  44a6a00000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d2  0000053500000000  d3  00000000000002ed
02-09 18:56:42.084    1902-1902/? I/DEBUG? d4  0000000000000000  d5  000002ed0073e20e
02-09 18:56:42.084    1902-1902/? I/DEBUG? d6  00000535443b4000  d7  00002601443b4000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d8  000000003f800000  d9  4049000000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d10 4049000000000000  d11 0000000000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d12 0000000000000000  d13 0000000000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d14 0000000000000000  d15 0000000000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d16 0000000000000001  d17 0000000000000000
02-09 18:56:42.084    1902-1902/? I/DEBUG? d18 000000000073bffb  d19 000000000073cf5c
02-09 18:56:42.084    1902-1902/? I/DEBUG? d20 000000000073bf1b  d21 0020002000200820
02-09 18:56:42.084    1902-1902/? I/DEBUG? d22 000000000073f44f  d23 000000000073bd24
02-09 18:56:42.084    1902-1902/? I/DEBUG? d24 0820082008200820  d25 0020002000200820
02-09 18:56:42.084    1902-1902/? I/DEBUG? d26 0020002000200020  d27 0020002000200820
02-09 18:56:42.084    1902-1902/? I/DEBUG? d28 0020002000200020  d29 000000000073f41e
02-09 18:56:42.084    1902-1902/? I/DEBUG? d30 0820082008200020  d31 0020002000200020
02-09 18:56:42.084    1902-1902/? I/DEBUG? scr 80000013
02-09 18:56:42.099    1902-1902/? I/DEBUG? backtrace:
02-09 18:56:42.099    1902-1902/? I/DEBUG? #00  pc 0000e55c  /system/lib/libc.so (memset+148)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #01  pc 0000144c  /system/lib/libSEC_OMX_Core.so (SEC_OMX_Component_Unregister+16)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #02  pc 00001828  /system/lib/libSEC_OMX_Core.so (SEC_OMX_DeInit+44)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #03  pc 00000ae7  /system/lib/libstagefrighthw.so (android::SECOMXPlugin::~SECOMXPlugin()+18)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #04  pc 00000b0d  /system/lib/libstagefrighthw.so (android::SECOMXPlugin::~SECOMXPlugin()+4)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #05  pc 0000c157  /system/lib/libstagefright_omx.so (android::OMXMaster::clearPlugins()+58)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #06  pc 0000c189  /system/lib/libstagefright_omx.so (android::OMXMaster::~OMXMaster()+12)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #07  pc 0000c1d1  /system/lib/libstagefright_omx.so (android::OMXMaster::~OMXMaster()+4)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #08  pc 0000aec3  /system/lib/libstagefright_omx.so (android::OMX::~OMX()+38)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #09  pc 0000af4d  /system/lib/libstagefright_omx.so (android::OMX::~OMX()+4)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #10  pc 0000ef11  /system/lib/libutils.so (android::RefBase::decStrong(void const*) const+40)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #11  pc 0005399b  /system/lib/libstagefright.so (android::sp<android::MPEG2PSExtractor::Track>::~sp()+18)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #12  pc 000810e3  /system/lib/libstagefright.so (android::MuxOMX::~MuxOMX()+30)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #13  pc 00081125  /system/lib/libstagefright.so (android::MuxOMX::~MuxOMX()+4)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #14  pc 0000ef11  /system/lib/libutils.so (android::RefBase::decStrong(void const*) const+40)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #15  pc 00055e7f  /system/lib/libstagefright.so (android::ACodec::LoadedState::onShutdown(bool)+130)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #16  pc 00056d27  /system/lib/libstagefright.so (android::ACodec::LoadedState::onMessageReceived(android::sp<android::AMessage> const&)+106)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #17  pc 000066bd  /system/lib/libstagefright_foundation.so (android::AHierarchicalStateMachine::onMessageReceived(android::sp<android::AMessage> const&)+80)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #18  pc 00007471  /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+188)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #19  pc 00006d25  /system/lib/libstagefright_foundation.so (android::ALooper::loop()+204)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #20  pc 0001103b  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+94)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #21  pc 00010bb5  /system/lib/libutils.so
02-09 18:56:42.099    1902-1902/? I/DEBUG? #22  pc 00012e00  /system/lib/libc.so (__thread_entry+48)
02-09 18:56:42.099    1902-1902/? I/DEBUG? #23  pc 00012558  /system/lib/libc.so (pthread_create+172)

当我尝试在Galaxy S3上解码超过2个视频文件时,问题就出现了(2个视频播放得很好)。

我在HTC OneX(4.1.x)上测试了相同的代码。 LG Nexus4(4.2.x),他们一次播放6个视频,没有任何问题。

任何想法是什么问题?

编辑#1

问题主要在于软件编解码器,我为mime类型编写的编解码器是3个硬件和1个软件,即OMX.SEC.avc.dec,OMX.SEC.avcdec,OMX.SEC.AVC.Decoder&amp; ;分别为OMX.google.h264.decoder。 OMX.SEC.avc.dec只设法解码1个视频和其他视频,将OMX.google.h264.decoder作为解码器(其他2个在我的情况下无用)。

我也在Nexus5(Lollipop),小米Mi3(KitKat)上测试了应用程序。 Galaxy S4(KitKat)完全没有问题,因为这些设备成功地分配了6个硬件编解码器进行解码。

0 个答案:

没有答案