Push source scheduling and the create function

Martin Kelly martin at surround.io
Fri May 6 17:40:51 UTC 2016


On 04/29/2016 12:19 PM, Tim Müller wrote:
> On Fri, 2016-04-29 at 08:53 -0700, Martin Kelly wrote:
>
> Hi Martin,

Thanks for your reply; sorry for missing it last week! I need to fix my 
mail filter settings.

>
> What kind of source is "video-element" ? Is it a live capture source
> such as v4l2src or such?

"video-element" is ahcsrc on Android; sorry for the vaguery. Based on 
the code, it's a live source.

>
> Is it possible there is something missing in your description of Case
> 2? I assume it's the same as Case 1 just everything in separate
> pipelines instead of separate bins in a single pipeline?

Unless I'm missing something, they are the same pipelines, just in 
separate bins in a single pipeline vs one pipeline per bin.

>
> Possibly the difference is related to the "preroll" mechanism we have
> in GStreamer. Basically, at least in a non-live pipeline sinks will
> block when they receive the first buffer, and only when *all* sinks in
> a pipeline have received a first buffer. If just one sink does not
> receive a buffer, all the other sub-pipelines will be blocked/waiting.
> I wonder if that's what you're seeing here. If you use separate
> pipelines they all operate 100% independently of course.

That explanation would make sense to me, but in this case ahcsrc is 
live, and so is my custom video element. I will try setting sync=false 
on the udpsink and see if it makes a difference.

>
> Otherwise it's hard to see what's going on without more info. Perhaps
> you could make a snapshot of the pipeline and dump it into a "dot
> graph" to see which sinks are prerolled and which are not.
>

Thanks, I will look into this.

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?


More information about the gstreamer-devel mailing list