musepackdec: Implement SEEKING query
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 24 Jul 2009 05:40:17 +0000 (07:40 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 24 Jul 2009 05:41:57 +0000 (07:41 +0200)
ext/musepack/gstmusepackdec.c

index fea4bc0..30a34bf 100644 (file)
@@ -300,6 +300,7 @@ gst_musepackdec_get_src_query_types (GstPad * pad)
   static const GstQueryType query_types[] = {
     GST_QUERY_POSITION,
     GST_QUERY_DURATION,
+    GST_QUERY_SEEKING,
     (GstQueryType) 0
   };
 
@@ -358,6 +359,18 @@ gst_musepackdec_src_query (GstPad * pad, GstQuery * query)
       }
       break;
     }
+    case GST_QUERY_SEEKING:{
+      GstFormat fmt;
+
+      res = TRUE;
+      gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
+      if (fmt == GST_FORMAT_TIME || fmt == GST_FORMAT_DEFAULT)
+        gst_query_set_seeking (query, fmt, TRUE, 0, -1);
+      else
+        gst_query_set_seeking (query, fmt, FALSE, -1, -1);
+
+      break;
+    }
     default:
       res = gst_pad_query_default (pad, query);
       break;