g_free(set);
}
-static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
+static void gst_parse_new_child (GstChildProxy *child_proxy, GObject *object,
const gchar * name, gpointer data);
static void gst_parse_add_delayed_set (GstElement *element, gchar *name, gchar *value_str)
/* Cases 1,2: The child just added corresponds to this delayed set */
if ((strlen (set->name) > (len+2)) && !strncmp (set->name, name, len)
- && !strncmp (&set->name[len], "::", 2)) {
+ && !strncmp (&set->name[len], "::", 2)) {
gchar *children = NULL;
gchar *prop = NULL;
GObject *child = NULL;
if (!gst_parse_separate_prop_from_children (set->name, &children, &prop)) {
- /* Malformed property name, ignore */
- return;
+ /* Malformed property name, ignore */
+ return;
}
child = gst_child_proxy_get_child_by_name_recurse (child_proxy, children);
/* Case 1: A child in the hierarchy does not exist yet, add a new delayed set */
if (NULL == child) {
- gst_parse_add_delayed_set (GST_ELEMENT (child_proxy), set->name, set->value_str);
+ gst_parse_add_delayed_set (GST_ELEMENT (child_proxy), set->name, set->value_str);
}
/* Case 2: The target child exists already but there's no such property */
else {
- gst_object_unref (child);
- GST_ELEMENT_WARNING(GST_ELEMENT (child_proxy), PARSE, NO_SUCH_PROPERTY,
- (_("No such property.")), (_("no property \"%s\" in element \"%s\""),
- set->name, GST_ELEMENT_NAME(child_proxy)));
+ gst_object_unref (child);
+ GST_ELEMENT_WARNING(GST_ELEMENT (child_proxy), PARSE, NO_SUCH_PROPERTY,
+ (_("No such property.")), (_("no property \"%s\" in element \"%s\""),
+ set->name, GST_ELEMENT_NAME(child_proxy)));
}
}
/* Case 3: The child just added does not correspond to this delayed set, just ignore
not_a_preset:
SET_ERROR (graph->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
_("Element \"%s\" is not a GstPreset"),
- GST_ELEMENT_NAME (element));
+ GST_ELEMENT_NAME (element));
goto out;
error:
SET_ERROR (graph->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
_("could not set preset \"%s\" in element \"%s\""),
- value, GST_ELEMENT_NAME (element));
+ value, GST_ELEMENT_NAME (element));
goto out;
}
GstElement *ret = NULL;
if (!factory) {
- SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), data->factory_name);
+ SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), data->factory_name);
return NULL;
}
gchar *children = NULL;
gchar *property = NULL;
if (!gst_parse_separate_prop_from_children (pp->name, &children, &property)) {
- /* malformed childproxy path, skip */
- continue;
+ /* malformed childproxy path, skip */
+ continue;
}
target = gst_child_proxy_get_child_by_name_recurse (GST_CHILD_PROXY (ret), children);
g_free (property);
if (target == NULL) {
- gst_parse_add_delayed_set (ret, pp->name, pp->value);
+ gst_parse_add_delayed_set (ret, pp->name, pp->value);
} else {
- gst_object_unref (target);
- SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
- _("no property \"%s\" in element \"%s\""), pp->name, \
- GST_ELEMENT_NAME (ret));
- goto done;
+ gst_object_unref (target);
+ SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
+ _("no property \"%s\" in element \"%s\""), pp->name, \
+ GST_ELEMENT_NAME (ret));
+ goto done;
}
} else {
GValue v = { 0, };
the child was found, we fail since the property doesn't exist.
*/
if (!gst_parse_child_proxy_find_child (GST_CHILD_PROXY (element), value)) {
- gst_parse_add_delayed_set (element, value, pos);
+ gst_parse_add_delayed_set (element, value, pos);
} else {
- goto error;
+ goto error;
}
}
} else {
error:
SET_ERROR (graph->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
_("could not set property \"%s\" in element \"%s\" to \"%s\""),
- value, GST_ELEMENT_NAME (element), pos);
+ value, GST_ELEMENT_NAME (element), pos);
goto out;
}
GST_CAT_INFO (GST_CAT_PIPELINE,
"trying delayed linking %s " PRETTY_PAD_NAME_FMT " to " PRETTY_PAD_NAME_FMT,
- link->all_pads ? "all pads" : "one pad",
+ link->all_pads ? "all pads" : "one pad",
PRETTY_PAD_NAME_ARGS (src, link->src_pad),
PRETTY_PAD_NAME_ARGS (link->sink, link->sink_pad));
* unlocking states */
GST_CAT_DEBUG (GST_CAT_PIPELINE,
"delayed linking %s " PRETTY_PAD_NAME_FMT " to " PRETTY_PAD_NAME_FMT " worked",
- link->all_pads ? "all pads" : "one pad",
- PRETTY_PAD_NAME_ARGS (src, link->src_pad),
+ link->all_pads ? "all pads" : "one pad",
+ PRETTY_PAD_NAME_ARGS (src, link->src_pad),
PRETTY_PAD_NAME_ARGS (link->sink, link->sink_pad));
/* releases 'link' */
if (!link->all_pads) {
data->sink = sink;
data->sink_pad = g_strdup (sink_pad);
if (caps) {
- data->caps = gst_caps_copy (caps);
+ data->caps = gst_caps_copy (caps);
} else {
- data->caps = NULL;
+ data->caps = NULL;
}
data->pad_added_signal_id = g_signal_connect_data (src, "pad-added",
G_CALLBACK (gst_parse_found_pad), data,
if (gst_parse_perform_delayed_link (src,
srcs ? (const gchar *) srcs->data : NULL,
sink, sinks ? (const gchar *) sinks->data : NULL, link->caps,
- link->all_pads) || link->all_pads) {
+ link->all_pads) || link->all_pads) {
goto success;
} else {
goto error;
} else {
if (gst_parse_perform_delayed_link (src, src_pad,
sink, sink_pad,
- link->caps, link->all_pads)) {
- continue;
+ link->caps, link->all_pads)) {
+ continue;
} else {
goto error;
}