GObjectClass *source_class;
GstElement *source;
GParamSpec *pspec;
+ GstQuery *query;
+ GstSchedulingFlags flags;
if (!decoder->uri)
goto no_uri;
GST_LOG_OBJECT (decoder, "found source type %s", G_OBJECT_TYPE_NAME (source));
- decoder->is_stream = IS_STREAM_URI (decoder->uri);
+ query = gst_query_new_scheduling ();
+ if (gst_element_query (source, query)) {
+ gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
+ decoder->is_stream = flags & GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED;
+ } else
+ decoder->is_stream = IS_STREAM_URI (decoder->uri);
+ gst_query_unref (query);
+
GST_LOG_OBJECT (decoder, "source is stream: %d", decoder->is_stream);
decoder->need_queue = IS_QUEUE_URI (decoder->uri);