modified cmdlien code to take both 0xHEX and dec, and added an INFO line in gst_pad_connect()

Original commit message from CVS:
modified cmdlien code to take both 0xHEX and dec, and added an INFO line in gst_pad_connect()
This commit is contained in:
Erik Walthinsen 2001-01-01 04:41:40 +00:00
parent 3c883fb43a
commit 1bf936db6d
2 changed files with 16 additions and 3 deletions

View file

@ -99,7 +99,12 @@ gst_init_check (int *argc,
if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) { if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) {
guint32 val; guint32 val;
sscanf ((*argv)[i]+16, "%08x", &val); // handle either 0xHEX or dec
if (*((*argv)[i]+17) == 'x') {
sscanf ((*argv)[i]+18, "%08x", &val);
} else {
sscanf ((*argv)[i]+16, "%d", &val);
}
gst_info_set_categories (val); gst_info_set_categories (val);
@ -108,7 +113,12 @@ gst_init_check (int *argc,
else if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) { else if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) {
guint32 val; guint32 val;
sscanf ((*argv)[i]+16, "%08x", &val); // handle either 0xHEX or dec
if (*((*argv)[i]+17) == 'x') {
sscanf ((*argv)[i]+18, "%08x", &val);
} else {
sscanf ((*argv)[i]+16, "%d", &val);
}
//FIXME //FIXME
//gst_info_set_categories (val); //gst_info_set_categories (val);
@ -146,7 +156,7 @@ gst_init_check (int *argc,
g_print ("\nGStreamer info/debug FLAGS (to be OR'ed)\n"); g_print ("\nGStreamer info/debug FLAGS (to be OR'ed)\n");
for (i = 0; i<GST_CAT_MAX_CATEGORY; i++) { for (i = 0; i<GST_CAT_MAX_CATEGORY; i++) {
g_print (" %08x %s %s\n", 1<<i, g_print (" 0x%08x %s %s\n", 1<<i,
(gst_info_get_categories() & (1<<i)?"(enabled)":" "), (gst_info_get_categories() & (1<<i)?"(enabled)":" "),
gst_get_category_name (i)); gst_get_category_name (i));
} }

View file

@ -510,6 +510,9 @@ gst_pad_connect (GstPad *srcpad,
/* set the connected flag */ /* set the connected flag */
/* FIXME: set connected flag */ /* FIXME: set connected flag */
GST_INFO (GST_CAT_ELEMENT_PADS, "connected %s:%s and %s:%s",
GST_DEBUG_PAD_NAME(srcpad), GST_DEBUG_PAD_NAME(sinkpad));
} }
/** /**