I am porting Stagefright to Linux Desktop

So far get to the point when files is opened, sniffed, extractor and codec 
are created.

However got stuck at point where Decoding should happen, it seems it is not 
executing and stream is not there:

    04-20 09:29:34.658 20080 20080 E MediaCodec: getBufferAndFormat - not 
executing
    04-20 09:29:34.658 20080 20080 W SimpleDecodingSource: [] could not get 
input buffer #0

Any ideas what I miss.

On Emulator is should work, since it has all the services, so I am 
wondering what I messed up, by modify the code or need to add.

Maybe somebody can hint me?


On Emulator:

    130|generic_x86_64:/data/local/tmp # ./stagefright 
sample-mp4-file.mp4                                                             
                                                                        
 
    thumbnailTime: 52066666 us (52.07 secs)
    AVC video profile 77 and level 13
    $
    avg. 0.00 fps
    avg. time to decode one buffer -nan usecs
    decoded a total of 0 frame(s).
    
    
    Logcat:
    
    04-20 09:29:34.625 20080 20080 V MediaExtractorFactory: 
MediaExtractorFactory::CreateFromService (null)
    04-20 09:29:34.625 20080 20080 V MediaExtractorFactory: search for 
plugins at /apex/com.android.media/lib64/extractors
    04-20 09:29:34.635 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libmkvextractor.so
    04-20 09:29:34.635 20080 20080 V MediaExtractorFactory: registering 
extractor for Matroska Extractor
    04-20 09:29:34.635 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libwavextractor.so
    04-20 09:29:34.635 20080 20080 V MediaExtractorFactory: registering 
extractor for WAV Extractor
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libflacextractor.so
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
extractor for FLAC Extractor
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libaacextractor.so
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
extractor for AAC Extractor
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/liboggextractor.so
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
extractor for Ogg Extractor
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libmidiextractor.so
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
extractor for MIDI Extractor
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libamrextractor.so
    04-20 09:29:34.636 20080 20080 V MediaExtractorFactory: registering 
extractor for AMR Extractor
    04-20 09:29:34.645 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libmpeg2extractor.so
    04-20 09:29:34.645 20080 20080 V MediaExtractorFactory: registering 
extractor for MPEG2-PS/TS Extractor
    04-20 09:29:34.645 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libmp4extractor.so
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: registering 
extractor for MP4 Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: registering 
sniffer for /apex/com.android.media/lib64/extractors/libmp3extractor.so
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: registering 
extractor for MP3 Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: search for 
plugins at /system/lib64/extractors
    04-20 09:29:34.646 20080 20080 E MediaExtractorFactory: couldn't 
opendir(/system/lib64/extractors)
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: sniffing AAC 
Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: sniffing AMR 
Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: sniffing FLAC 
Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: sniffing MIDI 
Extractor
    04-20 09:29:34.646 20080 20080 V MediaExtractorFactory: sniffing MP3 
Extractor
    04-20 09:29:34.647 20080 20080 V MediaExtractorFactory: sniffing MP4 
Extractor
    04-20 09:29:34.647 20080 20080 V MediaExtractorFactory: sniffing 
MPEG2-PS/TS Extractor
    04-20 09:29:34.647 20080 20080 V MediaExtractorFactory: sniffing 
Matroska Extractor
    04-20 09:29:34.648 20080 20080 V MediaExtractorFactory: sniffing Ogg 
Extractor
    04-20 09:29:34.648 20080 20080 V MediaExtractorFactory: sniffing WAV 
Extractor
    04-20 09:29:34.648 20080 20080 V MediaExtractorFactory: Created an 
extractor 'MPEG4Extractor' with confidence 0.40
    04-20 09:29:34.656 20080 20080 V MediaCodecList: find matching codec
    04-20 09:29:34.656 20080 20080 V MediaCodecList: getLocalInst
    04-20 09:29:34.656 20080 20080 D StagefrightPluginLoader: CCodec is 
disabled.
    04-20 09:29:34.656 20080 20080 D StagefrightPluginLoader: Handle or 
CreateInputSurface symbol is null
    04-20 09:29:34.656 20080 20080 D MediaCodecList: Allowing all OMX codecs
    04-20 09:29:34.656 20080 20080 D StagefrightPluginLoader: Handle or 
CreateBuilder symbol is null
    04-20 09:29:34.656 20080 20080 V OmxInfoBuilder: rank528
    04-20 09:29:34.656 20080 20080 V OmxInfoBuilder: here
    04-20 09:29:34.656 20080 20080 V OmxInfoBuilder: done
    04-20 09:29:34.656 20080 20080 V MediaCodecList: break1
    04-20 09:29:34.656 20080 20080 V MediaCodecList: break2
    04-20 09:29:34.657 20080 20080 V MediaCodecList: list
    04-20 09:29:34.657 20080 20080 V MediaCodecList: find matching codec1
    04-20 09:29:34.657 20080 20080 V MediaCodecList: matching 
'OMX.google.h264.decoder'
    04-20 09:29:34.657 20080 20080 V MediaCodecList: find matching codec1
    04-20 09:29:34.657 20080 20080 V SimpleDecodingSource: Attempting to 
