4

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.

I have come as far as tracing from avcodec_decode_video2 up until the point where it writes the frame to a queue using vout_PutPicture and picture_fifo_Push. On the other end, I see there is a Thread object that calls ThreadDisplayRenderPicture, which in turn calls vout_display_Display, which calls Display. 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.

Could someone explain to me, or point me to a resource that does, where exactly does VLC writes the picture_t 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!

Mike F
  • 1,224
  • 4
  • 26
  • 44

1 Answers1

8

I cannot directly answer your question, but provide you with a reference to a thorough explanation of VLC's architecture. (As stated in your last sentence)

Christophe Massiot from the University of Klagenfurt has written a paper on the VLC media player API Documentation. You can find it on google here and on google scholar here.

It includes the following illustration, which may lead you in the right direction.

VLC Architecture

I think the document could prove useful to your question. Take a look at Chapter 5 describing the video output layer

Mike F
  • 1,224
  • 4
  • 26
  • 44
  • 1
    Thank you very much, Michael! That is what I was looking for! It's too bad I don't have the reputation to accept your answer, because you certainly pointed me to the material that I needed. Thanks again. – user3846684 Mar 29 '16 at 20:01
  • @user3846684 glad I could help; please try accepting the answer again, there should be no reputation minimum to accepting answers (see: http://meta.stackexchange.com/q/5234), only to upvoting answers. Thank you! – Mike F Mar 30 '16 at 05:36