[External] Re: GstPushSrc create method

Tim Müller tim at centricular.com
Fri May 8 12:10:41 UTC 2020


On Fri, 2020-05-08 at 12:01 +0000, Dass, Reena A Collins wrote:

Hi,

> Yes it is a live source. My pipeline is loaded in a DLL, where each
> object is created using the factory. I set properties on the Source
> object when a specific function is called. The create method
> currently is blocking on that property being set.
> 
> (...)
> I can see the create being called when the Sink is done but I now I
> had to add a wait (using sleep) in the create.

That's normal and expected in this case, that ::create() is
blocking/waiting on something for data to be available. Usually that
would be blocked on a file descriptor / socket / handle or a GCond
though.

It sounds like you might want something like appsrc, where you just
call gst_app_src_push_buffer() whenever you have a new buffer
available. (Appsrc will add this to an internal queue and then signal
on a GCond to wake up the ::create() function thread if it's waiting
for a new buffer).

Cheers
 Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list