How to force a GstBufferPool flush?
Nicolas Dufresne
nicolas at ndufresne.ca
Tue Apr 25 14:35:15 UTC 2017
Le mardi 25 avril 2017 à 10:49 +0000, Jorge Fernandez Monteagudo a
écrit :
> Hi all!
>
> I'm using an old 1.4.5 gstreamer release. I have sometimes a deadlock
> in the 'default_acquire_buffer()' method from gstbufferpool.c when a
> video playing is
> already ended. The code has a comment:
Since 1.4, we added the method gst_buffer_pool_set_flushing(). Setting
the flusing state to TRUE will unblock all calls to acquire, and will
make future acquire() call to return GST_FLOW_FLUSHING. This was added
since previously the only way to unblock a pool was
gst_buffer_set_active(), which has the side effect of freeing all the
buffers. You have to be own of the pool (that element that activated
that pool) to do so. In general, you will combined this with
implementation of unclock/unclock_stop method in various base classes.
>
> /* now we release the control socket, we wait for a buffer
> release or
> * flushing */
> gst_poll_read_control (pool->priv->poll);
> GST_LOG_OBJECT (pool, "waiting for free buffers or flushing");
> gst_poll_wait (priv->poll, GST_CLOCK_TIME_NONE);
> gst_poll_write_control (pool->priv->poll);
>
> and I would like to know how to force a flush in order to get the
> control back to my application.
> In the same file is the 'gst_buffer_pool_set_flushing' method. What's
> the way to get a flush done?
> With gst_event_new_flush_start()/stop() methods? With
> 'gst_bus_set_flushing()'?
>
> Thanks!
> Jorge
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170425/918eb8fe/attachment-0001.sig>
More information about the gstreamer-devel
mailing list