diff options
author | Erik Walthinsen <omega@temple-baptist.org> | 2001-01-01 00:17:21 +0000 |
---|---|---|
committer | Erik Walthinsen <omega@temple-baptist.org> | 2001-01-01 00:17:21 +0000 |
commit | e0aa5bae14231b3c2022736a1279ba02e4637dba (patch) | |
tree | 5af59610e1dcd787f25c373962317b2c33ba376c /gst/gstcpu.c | |
parent | 527525a282c56643ea40286928c72dc7fdbecc35 (diff) |
Cleaned up INFO system some more, added API to select categories, modified the printout function to print cleanly for...
Original commit message from CVS:
Cleaned up INFO system some more, added API to select categories, modified
the printout function to print cleanly for GST_INIT info (the default min)
and spew function:line debug_string [element] for everything else.
Eventually could make even that configurable easily enough, just check
against another bitmap instead of checking for == GST_INIT.
Diffstat (limited to 'gst/gstcpu.c')
-rw-r--r-- | gst/gstcpu.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gst/gstcpu.c b/gst/gstcpu.c index 52758a34e9..9ccba53a54 100644 --- a/gst/gstcpu.c +++ b/gst/gstcpu.c @@ -37,29 +37,39 @@ void gst_cpuid_i386(int,long *,long *,long *,long *); #define gst_cpuid(o,a,b,c,d) (void)(a);(void)(b);(void)(c); #endif +static gchar *stringcat (gchar *a,gchar *b) { + gchar *c; + if (a) { + c = g_strconcat(a,b); + g_free(a); + } else + c = g_strdup(b); + return c; +} + void _gst_cpu_initialize (void) { + gchar *featurelist = NULL; + long eax=0, ebx=0, ecx=0, edx=0; gst_cpuid(1, &eax, &ebx, &ecx, &edx); - g_print("CPU features : "); - if (edx & (1<<23)) { _gst_cpu_flags |= GST_CPU_FLAG_MMX; - g_print("MMX "); + featurelist = stringcat(featurelist,"MMX "); } if (edx & (1<<25)) { _gst_cpu_flags |= GST_CPU_FLAG_SSE; - g_print("SSE "); + featurelist = stringcat(featurelist,"SSE "); } if (!_gst_cpu_flags) { - g_print("NONE"); + featurelist = stringcat(featurelist,"NONE"); } - g_print("\n"); + INFO(GST_INFO_GST_INIT, "CPU features: %s",featurelist); } GstCPUFlags |