ext, gst: only activate in pull mode if upstream is seekable
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 11 Sep 2012 15:47:16 +0000 (17:47 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 11 Sep 2012 15:47:33 +0000 (17:47 +0200)
ext/modplug/gstmodplug.cc
ext/resindvd/gstmpegdemux.c
gst/asfmux/gstasfparse.c
gst/mpegdemux/gstmpegdemux.c
gst/mpegtsdemux/mpegtsbase.c
gst/rawparse/gstrawparse.c

index 103812eb1d525729412d1e416f7c23d74f5c4638..e2a178649ea65510f0e22fe0defa9539025667e5 100644 (file)
@@ -565,7 +565,8 @@ gst_modplug_sinkpad_activate (GstPad * sinkpad, GstObject * parent)
     goto activate_push;
   }
 
-  pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
+  pull_mode = gst_query_has_scheduling_mode_with_flags (query,
+      GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
   gst_query_unref (query);
 
   if (!pull_mode)
index 34d500504b2bb5a030fc0d36fe42faacb5fb58ea..a687707ae39acebea62bcddd583a30532c8a01a7 100644 (file)
@@ -2040,7 +2040,8 @@ gst_flups_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
   GstQuery *query = gst_query_new_scheduling ();
 
   if (gst_pad_peer_query (sinkpad, query)) {
-    if (gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL)) {
+    if (gst_query_has_scheduling_mode_with_flags (query,
+            GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE)) {
       res = gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PULL, TRUE);
     } else {
       res = gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PUSH, TRUE);
index 0cf2671eeda5c7f09084be476e8c5b0efbcfdaa1..25dd3e761fa2d86b87835129c0618627228a30e5 100644 (file)
@@ -74,7 +74,8 @@ gst_asf_parse_sink_activate (GstPad * sinkpad, GstObject * parent)
     goto activate_push;
   }
 
-  pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
+  pull_mode = gst_query_has_scheduling_mode_with_flags (query,
+      GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
   gst_query_unref (query);
 
   if (!pull_mode)
index 578344c59614478155f2230a395c24a652d6f063..66d05eec8550e02a1592e94288f15101456e3a0f 100644 (file)
@@ -2862,7 +2862,8 @@ gst_flups_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
   GstQuery *query = gst_query_new_scheduling ();
 
   if (gst_pad_peer_query (sinkpad, query)) {
-    if (gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL)) {
+    if (gst_query_has_scheduling_mode_with_flags (query,
+            GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE)) {
       res = gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PULL, TRUE);
     } else {
       res = gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PUSH, TRUE);
index 7dee9f145c0298f13890c40759e84a506db714bb..07db398905bf5b4a5f2ced5e55db0aaa0ec20548 100644 (file)
@@ -1752,7 +1752,8 @@ mpegts_base_sink_activate (GstPad * sinkpad, GstObject * parent)
     goto activate_push;
   }
 
-  pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
+  pull_mode = gst_query_has_scheduling_mode_with_flags (query,
+      GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
   gst_query_unref (query);
 
   if (!pull_mode)
index 2e3765cbb2299cdfd470f19ab2a0b0cbdf823d46..f315d5ed650e0852489cd9023ad999151f4d24a4 100644 (file)
@@ -461,7 +461,8 @@ gst_raw_parse_sink_activate (GstPad * sinkpad, GstObject * parent)
   query = gst_query_new_scheduling ();
 
   if (gst_pad_peer_query (sinkpad, query))
-    pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
+    pull_mode = gst_query_has_scheduling_mode_with_flags (query,
+        GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
 
   gst_query_unref (query);