Push source scheduling and the create function

Tim Müller tim at centricular.com
Sun May 8 14:33:53 UTC 2016


On Fri, 2016-05-06 at 10:40 -0700, Martin Kelly wrote:

Hi,

> One follow-up question I have, and something that confuses me about
> the  code of ahcsrc: exactly when does the create function get called
> for a  push source? In the case of gstahcsrc.c, this is
> gst_ahc_src_create, and  it's the function that pushes out a buffer.
> I can't find any logic  inside the ahcsrc plugin to indicate
> scheduling, which tells me the  surround pipeline must somehow decide
> this. How does that scheduling work?

The source base class will call the create function over and over again
in a loop. The function is expected to block until it can produce a
buffer (or is told to shut down/unblock). In case of video capture
sources it will depend on settings, sensor and lighting and such how
quickly a new frame will be produced. The throttling/scheduling is
usually inherent in the capture API and the source simply blocks until
it gets a new frame.

Cheers
 -Tim

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




More information about the gstreamer-devel mailing list