mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
element: make post_message and query more alike
This commit is contained in:
parent
f810565ca7
commit
28b0cb5721
1 changed files with 7 additions and 7 deletions
|
@ -1649,20 +1649,19 @@ gst_element_default_query (GstElement * element, GstQuery * query)
|
||||||
gboolean
|
gboolean
|
||||||
gst_element_query (GstElement * element, GstQuery * query)
|
gst_element_query (GstElement * element, GstQuery * query)
|
||||||
{
|
{
|
||||||
GstElementClass *oclass;
|
GstElementClass *klass;
|
||||||
gboolean result = FALSE;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
||||||
g_return_val_if_fail (query != NULL, FALSE);
|
g_return_val_if_fail (query != NULL, FALSE);
|
||||||
|
|
||||||
oclass = GST_ELEMENT_GET_CLASS (element);
|
klass = GST_ELEMENT_GET_CLASS (element);
|
||||||
|
if (klass->query) {
|
||||||
if (oclass->query) {
|
|
||||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "send query on element %s",
|
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "send query on element %s",
|
||||||
GST_ELEMENT_NAME (element));
|
GST_ELEMENT_NAME (element));
|
||||||
result = oclass->query (element, query);
|
return klass->query (element, query);
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1721,6 +1720,7 @@ gst_element_post_message (GstElement * element, GstMessage * message)
|
||||||
GstElementClass *klass;
|
GstElementClass *klass;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
||||||
|
g_return_val_if_fail (message != NULL, FALSE);
|
||||||
|
|
||||||
klass = GST_ELEMENT_GET_CLASS (element);
|
klass = GST_ELEMENT_GET_CLASS (element);
|
||||||
if (klass->post_message)
|
if (klass->post_message)
|
||||||
|
|
Loading…
Reference in a new issue