<br><div><br></div><div>I dont think there should be case that you get new-buffer signal, but have no buffer to pull actually.</div><div><br><br><div class="gmail_quote">On Sat, Jul 30, 2011 at 3:49 PM, Erik Slagter <span dir="ltr"><<a href="mailto:erik@slagter.name">erik@slagter.name</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
I am trying to get the processing of subs working (always, not "most-of-the-time" like it is now) in a stb-player called enigma2.<br>
<br>
It uses an appsink to pull text subs from a media sink (not DVB, other media) and display the subs using OSD instead of video overlay (which can't work as video decoding takes place in hardware).<br>
<br>
At the moment the approach is used as suggested in the documentation. A signal handler for "new-buffer" is connected and subs are collected upon receipt of the signal.<br>
<br>
I appears, though, that sometimes, especially during seeking, the number of times the callback is called, does not correspond to the number of buffers actually available. As subs don't come around that often, more subs get pulled than available, making gst_app_sink_pull_buffer block, which makes the corresponding thread block. The design of the code is that this thread never can block, so the complete ui stops responding.<br>
<br>
I've been thinking of various approaches to resolve this, I'd like to have your input on this.<br>
<br>
- Is it possible to make the number of buffers available to the application, so it can decide wether to pull or skip? The api doesn't seem to make this information available though.<br>
- Is it possible to call gst_app_sink_pull_buffer without blocking. Again the api doesn't seem to support this.<br>
- Is there another trick maybe to woraround this issue? The only thing I can come up with is to add another thread that does nothing other than pulling subs, a bit of a waste and unnecessary complexity imho.<br>
<br>
Thank you for your help.<br>
<br>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>