title: Vlc video architecture
body: <p>I am studying the VLC source code in order to understand where exactly VLC writes the decoded frame to the screen. I'm basically interested in the qt ui version, and the windows and linux platforms.</p>
  
  <p>I have come as far as tracing from <code>avcodec_decode_video2</code> up until the point where it writes the frame to a queue using <code>vout_PutPicture</code> and <code>picture_fifo_Push</code>. On the other end, I see there is a <code>Thread</code> object that calls <code>ThreadDisplayRenderPicture</code>, which in turn calls <code>vout_display_Display</code>, which calls <code>Display</code>. I expected this last function to be the one where the bytes for the video frame actually get copied to the frame buffer, but all it does is set the size, and then release the picture.</p>
  
  <p>Could someone explain to me, or point me to a resource that does, where exactly does VLC writes the <code>picture_t</code> structure that is sitting in the queue to the WId structure, effectively writing the frame to the screen? Any link to a more thorough explanation of VLC's video architecture would be great too!</p>