Opened 12 years ago
Closed 8 years ago
#2819 closed defect (invalid)
[Android] avcodec cannot find symbol OMXCodec::Create
Reported by: | cxo | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | libstagefright |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Runtime error when invoking ffprobe. Built using tools/build_stagefright
shell@android:/data/local # ./ffprobe /sdcard/VID_20120821_174449.mp4 soinfo_link_image(linker.cpp:1635): could not load library "libavfilter.so" needed by "./ffprobe"; caused by soinfo_link_image(linker.cpp:1635): could not load library "libavformat.so" needed by "libavfilter.so"; caused by soinfo_link_image(linker.cpp:1635): could not load library "libavcodec.so" needed by "libavformat.so"; caused by soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android8OMXCodec6CreateERKNS_2spINS_4IOMXEEERKNS1_INS_8MetaDataEEEbRKNS1_INS_11MediaSourceEEEPKcj" referenced by "libavcodec.so"...CANNOT LINK EXECUTABLE 255|shell@android:/data/local # ls ffmpeg ffprobe libavcodec.so libavdevice.so libavfilter.so libavformat.so libavutil.so libpostproc.so libswresample.so libswscale.so shell@android:/data/local #
ffmpeg version : git (6b68e2a43b3407522080be50a2a19cff2f9715ef)
Device is a Nexus 10 (Android 4.2.2)
Change History (6)
comment:1 by , 12 years ago
Priority: | critical → important |
---|
comment:2 by , 12 years ago
I think I have found some useful information;
The missing symbol as shown above is;
_ZN7android8OMXCodec6CreateERKNS_2spINS_4IOMXEEERKNS1_INS_8MetaDataEEEbRKNS1_INS_11MediaSourceEEEPKcj
Which obviously can be found in the version of libstagefright.so from http://download.cyanogenmod.com/get/update-cm-7.0.3-N1-signed.zip (which build_stagefright downloads/extracts into ../android-libs )
Whilst libstagefright.so from the Nexus 10 / 4.2.2 contains
_ZN7android8OMXCodec6CreateERKNS_2spINS_4IOMXEEERKNS1_INS_8MetaDataEEEbRKNS1_INS_11MediaSourceEEEPKcjRKNS1_I13ANativeWindowEE
I don't understand these C++ symbols, but if I had to guess it looks like the parameters for OMXCodec::Create has changed?
comment:3 by , 12 years ago
Is this reproducible with ./configure && make
?
Is it a regression? (Ie: Did it work with an older version of FFmpeg?)
comment:4 by , 12 years ago
Yes this is easily reproducible with Android 4+
Its actually the opposite of a regression. The issue is that the libstagefright integration was done with a very old version of Android (2.3 aka Gingerbread) and thus is no longer compatible with newer versions of Android/stagefright/openMAX.
I don't believe this has even worked for at least a year now. I was really surprised to see how broken the libstagefright integration is in FFmpeg. I thought this was a popular usage model given that its possibly the only way you can access the OpenMAX hw codec plugins through FFmpeg. Or am I wrong?
I made the necessary changes to libavcodec/libstagefright.cpp to support Android HEAD and got it to compile and it "sorta" worked. But overall the code is really broken and I'm not even going to try go any further. It needs a re-write.
I've resorted to using FFmpeg in parallel with stagefright as opposed to trying to use stagefright/openMAX through FFmpeg. And in Android 4.3 onwards I will be dropping FFmpeg altogether in favour of the new android.media.* classes.
comment:5 by , 12 years ago
Keywords: | libstagefright added |
---|---|
Priority: | important → normal |
Did you send your changes to the ffmpeg-devel mailing list?
No security issue nor data loss thus not critical priority