Tuesday, 27 August 2013

How to use MediaCodec API to invoke my custom decoder

How to use MediaCodec API to invoke my custom decoder

I have a video decoder which is ported to android and is successfully
working as a standalone application, however i want to integrate this code
to android multimedia framework. So, this code i have added to android's
media framework. That is i have added it to
root/media/libstagefright/codecs/myDecoder.
I have written an Android.mk under myDecoder folder that i have added and
placed the source code of my decoder and the compilation is successful and
i'm able to run it in an emulator.
Now, I have read that the new MediaCodec API in android allows us to
access and use the codecs available in android source.
My question is, now that i have integrated my decoder to android source code:
Is it possible for me to use my decoder to decode an input stream and
render it on the device screen?
My decoder has a Function that should be invoked for decoding a stream.
This function takes the path of the input stream as a parameter.
Should i modify something in my source code of the decoder to match the
requirements of the MediaCodec API.
Any help regarding the same will be really helpful to me.
-Regards.

No comments:

Post a Comment