mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
playbin: Refactor autoplug-query handling a bit
This commit is contained in:
parent
15a0bb0a10
commit
db8d53bc17
1 changed files with 14 additions and 4 deletions
|
@ -4080,7 +4080,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
autoplug_query_cb (GstElement * uridecodebin, GstPad * pad, GstQuery * query,
|
autoplug_query_caps (GstElement * uridecodebin, GstPad * pad, GstQuery * query,
|
||||||
GstSourceGroup * group)
|
GstSourceGroup * group)
|
||||||
{
|
{
|
||||||
GstCaps *filter, *result = NULL;
|
GstCaps *filter, *result = NULL;
|
||||||
|
@ -4090,9 +4090,6 @@ autoplug_query_cb (GstElement * uridecodebin, GstPad * pad, GstQuery * query,
|
||||||
gint i, n;
|
gint i, n;
|
||||||
gboolean have_audio_sink = FALSE, have_video_sink = FALSE;
|
gboolean have_audio_sink = FALSE, have_video_sink = FALSE;
|
||||||
|
|
||||||
if (GST_QUERY_TYPE (query) != GST_QUERY_CAPS)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
gst_query_parse_caps (query, &filter);
|
gst_query_parse_caps (query, &filter);
|
||||||
GST_SOURCE_GROUP_LOCK (group);
|
GST_SOURCE_GROUP_LOCK (group);
|
||||||
|
|
||||||
|
@ -4243,6 +4240,19 @@ done:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
autoplug_query_cb (GstElement * uridecodebin, GstPad * pad, GstQuery * query,
|
||||||
|
GstSourceGroup * group)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
|
case GST_QUERY_CAPS:
|
||||||
|
return autoplug_query_caps (uridecodebin, pad, query, group);
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
notify_source_cb (GstElement * uridecodebin, GParamSpec * pspec,
|
notify_source_cb (GstElement * uridecodebin, GParamSpec * pspec,
|
||||||
GstSourceGroup * group)
|
GstSourceGroup * group)
|
||||||
|
|
Loading…
Reference in a new issue