mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gst/: remove useless _gst_progname stuff
Original commit message from CVS: * gst/gst.c: (init_post): * gst/gstinfo.c: remove useless _gst_progname stuff * tools/gst-inspect.c: (print_field), (print_caps): improve caps output
This commit is contained in:
parent
7f6d9dcadf
commit
ab8fc54334
4 changed files with 33 additions and 24 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-04-29 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/gst.c: (init_post):
|
||||||
|
* gst/gstinfo.c:
|
||||||
|
remove useless _gst_progname stuff
|
||||||
|
* tools/gst-inspect.c: (print_field), (print_caps):
|
||||||
|
improve caps output
|
||||||
|
|
||||||
2004-04-28 David Schleef <ds@schleef.org>
|
2004-04-28 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
Disable parsing of a lot of files that aren't part of the
|
Disable parsing of a lot of files that aren't part of the
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#define MAX_PATH_SPLIT 16
|
#define MAX_PATH_SPLIT 16
|
||||||
#define GST_PLUGIN_SEPARATOR ","
|
#define GST_PLUGIN_SEPARATOR ","
|
||||||
|
|
||||||
gchar *_gst_progname;
|
|
||||||
|
|
||||||
#ifndef GST_DISABLE_REGISTRY
|
#ifndef GST_DISABLE_REGISTRY
|
||||||
gboolean _gst_registry_auto_load = TRUE;
|
gboolean _gst_registry_auto_load = TRUE;
|
||||||
static GstRegistry *_global_registry;
|
static GstRegistry *_global_registry;
|
||||||
|
@ -636,9 +634,6 @@ init_post (void)
|
||||||
gst_trace_set_default (gst_trace);
|
gst_trace_set_default (gst_trace);
|
||||||
}
|
}
|
||||||
#endif /* GST_DISABLE_TRACE */
|
#endif /* GST_DISABLE_TRACE */
|
||||||
if (_gst_progname == NULL) {
|
|
||||||
_gst_progname = g_strdup ("gstprog");
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,6 @@ dladdr (void *address, Dl_info * dl)
|
||||||
#endif /* __sgi__ */
|
#endif /* __sgi__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern gchar *_gst_progname;
|
|
||||||
|
|
||||||
static void gst_debug_reset_threshold (gpointer category, gpointer unused);
|
static void gst_debug_reset_threshold (gpointer category, gpointer unused);
|
||||||
static void gst_debug_reset_all_thresholds (void);
|
static void gst_debug_reset_all_thresholds (void);
|
||||||
|
|
||||||
|
|
|
@ -33,30 +33,38 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
print_field (GQuark field, GValue * value, gpointer pfx)
|
||||||
|
{
|
||||||
|
gchar *str = gst_value_serialize (value);
|
||||||
|
|
||||||
|
g_print ("%s %15s: %s\n", (gchar *) pfx, g_quark_to_string (field), str);
|
||||||
|
g_free (str);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_caps (const GstCaps * caps, const gchar * pfx)
|
print_caps (const GstCaps * caps, const gchar * pfx)
|
||||||
{
|
{
|
||||||
char *s, *tmp;
|
guint i;
|
||||||
char **v;
|
|
||||||
|
|
||||||
s = gst_caps_to_string (caps);
|
g_return_if_fail (caps != NULL);
|
||||||
|
|
||||||
tmp = g_strdup_printf ("\n %s", pfx);
|
if (gst_caps_is_any (caps)) {
|
||||||
v = g_strsplit (s, ", ", -1);
|
g_print ("%sANY\n", pfx);
|
||||||
g_free (s);
|
return;
|
||||||
s = g_strjoinv (tmp, v);
|
}
|
||||||
g_strfreev (v);
|
if (gst_caps_is_empty (caps)) {
|
||||||
g_free (tmp);
|
g_print ("%sEMPTY\n", pfx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tmp = g_strdup_printf ("\n%s", pfx);
|
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||||
v = g_strsplit (s, "; ", -1);
|
GstStructure *structure = gst_caps_get_structure (caps, i);
|
||||||
g_free (s);
|
|
||||||
s = g_strjoinv (tmp, v);
|
|
||||||
g_free (tmp);
|
|
||||||
g_strfreev (v);
|
|
||||||
|
|
||||||
g_print ("%s%s\n", pfx, s);
|
g_print ("%s%s\n", pfx, gst_structure_get_name (structure));
|
||||||
g_free (s);
|
gst_structure_foreach (structure, print_field, (gpointer) pfx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue