How to use omxcodec in android for all versions

I want to decode and display the h264 frame on my screen. Now all I wanted to do was use the omx codec to decode my frames when decoding it on hardware, which helps achieve fps for high resolutions. So far, all I have learned is another way to access hardware decoders. I come across names like stagefright, omxcodec, openmax. These are all different things. I want to decode frame by frame. and to my knowledge android libraries only allow file path or media url. But here my requirements are different. I need to decode frame by frame. So can someone tell me where I can start digging? I found out that in the latest version of Android they published api for decoding. But I want to support the whole version of Android. Therefore, any suggestion or guide would be great.

Thanks.

+4
source share
1 answer

You are right, and at the highest level, the libstagefright library has a "streaming" interface. That is, you create an audio or video source, configure codecs, and then start the encoding or decoding process.

However, using the OMXCodec interface, you can access individual frames. Unfortunately, I do not know any official OMXCodec official docs.

The only source is code examples in the Android repository.

If you want to know more about how to use OMXCodec, you can view the AwesomePlayer.cpp file ( http://gitorious.org/rowboat/frameworks-base/blobs/rowboat-ics/media/libstagefright/AwesomePlayer.cpp )

Using libstagefright library is clear from StagefrightRecorder.cpp (in the same repository)

Also useful information on OMXCodec architecture is here.

PS Remember that the OMXCodec API is unstable and may vary from version to version ...

+3
source

All Articles