Confusion regarding SEGMENT in GStreamer

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Confusion regarding SEGMENT in GStreamer

Deepak Jain
Hi,
 
I am having some confusion regarding segment.
 
Suppose I am having a file of say 1 hour duration. How many segment will be present in it?
 
 
 
Or in other words, if one segment is only present, which I think...then for live sources, segments's stop time will be undefined.
 
In that case, how we will determine that whether a particular buffer falls in our range or not since we dont have segment's stop value.
 
Thanks,
Deepak

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Confusion regarding SEGMENT in GStreamer

Edward Hervey
Hi,

  If the stop position is unspecified in a segment, then any buffer
timestamp (greater than the specified start position) is valid.

  An easier solution is to use GstSegment and gst_segment_clip to figure
out if a buffer timestamp is valid or not. Just feed the incoming
segment events into GstSegment and let it handle the logic for you :)

   Edward

On Fri, 2013-05-10 at 11:31 +0530, Deepak Jain wrote:

> Hi,
>  
> I am having some confusion regarding segment.
>  
> Suppose I am having a file of say 1 hour duration. How many segment
> will be present in it?
>  
>  
>  
> Or in other words, if one segment is only present, which I
> think...then for live sources, segments's stop time will be undefined.
>  
> In that case, how we will determine that whether a particular buffer
> falls in our range or not since we dont have segment's stop value.
>  
> Thanks,
> Deepak
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Confusion regarding SEGMENT in GStreamer

Deepak Jain
Thanks Edward for second question.
 
however u missed my first question below...
 
Suppose I am having a file of say 1 hour duration. How many segments will be present in it?
 
Thx
Deepak
 


On Fri, May 10, 2013 at 12:18 PM, Edward Hervey <[hidden email]> wrote:
Hi,

  If the stop position is unspecified in a segment, then any buffer
timestamp (greater than the specified start position) is valid.

  An easier solution is to use GstSegment and gst_segment_clip to figure
out if a buffer timestamp is valid or not. Just feed the incoming
segment events into GstSegment and let it handle the logic for you :)

   Edward

On Fri, 2013-05-10 at 11:31 +0530, Deepak Jain wrote:
> Hi,
>
> I am having some confusion regarding segment.
>
> Suppose I am having a file of say 1 hour duration. How many segment
> will be present in it?
>
>
>
> Or in other words, if one segment is only present, which I
> think...then for live sources, segments's stop time will be undefined.
>
> In that case, how we will determine that whether a particular buffer
> falls in our range or not since we dont have segment's stop value.
>
> Thanks,
> Deepak
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Confusion regarding SEGMENT in GStreamer

Edward Hervey
On Fri, 2013-05-10 at 12:34 +0530, Deepak Jain wrote:
> Thanks Edward for second question.
>  
> however u missed my first question below...
>  
> Suppose I am having a file of say 1 hour duration. How many segments
> will be present in it?

  The answer is "It depends, you can't be sure of it, you shouldn't care
about that".
  ... which is why you should not care and just use GstSegment.

    Edward

>  
> Thx
> Deepak
>  
>
>
> On Fri, May 10, 2013 at 12:18 PM, Edward Hervey <[hidden email]>
> wrote:
>         Hi,
>        
>           If the stop position is unspecified in a segment, then any
>         buffer
>         timestamp (greater than the specified start position) is
>         valid.
>        
>           An easier solution is to use GstSegment and gst_segment_clip
>         to figure
>         out if a buffer timestamp is valid or not. Just feed the
>         incoming
>         segment events into GstSegment and let it handle the logic for
>         you :)
>        
>            Edward
>        
>         On Fri, 2013-05-10 at 11:31 +0530, Deepak Jain wrote:
>         > Hi,
>         >
>         > I am having some confusion regarding segment.
>         >
>         > Suppose I am having a file of say 1 hour duration. How many
>         segment
>         > will be present in it?
>         >
>         >
>         >
>         > Or in other words, if one segment is only present, which I
>         > think...then for live sources, segments's stop time will be
>         undefined.
>         >
>         > In that case, how we will determine that whether a
>         particular buffer
>         > falls in our range or not since we dont have segment's stop
>         value.
>         >
>         > Thanks,
>         > Deepak
>        
>         > _______________________________________________
>         > gstreamer-devel mailing list
>         > [hidden email]
>         >
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>        
>        
>         _______________________________________________
>         gstreamer-devel mailing list
>         [hidden email]
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel