Probing the pad of the Gstreamer element

Tim Müller tim at centricular.com
Wed May 21 06:25:26 PDT 2014


On Wed, 2014-05-21 at 04:53 -0700, Manoj89 wrote:

Hi,

>     Can anybody say me is there exists any method to get the particular
> segment data like segment.start,segment.stop,segment.base etc from the
> source element when it triggers the segment event?
> 
> As I know we can probe the pad for the upstream and downstream events.while
> probing the pad is it possible to get the segment?

The segment event is a 'sticky' event, so you can just get it using:

 event = gst_pad_get_sticky_event (pad, GST_EVENT_SEGMENT, 0);

or you can run a segment query on the pad, see gst_query_new_segment()
etc.

Cheers
 -Tim

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



More information about the gstreamer-devel mailing list