No subject


Mon Apr 7 14:19:29 CEST 2008


have anything to do with xvid at all. You use xvid for decoding, but then 
it is the job of your application to display the decoded frames at the rate 
you desire, ie 30fps. If you don't do any timing/waiting, then you are 
obviously displaying at the same rate as your computer is able to decode 
the frames.

I would approach the problem as follows: Make a thread that decodes frames 
and puts them into a blocking queue that accepts only so many buffers (for 
example 3, but it depends on the latency you want to achieve). Make another 
thread that pulls buffers out of the queue and displays them, this thread 
would be locked to a certain timing (30 fps). This setup will result in the 
decoding thread blocking at the queue, being locked to the rate at which 
the display thread pulls buffers from the queue. Should anything result in 
the overall system needing too much time to decode a particular frame, you 
have a short bridge of three frames to smooth it out.

Best regards,
-Stephan


More information about the XviD-devel mailing list