From your question, it appears that you are looking at a recommendation which is specific for Ice-Cream Sandwich
or earlier versions of Android. The first thing you should be clear about is the version of the android i.e. Ice-Cream Sandwich
or before or JellyBean
and after. The integration of codecs is different across different releases of Android.
I have already commented on your other question which is specific for JellyBean
and later (Reference: Android: How to integrate a decoder to multimedia framework)
If you would like to integrate your codec in Ice-Cream Sandwich
or before, the steps are already available in your question. In addition to adding the decoder into kDecoderInfo
list, you may like to setup certain quirks as shown here.
For the question on OMXCodec.cpp
, you can find this file at
frameworks/base/media/libstagefright/
in case of Ice-Cream Sandwich
and frameworks/av/media/libstagefright/
in case of JellyBean
.
If you have followed all the steps to integrate the video decoder into the Stagefright
framework, then the easiest test would be to perform the following:
Copy a media file into SD-Card
In OMXCodec.cpp
, enable logs by removing the comment in this statement //#define LOG_NDEBUG 0
and run a mm
in the directory. Copy the rebuilt libstagefright.so
to /system/lib
on your device.
Enable logcat
and start capturing logs.
Goto gallery, select your file and allow the standard player to play your file.
Check your log file if the player has selected your OMX
component by searching for your component name. If found, your integration of codec into Stagefright
is successful. Else, you will have to debug and find out what is the problem.
Postscript:
Based on your queries, I presume you aren't familiar with Android sources. Please refer to androidxref site to become familiar with AOSP
distributions.
Unless you are planning to support a new media file-format, you will not require to support Extractor
class. MediaExtractor
abstracts a file-format parser and helps to de-multiplex the different tracks in a media file.
I hope with this information, you should be able to get your codec integrated and functional in Android.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…