segment: remove GST_SEEK_TYPE_CUR
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 28 Oct 2011 13:52:58 +0000 (15:52 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 28 Oct 2011 14:23:49 +0000 (16:23 +0200)
gst/gstsegment.c
gst/gstsegment.h

index 456bed5..8a72c00 100644 (file)
@@ -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;
index db5e1ad..89addee 100644 (file)
@@ -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;
 
 /**