ext, gst: only activate in pull mode if upstream is seekable

This commit is contained in:
Mark Nauwelaerts 2012-09-11 17:47:16 +02:00
parent 3f0a844f9d
commit b807753453
6 changed files with 12 additions and 6 deletions

View 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)

View 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);

View 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)

View 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);

View 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)

View 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);