[FFmpeg-devel] Use ffmpeg as an Android stagefright plugin

Fabio Fumi ffumi68 at googlemail.com
Thu Oct 30 11:52:33 CET 2014


Also after adding new ffmpeg codecs to I still get a crash on H264 (avc) 
playback.

Added ffmpeg codecs to device/renesas/emev/media_codecs.xml 

Rebuilt... test... still crashing:

V/AwesomePlayer(  758): track of type 'video/avc' does not publish bitrate
V/AwesomePlayer(  758): mBitrate = -1 bits/sec
V/AwesomePlayer(  758): haveAudio:1, haveVideo:1
V/AwesomePlayer(  758): initVideoDecoder flags=0x0
I/EV2OMXPlugin(  758): ***run OMFPlugin ------- makeComponentInstance 
!!!!!!!!
I/OMXCodec(  758): [OMX.RENESAS.VIDEO.DECODER.H264] AVC profile = 66 
(Baseline), level = 30
I/OMXCodec(  758): [OMX.RENESAS.VIDEO.DECODER.H264] video dimensions are 
640 x 344
E/OMXNodeInstance(  758): OMX_GetExtensionIndex (index:'7fffffff') failed
I/EV2OMXPlugin(  758): ***run OMFPlugin ------- destroyComponentInstance 
!!!!!!!!
E/OMXMaster(  758): Invalid OMX component name 'OMX.ffmpeg.h264.decoder'
E/MediaPlayer(  996): error (1, -2147483648)
E/MediaPlayer(  996): Error (1,-2147483648)
W/YouTube (  996): (unknown) MediaPlayer error during prepare [what=1, 
extra=-2147483648]
W/YouTube (  996): (unknown) Retrying MediaPlayer error [retry=1, max=3]
F/libc    (  758): @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree 
addr=0x2a023ad0
F/libc    (  758): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 
794 (Binder_2)
...
I/DEBUG   (   70):     #00  pc 000137b8  /system/lib/libc.so
I/DEBUG   (   70):     #01  pc 00015b95  /system/lib/libc.so (dlfree+1628)
I/DEBUG   (   70):     #02  pc 00016d43  /system/lib/libc.so (free+10)
I/DEBUG   (   70):     #03  pc 0007a853  /system/lib/libstagefright.so
I/DEBUG   (   70):     #04  pc 0007ac0d  /system/lib/libstagefright.so 
(android::TimedEventQueue::~TimedEventQueue()+36)
I/DEBUG   (   70):     #05  pc 000538ad  /system/lib/libstagefright.so 
(android::AwesomePlayer::~AwesomePlayer()+288)

