[Xine-vdpau] osd timing?

Roger Scott ras351 at hotmail.com
Fri Sep 25 01:17:10 CEST 2009


Hi all,


I'm wondering if someone can shed some light on some timing issues I'm having with my spu decoder.  The decoder is a teletext decoder which displays the closed captions broadcast here in Australia via DVB-T (mpeg2).  I have two variants, the first being non-threaded which works fine for all streams except high definition (1080i/50) which frequently stutters when captions are displayed (this appears to be independent of the nvidia driver version).  The second is threaded and does not stutter but sometimes misses displaying the captions (on both SD and HD material).  The threaded one is the one I'm trying to fix as it appears to work fine with drivers other than vdpau.  I suspect it's somehow related to how vdpau is sequencing/blending the osd frames but I'm not sure.

The main decoder thread copies the packet into a buffer, flags a condition variable and returns.  The second thread decodes the buffer, generates the bitmap and displays it by making a xine_osd_show call using the vpts returned from metronom->got_spu_packet (which is done immediately before the show).  The threads are both wrapped around a mutex so only one thread can access the buffer and execute at a time.  The idea is that the stuttering was due to holding up the main decoder thread for too long whilst the bitmap was being generated so I moved this into its own thread.  The machine is only running with a cpu load of around 10% and it is a dual core cpu so it should be able to cope.

I've tried using a vpts of 0 to show things immediately but it still skips some of the captions (although this may be due to an "erase" being sequenced more quickly than needed).  It is also unfortunately intermittent as I can rewind a bit and replay and the missing captions will then be displayed.  Does anybody have any idea what might be going on and any suggestions on how perhaps to fix it? Is it possible that between the call to got_spu_packet and xine_osd_show that the vpts has increased beyond the time for the caption to be displayed and hence is not being displayed?  Alternatively would increasing the video buffers be likely to help with the stuttering for the non-threaded version?

Any help appreciated,
Roger.
 		 	   		  
_________________________________________________________________
View photos of singles in your area Click Here
http://dating.ninemsn.com.au/search/search.aspx?exec=go&tp=q&gc=2&tr=1&lage=18&uage=55&cl=14&sl=0&dist=50&po=1&do=2&trackingid=1046138&r2s=1&_t=773166090&_r=WLM_EndText
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kafic.ba/pipermail/xine-vdpau/attachments/20090925/d8013783/attachment.html


More information about the Xine-vdpau mailing list