title: Difference between MediaCodec and OMXCodec
body: <p>I have just started to work on the Android Multimedia Framework (<code>Stagefright</code>) and have a basic idea of how local playback works in <code>AwesomePlayer</code> which uses <code>OMXCodec</code>.</p>
  
  <p>I have been mapping my understanding using the <code>MediaPlayer</code> state diagram
  <a href="http://developer.android.com/reference/android/media/MediaPlayer.html" rel="nofollow noreferrer">http://developer.android.com/reference/android/media/MediaPlayer.html</a> and so far it has been pretty good. I have been able to map my understanding to the code.</p>
  
  <p>But I look at the <code>ACodec</code> module (probably for streaming <code>rtsp</code>, <code>HLS</code> etc) I am finding difficulty.
  I am not able to understand how <code>MediaCodec</code> comes into picture.</p>
  
  <p>I checked this article <a href="https://stackoverflow.com/questions/18744905/android-mpeg4writer-fails-to-start-when-using-omxcodec-as-mediasource?rq=1">Android: MPEG4Writer fails to start when using OMXCodec as MediaSource</a>  but still not able to come to terms with MediaCodec.</p>
  
  <ol>
  <li>Is the flow diagram different for Streaming vs Local Playback.</li>
  <li>How is <code>MediaCodec</code> different from <code>OMXCodec</code></li>
  </ol>
  
  <p>I do know that the engine in case of Local Playback is Awesome which is replaced by <code>NuPlayer</code> in case of streaming.</p>