vlc-cvs video output jerky

Gildas Bazin gbazin at netcourrier.com
Thu Jan 10 07:48:26 CET 2002


On Thursday 10 January 2002 00:23, Christophe Massiot wrote:
> 
> Could both of you try something ? In plugins/x11/xcommon.c, line 584, 
> replace XFlush(...) by XSync( p_vout->p_sys->p_display, False ). I do 
> not know why my XSync call was replaced by XFlush ; I had used 
> XSync() on purpose. XFlush() will create on some configurations the 
> very artefacts you're describing.
> 

I was the one who replaced XSync() with XFlush() ;-)
The reasoning behind this was that XSync() would not add much compared to 
XFlush() because XvPutImage() will anyway return without having _really_ 
displayed the picture. I think the only job of XvPutImage() is to initialize 
the copy between the Shm picture buffer and the video memory, but it does not 
wait for the copy to be finished. The only way you can be sure the picture is 
actually on your screen is by monitoring the completion event.

That being said, I did some tests and I have to admit that using XSync() 
looks better than using XFlush() so I guess the little delay added by XSync() 
does help and we've got less chances to overwrite a buffer that's being 
displayed.

I still think the way to go would be to use completion events just so we can 
know when the picture is actually displayed.

By the way these are the results of my tests:
With XFlush() in vout_Display: corruption in some pictures and the video 
stutters.
With XSync() in vout_Display: corruption seems to be gone but the video still 
stutters.
With DIRECTBUFFERS=1: the video is definitly smoother.

Cheers,

--
Gildas




More information about the vlc mailing list