mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
segment: remove GST_SEEK_TYPE_CUR
This commit is contained in:
parent
8b6431a4de
commit
a70934e4ef
2 changed files with 2 additions and 27 deletions
|
@ -265,16 +265,6 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
|
|||
if (start == -1)
|
||||
start = 0;
|
||||
break;
|
||||
case GST_SEEK_TYPE_CUR:
|
||||
{
|
||||
gint64 sstart = (gint64) start;
|
||||
/* add start to currently configured segment */
|
||||
if (sstart > 0 || segment->start > -sstart)
|
||||
start = segment->start + start;
|
||||
else
|
||||
start = 0;
|
||||
break;
|
||||
}
|
||||
case GST_SEEK_TYPE_END:
|
||||
if (segment->duration != -1) {
|
||||
/* add start to total length */
|
||||
|
@ -301,16 +291,6 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
|
|||
case GST_SEEK_TYPE_SET:
|
||||
/* stop holds required value */
|
||||
break;
|
||||
case GST_SEEK_TYPE_CUR:
|
||||
if (segment->stop != -1) {
|
||||
gint64 sstop = (gint64) stop;
|
||||
if (sstop > 0 || segment->stop > -sstop)
|
||||
stop = segment->stop + stop;
|
||||
else
|
||||
stop = 0;
|
||||
} else
|
||||
stop = -1;
|
||||
break;
|
||||
case GST_SEEK_TYPE_END:
|
||||
if (segment->duration != -1) {
|
||||
stop = segment->duration + stop;
|
||||
|
|
|
@ -34,10 +34,6 @@ typedef struct _GstSegment GstSegment;
|
|||
/**
|
||||
* GstSeekType:
|
||||
* @GST_SEEK_TYPE_NONE: no change in position is required
|
||||
* @GST_SEEK_TYPE_CUR: change relative to currently configured segment. This
|
||||
* can't be used to seek relative to the current playback position - do a
|
||||
* position query, calculate the desired position and then do an absolute
|
||||
* position seek instead if that's what you want to do.
|
||||
* @GST_SEEK_TYPE_SET: absolute position is requested
|
||||
* @GST_SEEK_TYPE_END: relative position to duration is requested
|
||||
*
|
||||
|
@ -47,9 +43,8 @@ typedef struct _GstSegment GstSegment;
|
|||
typedef enum {
|
||||
/* one of these */
|
||||
GST_SEEK_TYPE_NONE = 0,
|
||||
GST_SEEK_TYPE_CUR = 1,
|
||||
GST_SEEK_TYPE_SET = 2,
|
||||
GST_SEEK_TYPE_END = 3
|
||||
GST_SEEK_TYPE_SET = 1,
|
||||
GST_SEEK_TYPE_END = 2
|
||||
} GstSeekType;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue