]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blobdiff - tests/old/testsuite/debug/global.c
gst-indent run on core
[glsdk/gstreamer0-10.git] / tests / old / testsuite / debug / global.c
index f878706c93a60bdb2e65206370e6bd1ca8442e3f..2a397ab8ea0f26001006827d583542532122ba8c 100644 (file)
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 #define ITERATIONS     20
 
 /* stupid logging functions */
-static void    gst_debug_log_one               (GstDebugCategory *     category, 
-                                                GstDebugLevel          level,
-                                                const gchar *          file,
-                                                const gchar *          function,
-                                                gint                   line,
-                                                GObject *              object,
-                                                gchar *                message,
-                                                gpointer               thread) G_GNUC_NO_INSTRUMENT;
-static void    gst_debug_log_two               (GstDebugCategory *     category, 
-                                                GstDebugLevel          level,
-                                                const gchar *          file,
-                                                const gchar *          function,
-                                                gint                   line,
-                                                GObject *              object,
-                                                gchar *                message,
-                                                gpointer               thread) G_GNUC_NO_INSTRUMENT;
-
 static void
-gst_debug_log_one (GstDebugCategory *category, GstDebugLevel level, const gchar *file,
-                  const gchar *function, gint line, GObject *object, gchar *message,
-                  gpointer thread)
+gst_debug_log_one (GstDebugCategory * category,
+    GstDebugLevel level,
+    const gchar * file,
+    const gchar * function,
+    gint line, GObject * object, gchar * message, gpointer thread)
+    G_GNUC_NO_INSTRUMENT;
+     static void gst_debug_log_two (GstDebugCategory * category,
+    GstDebugLevel level,
+    const gchar * file,
+    const gchar * function,
+    gint line,
+    GObject * object, gchar * message, gpointer thread) G_GNUC_NO_INSTRUMENT;
+
+     static void
+        gst_debug_log_one (GstDebugCategory * category, GstDebugLevel level,
+    const gchar * file, const gchar * function, gint line, GObject * object,
+    gchar * message, gpointer thread)
 {
 }
 static void
-gst_debug_log_two (GstDebugCategory *category, GstDebugLevel level, const gchar *file,
-                  const gchar *function, gint line, GObject *object, gchar *message,
-                  gpointer thread)
+gst_debug_log_two (GstDebugCategory * category, GstDebugLevel level,
+    const gchar * file, const gchar * function, gint line, GObject * object,
+    gchar * message, gpointer thread)
 {
 }
 
@@ -69,23 +66,24 @@ thread_main (gpointer threadnum)
     g_print ("iteration %d of thread %d starting\n", i, num);
     /* do some stuff with global settings */
     gst_debug_set_default_threshold (GST_LEVEL_DEBUG);
-    gst_debug_add_log_function (gst_debug_log_one, g_thread_self());
+    gst_debug_add_log_function (gst_debug_log_one, g_thread_self ());
     gst_debug_add_log_function (gst_debug_log_two, NULL);
 
     /* reset all the stuff we did */
     gst_debug_set_default_threshold (GST_LEVEL_DEFAULT);
-    g_assert (gst_debug_remove_log_function_by_data (g_thread_self()) == 1);
+    g_assert (gst_debug_remove_log_function_by_data (g_thread_self ()) == 1);
   }
-  
+
   g_print ("Thread %d is done.\n", num);
   return threadnum;
 }
-gint 
-main (gint argc, gchar *argv[]) 
+
+gint
+main (gint argc, gchar * argv[])
 {
   gint i;
   GThread *threads[THREAD_COUNT];
-       
+
   g_print ("initializing GStreamer\n");
   gst_init (&argc, &argv);
   g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
@@ -93,10 +91,11 @@ main (gint argc, gchar *argv[])
   /* some checks for defaults */
   g_print ("Doing startup checks\n");
   g_assert (gst_debug_get_default_threshold () == GST_LEVEL_DEFAULT);
-  
+
   g_print ("creating %d threads\n", THREAD_COUNT);
   for (i = 0; i < THREAD_COUNT; i++) {
-    g_assert ((threads[i] = g_thread_create (thread_main, GINT_TO_POINTER (i), TRUE, NULL)));
+    g_assert ((threads[i] =
+           g_thread_create (thread_main, GINT_TO_POINTER (i), TRUE, NULL)));
   }
   g_print ("joining %d threads\n", THREAD_COUNT);
   for (i = 0; i < THREAD_COUNT; i++) {
@@ -106,7 +105,8 @@ main (gint argc, gchar *argv[])
   /* some checks if everything worked */
   g_print ("Doing shutdown checks\n");
   g_assert (gst_debug_get_default_threshold () == GST_LEVEL_DEFAULT);
-  g_assert (gst_debug_remove_log_function (gst_debug_log_two) == THREAD_COUNT * ITERATIONS);
-  
+  g_assert (gst_debug_remove_log_function (gst_debug_log_two) ==
+      THREAD_COUNT * ITERATIONS);
+
   return 0;
 }