title: How to use MediaCodec API to invoke my custom decoder
body: <p>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 <code>root/media/libstagefright/codecs/myDecoder</code>.</p>
  
  <p>I have written an <code>Android.mk</code> 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.</p>
  
  <p>Now, I have read that the new <code>MediaCodec</code> API in android allows us to access and use the codecs available in android source.</p>
  
  <p>My question is, now that i have integrated my decoder to android source code:</p>
  
  <p><strong>Is it possible for me to use my decoder to decode an input stream and render it on the device screen?</strong></p>
  
  <p>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. </p>
  
  <p>Should i modify something in my source code of the decoder to match the requirements of the <code>MediaCodec</code> API.</p>
  
  <p>Any help regarding the same will be really helpful to me.</p>
  
  <p>-Regards.</p>