mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 02:58:24 +00:00
Added partial fix so that arguments can be set.
Original commit message from CVS: Added partial fix so that arguments can be set.
This commit is contained in:
parent
100bedea62
commit
5e7263ec75
1 changed files with 12 additions and 2 deletions
|
@ -144,7 +144,7 @@ gint parse_cmdline(int argc,char *argv[],GstBin *parent) {
|
|||
else DEBUG("have src pad %s:%s\n",GST_DEBUG_PAD_NAME(srcpad));
|
||||
}
|
||||
|
||||
// element, or beginning of bin or thread
|
||||
// element or argument, or beginning of bin or thread
|
||||
} else {
|
||||
DEBUG("have element or bin/thread\n");
|
||||
// if we have a bin or thread starting
|
||||
|
@ -161,8 +161,18 @@ gint parse_cmdline(int argc,char *argv[],GstBin *parent) {
|
|||
|
||||
i += parse_cmdline(argc - i, argv + i + 1, GST_BIN (element));
|
||||
|
||||
// else we have an element
|
||||
} else if (strstr(arg, "=")) {
|
||||
gchar * argname;
|
||||
gchar * argval;
|
||||
gchar * pos = strstr(arg, "=");
|
||||
// we have an argument
|
||||
argname = g_strndup(arg, pos - arg);
|
||||
argval = pos+1;
|
||||
DEBUG("attempting to set argument '%s'\n", arg);
|
||||
gtk_object_set(GTK_OBJECT(previous),argname,argval,NULL);
|
||||
g_free(argname);
|
||||
} else {
|
||||
// we have an element
|
||||
DEBUG("attempting to create element '%s'\n",arg);
|
||||
element = gst_elementfactory_make(arg,unique_name(arg));
|
||||
VERBOSE("CREATED element %s\n",gst_element_get_name(element));
|
||||
|
|
Loading…
Reference in a new issue