mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
parent
8c26c22f2c
commit
ef9ad30fde
1 changed files with 15 additions and 6 deletions
|
@ -235,6 +235,7 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
GST_DEBUG_FUNCPTR (gst_type_find_element_change_state);
|
GST_DEBUG_FUNCPTR (gst_type_find_element_change_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_type_find_element_init (GstTypeFindElement * typefind,
|
gst_type_find_element_init (GstTypeFindElement * typefind,
|
||||||
GstTypeFindElementClass * g_class)
|
GstTypeFindElementClass * g_class)
|
||||||
|
@ -278,6 +279,7 @@ gst_type_find_element_init (GstTypeFindElement * typefind,
|
||||||
|
|
||||||
typefind->store = NULL;
|
typefind->store = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_type_find_element_dispose (GObject * object)
|
gst_type_find_element_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
|
@ -287,6 +289,10 @@ gst_type_find_element_dispose (GObject * object)
|
||||||
gst_buffer_unref (typefind->store);
|
gst_buffer_unref (typefind->store);
|
||||||
typefind->store = NULL;
|
typefind->store = NULL;
|
||||||
}
|
}
|
||||||
|
if (typefind->force_caps) {
|
||||||
|
gst_caps_unref (typefind->force_caps);
|
||||||
|
typefind->force_caps = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
@ -318,6 +324,7 @@ gst_type_find_element_set_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_type_find_element_get_property (GObject * object, guint prop_id,
|
gst_type_find_element_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
|
@ -607,8 +614,8 @@ gst_type_find_element_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_type_find_guess_by_extension (GstTypeFindElement *typefind, GstPad *pad,
|
gst_type_find_guess_by_extension (GstTypeFindElement * typefind, GstPad * pad,
|
||||||
GstTypeFindProbability *probability)
|
GstTypeFindProbability * probability)
|
||||||
{
|
{
|
||||||
GstQuery *query;
|
GstQuery *query;
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
|
@ -640,9 +647,11 @@ gst_type_find_guess_by_extension (GstTypeFindElement *typefind, GstPad *pad,
|
||||||
if (find < 0)
|
if (find < 0)
|
||||||
goto no_extension;
|
goto no_extension;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (typefind, "found extension %s", &uri[find+1]);
|
GST_DEBUG_OBJECT (typefind, "found extension %s", &uri[find + 1]);
|
||||||
|
|
||||||
caps = gst_type_find_helper_for_extension (GST_OBJECT_CAST (typefind), &uri[find+1]);
|
caps =
|
||||||
|
gst_type_find_helper_for_extension (GST_OBJECT_CAST (typefind),
|
||||||
|
&uri[find + 1]);
|
||||||
if (caps)
|
if (caps)
|
||||||
*probability = GST_TYPE_FIND_MAXIMUM;
|
*probability = GST_TYPE_FIND_MAXIMUM;
|
||||||
|
|
||||||
|
@ -818,7 +827,7 @@ gst_type_find_element_activate (GstPad * pad)
|
||||||
3. deactivate pull mode.
|
3. deactivate pull mode.
|
||||||
4. src pad might have been activated push by the state change. deactivate.
|
4. src pad might have been activated push by the state change. deactivate.
|
||||||
5. if we didn't find any caps, try getting the uri extension by doing an uri
|
5. if we didn't find any caps, try getting the uri extension by doing an uri
|
||||||
query.
|
query.
|
||||||
6. if we didn't find any caps, fail.
|
6. if we didn't find any caps, fail.
|
||||||
7. emit have-type; maybe the app connected the source pad to something.
|
7. emit have-type; maybe the app connected the source pad to something.
|
||||||
8. if the sink pad is activated, we are in pull mode. succeed.
|
8. if the sink pad is activated, we are in pull mode. succeed.
|
||||||
|
|
Loading…
Reference in a new issue