Question about serialized events

Ikaheimonen, JP jp_ikaheimonen at mentor.com
Tue Feb 25 23:59:30 PST 2014


Sebastian Dröge queries:
>How do you insert the event into the pipeline, and what type of element is it?

A good question, which helped me find the problem. I had been thinking I'm sending the event right after the buffer, but looking more closely into the matter I find that the event was actually sent *before* the buffer. It explains the behavior. 

Thank you for guiding me to the right direction!

JP

-----Original Message-----
From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Sebastian Dröge
Sent: 25. helmikuuta 2014 22:03
To: Discussion of the development of and with GStreamer
Subject: Re: Question about serialized events

On Di, 2014-02-25 at 14:09 +0000, Ikaheimonen, JP wrote:
> Hi all,
> 
> I have an annoying problem.
> 
> 
> 
> I have a pretty much direct pipeline from a camera feed to the screen:
> 
> 
> 
> gst-launch-0.10 v4l2src ! 
> 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! 
> ffmpegcolorspace ! ximagesink
> 
> 
> 
> This gives me a pipeline v4l2src -> capsfilter -> ffmpegcsp -> ximagesink . No forking paths or threads or queues here.
> 
> 
> 
> I've added some code that sends a custom serialized downstream event in v4l2src, right after it has pushed the buffer downstream.
> 
> I would expect the event be received in ximagesink after the buffer has been received; after all, that's what I think 'serialized' means.
> 
> 
> 
> However, the custom event passes through all the elements in the pipeline without stopping anywhere; the buffers follows through in his own steady pace.
> 
> Why does this happen? Is it because my pipeline is too simple to be serialized? Is it because there's practically no synchronization anywhere in the pipeline (the data never needs to wait for some other buffer to be synchronized) ? Can I solve this problem by adding some synchronizing element in the pipeline?

How do you insert the event into the pipeline, and what type of element is it?

A serialized event (if sent from the streaming thread), will travel in the pipeline relative to the other data flow. Buffers (and other serialized events) before it will stay before it, buffers after it will stay after it.

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com Expertise, Straight from the Source


More information about the gstreamer-devel mailing list