Information About Segment Event
Thiago Santos
ts.santos at sisa.samsung.com
Tue May 20 08:43:09 PDT 2014
On 05/20/2014 09:03 AM, Manoj89 wrote:
> Hi,
> I wanted to know whether the segment event is fired by the source or
> demuxer element by itself or we can make a particular element in the
> pipeline(for ex : source) to send an segment event.
Every element must send a segment event before pushing data. What
happens is that elements can also just relay the segment they receive on
the sink pad downstream without modification. So the answer is yes as
every element must push a segment event before data for each of its
source pads.
I guess your question is more related to when just relay upstream
segment or create a new one, this depends on what makes sense for your
pipeline/element. I'll give you the example of playback of a file. The
filesrc will create and push a segment event in *bytes* as this is how
the data from a filesrc is limited, from byte at position A to byte at
position B, respectively the start and stop position in GstSegment.
Those are usually 0 and -1 as you usually want to read the whole file
but I guess you get the point. This segment event will just be forwarded
by every element in the pipeline until it reaches the demuxer, the
demuxer will get the file input and convert that into
video/audio/subtitle streams, at this point it doesn't make sense to
"speak" in bytes anymore but in "time" as this is much more useful than
knowing the byte range of a certain video/audio sample in the original
file. So the demuxer creates a new segment in *time* format and pushes
it on its source pads and it doesn't forward the segment it received in
*bytes* because that doesn't make sense for its streams.
Of course you can have source elements that use *time* segments like
camera sources (v4l2src). So it all depends on your elements and
pipeline. Do you have a particular scenario in mind?
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Information-About-Segment-Event-tp4667048.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley
More information about the gstreamer-devel
mailing list