On Thursday, 30 October 2014 03:09:35 UTC-7, Fabio Fumi wrote:
>
> Hi Chih,
>
> I've completed the merge of frameworks/av and framewroks/native and added 
> the stagefright-plugins and ffmpeg to my project. I enabld the USES_NAM and 
> built new system.
>
> Startup wnet fine, but on YouTube test playback (which went just fine 
> before), I get a crash (below).
>
> Note how I haven't enabled he new ffmpeg codecs in media_codecs.xml and 
> I'm using Google SW codec for h264:
>
>         <MediaCodec name="OMX.google.h264.decoder" type="video/avc"/>
>
> Suggestions?
>
> thanks
> Fabio
>
>
> ...
> D/H264Dec (  707): H264SwDecInit#
> D/H264Dec (  707): H264SwDecInit# decInst 0x2a055c08 noOutputReordering 0
> D/H264Dec (  707): H264SwDecInit# OK: return 0x2a0b1238
> I/OMXCodec(  707): [OMX.google.h264.decoder] AVC profile = 66 (Baseline), 
> level = 30
> I/OMXCodec(  707): [OMX.google.h264.decoder] video dimensions are 320 x 240
> I/OMXCodec(  707): [OMX.google.h264.decoder] Crop rect is 320 x 240 @ (0, 
> 0)
> ...
> D/H264Dec (  707): H264SwDecDecode#
> D/H264Dec (  707): H264SwDecDecode# decInst 0x2a0b1238  pInput 0x4201ed88  
> pOutput 0x4201ed7c
> D/H264_decoder(  707): Access unit boundary
> D/H264_decoder(  707): SEQ PARAM SET
> D/H264Dec (  707): H264SwDecDecode# OK: DecResult 1
> D/H264Dec (  707): H264SwDecDecode#
> D/H264Dec (  707): H264SwDecDecode# decInst 0x2a0b1238  pInput 0x4201ed88  
> pOutput 0x4201ed7c
> D/H264_decoder(  707): Access unit boundary
> D/H264_decoder(  707): PIC PARAM SET
> D/H264Dec (  707): H264SwDecDecode# OK: DecResult 1
> D/H264Dec (  707): H264SwDecDecode#
> D/H264Dec (  707): H264SwDecDecode# decInst 0x2a0b1238  pInput 0x4201ed88  
> pOutput 0x4201ed7c
> D/H264_decoder(  707): Access unit boundary
> D/H264_decoder(  707): IDR 
> D/H264_decoder(  707): SLICE HEADER
> D/H264Dec (  707): H264SwDecDecode# OK: DecResult 4
> D/H264Dec (  707): H264SwDecGetInfo#
> D/H264Dec (  707): H264SwDecGetInfo# decInst 0x2a0b1238  pDecInfo 
> 0x4201eda8
> D/H264Dec (  707): H264SwDecGetInfo# OK
> D/H264Dec (  707): H264SwDecDecode#
> D/H264Dec (  707): H264SwDecDecode# decInst 0x2a0b1238  pInput 0x4201ed88  
> pOutput 0x4201ed7c
> D/H264_decoder(  707): IDR 
> D/H264_decoder(  707): SLICE HEADER
> D/H264_decoder(  707): (null)
> D/H264Dec (  707): H264SwDecDecode# OK: DecResult 2
> D/H264Dec (  707): H264SwDecNextPicture#
> D/H264Dec (  707): H264SwDecNextPicture# decInst 0x2a0b1238 pOutput 
> 0x4201ed98 flushBuffer 0
> D/H264Dec (  707): H264SwDecNextPicture# OK: return H264SWDEC_PIC_RDY
> F/libc    (  707): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), 
> thread 1818 (le.h264.decoder)
> ...
> I/DEBUG   (   70):     #00  pc 00011ed0  /system/lib/libc.so
> I/DEBUG   (   70):     #01  pc 0000ad6b  /system/lib/libstagefright_omx.so 
> (android::OMX::CallbackDispatcher::post(android::omx_message const&)+14)
> I/DEBUG   (   70):     #02  pc 0000b5e5  /system/lib/libstagefright_omx.so 
> (android::OMX::OnEmptyBufferDone(void*, OMX_BUFFERHEADERTYPE*)+30)
> I/DEBUG   (   70):     #03  pc 0000ebd9  /system/lib/libstagefright_omx.so 
> (android::SoftOMXComponent::notifyEmptyBufferDone(OMX_BUFFERHEADERTYPE*)+16)
> I/DEBUG   (   70):     #04  pc 00009f60  
> /system/lib/libstagefright_soft_h264dec.so 
> (android::SoftAVC::onQueueFilled(unsigned long)+508)
>
>
>
> On Sunday, 11 August 2013 01:25:25 UTC-7, Chih-Wei Huang wrote:
>>
>> Hello ffmpeg list, 
>> I'm planning to integrate the latest ffmpeg as 
>> a stagefright OMXPlugin with Android-x86 4.3. 
>> I found the stagefright-plugins developed by 
>> Michael Chen is a good start. 
>> (repo: https://github.com/omxcodec/stagefright-plugins.git) 
>> But it's based on android 4.0 (ICS). 
>>
>> My plan is: 
>> * Update stagefright-plugins to work with 
>>   stagefright of android 4.3. 
>> * Make it to be a libstagefrighthw.so plugin. 
>> * Create Android.mk to build ffmpeg libs. 
>>
>> Before I go ahead, I'd like to know 
>> if anyone is doing a similar project 
>> to avoid duplicate work. 
>> Thanks a lot! 
>>
>>
>> -- 
>> Chih-Wei 
>> Android-x86 project 
>> http://www.android-x86.org 
>>
>


More information about the ffmpeg-devel mailing list