title: How to create a Video player using openGL
body: <p>I'm having a custom video decoder. To this decoder, whenever i give an <code>H.264</code> file (only video element not audio) as an input, i get a set of <code>YUV</code> frames as my output. I then convert this <code>YUV</code> frames to <code>RGB24</code> frames and render it in <code>OpenGL</code>. This conversion and rendering happens simultaneously i.e. frame by frame thereby giving a look like as if i'm viewing a video.</p>
  
  <p>Once i have done the above, my next task is to implement other features like play, pause, step backward, step forward, etc.</p>
  
  <p>Currently i'm just rendering the frames as and how it gets decoded and converted to RGB. That is the frame rate is around 60-70 fps. Now if i have to implement this play/pause functionality, then how should i proceed. That is if pause is pressed, the decoder should wait till i press play button.</p>
  
  <p>Provide some solutions for the same.</p>