title: media codec sample implementation in android 4.1
body: <p>I am trying to display video buffers on an android. I am using the media codec API released in Android 4.1 Jelly Bean.</p>
  
  <p>The sample goes like this:  </p>
  
  <pre><code> MediaCodec codec = MediaCodec.createDecoderByType(type);
   codec.configure(format, ...);
  </code></pre>
  
  <p>configure method accepts 3 other arguments, apart from MediaFormat. I have been able to figure out MediaFormat somehow but I am not sure about the other 3 parameters. (below).  </p>
  
  <pre><code> MediaSurface, MediaCrypto and Flags. 
  </code></pre>
  
  <p>Any leads? </p>
  
  <p>Also, what should I do with the MediaCrypto argument, if I am not encrypting my video buffers. </p>
  
  <p>Requirements: </p>
  
  <pre><code>1) Decode the buffers on the android device, 
  2) Display them on the screen. 
  </code></pre>