allocate codec 'OMX.google.h264.decoder'
    04-20 09:29:34.657 20080 20080 V MediaCodec: create by comp
    04-20 09:29:34.657 20080 20080 V MediaCodec: 1
    04-20 09:29:34.657 20080 20080 V MediaCodec: analytics
    04-20 09:29:34.657 20080 20080 V MediaCodec: create by comp2
    04-20 09:29:34.657 20080 20080 V MediaCodec: Init
    04-20 09:29:34.657 20080 20080 V MediaCodec: Init1
    04-20 09:29:34.657 20080 20080 V MediaCodec: init2
    04-20 09:29:34.657 20080 20080 V MediaCodec: init3
    04-20 09:29:34.657 20080 20080 V MediaCodec: init4
    04-20 09:29:34.657 20080 20080 V MediaCodec: err:0
    04-20 09:29:34.657 20080 20080 V MediaCodec: ret loop:0
    04-20 09:29:34.657 20080 20080 I SimpleDecodingSource: Successfully 
allocated codec 'OMX.google.h264.decoder'
    04-20 09:29:34.657 20080 20080 V MediaCodec: format
    04-20 09:29:34.657 20080 20080 V MediaCodec: name
    04-20 09:29:34.657 20080 20080 V SimpleDecodingSource: mcodec1
    04-20 09:29:34.657 20080 20080 V SimpleDecodingSource: mcodec2
    04-20 09:29:34.657 20080 20080 D MediaBufferGroup: creating MemoryDealer
    04-20 09:29:34.658 20080 20080 V MediaCodec: ble
    04-20 09:29:34.658 20080 20080 E MediaCodec: getBufferAndFormat - not 
executing
    04-20 09:29:34.658 20080 20080 W SimpleDecodingSource: [] could not get 
input buffer #0
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libaacextractor.so 1
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libamrextractor.so 1
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libflacextractor.so 1
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libmidiextractor.so 1
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libmp3extractor.so 1
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libmp4extractor.so 2
    04-20 09:29:34.663 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libmpeg2extractor.so 1
    04-20 09:29:34.664 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libmkvextractor.so 1
    04-20 09:29:34.664 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/liboggextractor.so 1
    04-20 09:29:34.665 20080 20080 V MediaExtractorFactory: closing handle 
for /apex/com.android.media/lib64/extractors/libwavextractor.so 1

On Laptop:

     ./stagefright  /home/mk/Downloads/sample-mp4-file.mp4 
    thumbnailTime: 52066666 us (52.07 secs)
    AVC video profile 77 and level 13
    $
    avg. 0.00 fps
    avg. time to decode one buffer -nan usecs
    decoded a total of 0 frame(s).

Strace:

    writev(4, [{iov_base="\0$VR\203~`0\17A'", iov_len=11}, {iov_base="\2", 
iov_len=1}, {iov_base="MediaCodec\0", iov_len=11}, {iov_base="ble\0", 
iov_len=4}], 4) = 27
    getuid()                                = 0
    writev(4, [{iov_base="\0$VR\203~`\261lE'", iov_len=11}, {iov_base="\6", 
iov_len=1}, {iov_base="MediaCodec\0", iov_len=11}, 
{iov_base="getBufferAndFormat - not executi"..., iov_len=35}], 4) = 58
    getuid()                                = 0
    writev(4, [{iov_base="\0$VR\203~`\360\277H'", iov_len=11}, 
{iov_base="\5", iov_len=1}, {iov_base="SimpleDecodingSource\0", 
iov_len=21}, {iov_base="[] could not get input buffer #0"..., iov_len=33}], 
4) = 66
    futex(0x7fa4a961c26c, FUTEX_WAKE_PRIVATE, 1) = 0
    write(1, "$", 1$)                        = 1
    write(1, "\n", 1
    )                       = 1
    write(1, "avg. 0.00 fps\n", 14avg. 0.00 fps
    )         = 14
    write(1, "avg. time to decode one buffer -"..., 42avg. time to decode 
one buffer -nan usecs
    ) = 42
    write(1, "decoded a total of 0 frame(s).\n", 31decoded a total of 0 
frame(s).
    ) = 31
    futex(0x7fa4a9630838, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7fa4a9630810, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7fa4a9630838, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7fa4a96308c4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
    madvise(0x7fa52c650000, 28672, MADV_REMOVE) = 0
    madvise(0x7fa52c658000, 24576, MADV_REMOVE) = 0
    munmap(0x7fa52c650000, 61440)           = 0
    close(6)                                = 0
    getuid()                                = 0
    ioctl(5, BINDER_WRITE_READ, 0x7ffd58210b30) = 0
    nanosleep({tv_sec=1, tv_nsec=0}, ^C{tv_sec=0, tv_nsec=280849256}) = ? 
ERESTART_RESTARTBLOCK (Interrupted by signal)

It refers to this code:

https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/MediaCodec.cpp#1942

Any ideas how to fix it?








-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/ad5bf58e-907e-48f7-ad2d-6b634c7759ffn%40googlegroups.com.

Reply via email to