From 98f65dadace6a17d43826822a8a85e32272dbeb2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 4 Jun 2001 21:02:01 +0000 Subject: [PATCH] Fixed the xid stuff and some cleanups. Original commit message from CVS: Fixed the xid stuff and some cleanups. --- tools/gstreamer-launch.c | 68 +++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/tools/gstreamer-launch.c b/tools/gstreamer-launch.c index e818815c57..5fe73997bd 100644 --- a/tools/gstreamer-launch.c +++ b/tools/gstreamer-launch.c @@ -6,24 +6,16 @@ static int launch_argc; static char **launch_argv; -int xid = 0; GtkWidget *window; -GtkWidget *hbox; GtkWidget *gtk_socket; - -typedef void (*found_handler) (GstElement *element, GtkArg *arg, void *priv); +typedef void (*found_handler) (GstElement *element, gint xid, void *priv); void arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv) { GList *children; - GstElement *child; - GtkType type; - GtkArg *args; - guint32 *flags; - guint num_args,i; gchar *ccargname; ccargname = g_strdup_printf("::%s",argname); @@ -31,19 +23,28 @@ arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv) children = gst_bin_get_list(bin); while (children) { - child = GST_ELEMENT(children->data); - children = g_list_next(children); -// fprintf(stderr,"have child \"%s\"\n",gst_object_get_path_string(GST_OBJECT(child))); + GstElement *child; + + child = GST_ELEMENT (children->data); + children = g_list_next (children); - if (GST_IS_BIN(child)) arg_search(GST_BIN(child),argname,handler,priv); + if (GST_IS_BIN (child)) arg_search (GST_BIN (child), argname, handler, priv); else { - type = GTK_OBJECT_TYPE(child); + GtkType type; + + type = GTK_OBJECT_TYPE (child); + while (type != GTK_TYPE_INVALID) { + GtkArg *args; + guint32 *flags; + guint num_args,i; + args = gtk_object_query_args(type,&flags,&num_args); + for (i=0;i