mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
parse: Backport "Don't do delayed property setting..."
Backport "parse: Don't do delayed property setting for top-level properties." Modified version of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832 that only warns when trying to set a non-existent property instead of generating a hard parse error, to preserve compatibility. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/839>
This commit is contained in:
parent
23171cb6af
commit
123280064e
1 changed files with 7 additions and 1 deletions
|
@ -398,7 +398,7 @@ static void gst_parse_element_set (gchar *value, GstElement *element, graph_t *g
|
||||||
}
|
}
|
||||||
gst_parse_unescape (pos);
|
gst_parse_unescape (pos);
|
||||||
|
|
||||||
if (GST_IS_CHILD_PROXY (element)) {
|
if (GST_IS_CHILD_PROXY (element) && strstr (value, "::")) {
|
||||||
if (!gst_child_proxy_lookup (GST_CHILD_PROXY (element), value, &target, &pspec)) {
|
if (!gst_child_proxy_lookup (GST_CHILD_PROXY (element), value, &target, &pspec)) {
|
||||||
/* do a delayed set */
|
/* do a delayed set */
|
||||||
gst_parse_add_delayed_set (element, value, pos);
|
gst_parse_add_delayed_set (element, value, pos);
|
||||||
|
@ -408,6 +408,12 @@ static void gst_parse_element_set (gchar *value, GstElement *element, graph_t *g
|
||||||
if (pspec != NULL) {
|
if (pspec != NULL) {
|
||||||
target = G_OBJECT (g_object_ref (element));
|
target = G_OBJECT (g_object_ref (element));
|
||||||
GST_CAT_LOG_OBJECT (GST_CAT_PIPELINE, target, "found %s property", value);
|
GST_CAT_LOG_OBJECT (GST_CAT_PIPELINE, target, "found %s property", value);
|
||||||
|
} else if (GST_IS_CHILD_PROXY (element)) {
|
||||||
|
/* https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832 made it
|
||||||
|
* a hard error to try and set a top-level property that doesn't exist on a bin,
|
||||||
|
* but here in 1.18 we just want to output a debug ERROR but not fail */
|
||||||
|
GST_ERROR("No property \"%s\" in element \"%s\" that is a child proxy. This will be a hard error in 1.20",
|
||||||
|
value, GST_ELEMENT_NAME (element));
|
||||||
} else {
|
} else {
|
||||||
SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
|
SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
|
||||||
_("no property \"%s\" in element \"%s\""), value, \
|
_("no property \"%s\" in element \"%s\""), value, \
|
||||||
|
|
Loading…
Reference in a new issue