case GST_QUERY_SCHEDULING:
{
gchar *scheme;
- gboolean pull_mode;
+ GstSchedulingFlags flags;
- pull_mode = FALSE;
+ flags = 0;
if (src->file == NULL)
goto forward_parent;
if (strcmp (scheme, "file") == 0) {
GST_LOG_OBJECT (src, "local URI, assuming random access is possible");
- pull_mode = TRUE;
+ flags |= GST_SCHEDULING_FLAG_SEEKABLE;
} else if (strcmp (scheme, "http") == 0 || strcmp (scheme, "https") == 0) {
GST_LOG_OBJECT (src, "blacklisted protocol '%s', "
"no random access possible", scheme);
}
g_free (scheme);
- gst_query_set_scheduling (query, pull_mode, pull_mode, FALSE, 1, -1, 1);
+ gst_query_set_scheduling (query, flags, 1, -1, 0);
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH);
+ if (flags & GST_SCHEDULING_FLAG_SEEKABLE)
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PULL);
+
res = TRUE;
break;
}
goto activate_push;
}
- gst_query_parse_scheduling (query, &pull_mode, NULL, NULL, NULL, NULL, NULL);
+ pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
gst_query_unref (query);
if (!pull_mode)
}
case GST_QUERY_SCHEDULING:
{
- gboolean pull_mode = FALSE;
+ gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEEKABLE, 1, -1, 0);
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH);
switch (priv->stream_type) {
case GST_APP_STREAM_TYPE_STREAM:
case GST_APP_STREAM_TYPE_SEEKABLE:
break;
case GST_APP_STREAM_TYPE_RANDOM_ACCESS:
- pull_mode = TRUE;
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PULL);
break;
}
- gst_query_set_scheduling (query, pull_mode, TRUE, FALSE, 1, -1, 1);
res = TRUE;
break;
}
}
case GST_QUERY_SCHEDULING:
{
- /* we allow limited pull base operation of which the details
- * will eventually exposed in an as of yet non-existing query.
- * Basically pulling can be done on any number of bytes as long
- * as the offset is -1 or sequentially increasing. */
- gst_query_set_scheduling (query, TRUE, FALSE, TRUE, 1, -1, 1);
+ /* We allow limited pull base operation. Basically pulling can be
+ * done on any number of bytes as long as the offset is -1 or
+ * sequentially increasing. */
+ gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEQUENTIAL, 1, -1,
+ 0);
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PULL);
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH);
res = TRUE;
break;
goto activate_push;
}
- gst_query_parse_scheduling (query, &pull_mode, NULL, NULL, NULL, NULL, NULL);
+ pull_mode = gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL);
gst_query_unref (query);
if (!pull_mode)
case GST_QUERY_SCHEDULING:
{
/* if we can operate in pull mode */
- gst_query_set_scheduling (query, src->can_activate_pull, TRUE, FALSE, 1,
- -1, 1);
+ gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_SEEKABLE, 1, -1, 0);
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH);
+ if (src->can_activate_pull)
+ gst_query_add_scheduling_mode (query, GST_PAD_MODE_PULL);
+
res = TRUE;
break;
}