[snappy] cleanup usage of GST_DEBUG_CATEGORY



commit 873c9a9d6b2e4582c78d52db0b6f93b70b52a4b3
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Wed Dec 18 15:06:13 2013 -0500

    cleanup usage of GST_DEBUG_CATEGORY

 src/gst_engine.c |    6 ++++++
 src/gst_engine.h |    3 ---
 src/snappy.c     |    5 -----
 3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gst_engine.c b/src/gst_engine.c
index 36421e0..4e35425 100644
--- a/src/gst_engine.c
+++ b/src/gst_engine.c
@@ -33,6 +33,10 @@
 
 #define RECENTLY_VIEWED_MAX 50
 
+GST_DEBUG_CATEGORY_STATIC (_snappy_gst_debug);
+#define GST_CAT_DEFAULT _snappy_gst_debug
+
+
 // GstPlayFlags flags from playbin. It is the policy of GStreamer to
 // not publicly expose element-specific enums. That's why this
 // GstPlayFlags enum has been copied here.
@@ -746,8 +750,10 @@ engine_init (GstEngine * engine, GstElement * sink)
 
   gchar *version_str;
 
+  version_str = gst_version_string ();
   GST_DEBUG_CATEGORY_INIT (_snappy_gst_debug, "snappy", 0,
       "snappy media player");
+  GST_DEBUG ("Initialised %s", version_str);
 
   /* Make playbin element */
   engine->player = gst_element_factory_make ("playbin", "playbin");
diff --git a/src/gst_engine.h b/src/gst_engine.h
index 4ddab25..49ef3f0 100644
--- a/src/gst_engine.h
+++ b/src/gst_engine.h
@@ -30,9 +30,6 @@
 
 G_BEGIN_DECLS
 
-// GST_DEBUG_CATEGORY_STATIC (_snappy_gst_debug);
-// #define GST_CAT_DEFAULT _snappy_gst_debug
-
 typedef struct _GstEngine GstEngine;
 
 struct _GstEngine
diff --git a/src/snappy.c b/src/snappy.c
index c5f774b..7ec220c 100644
--- a/src/snappy.c
+++ b/src/snappy.c
@@ -223,11 +223,6 @@ main (int argc, char *argv[])
   video_texture = g_object_new (CLUTTER_TYPE_TEXTURE, "disable-slicing", TRUE,
       NULL);
 
-  version_str = gst_version_string ();
-  GST_DEBUG_CATEGORY_INIT (_snappy_gst_debug, "snappy", 0,
-      "snappy media player");
-  GST_DEBUG ("Initialised %s", version_str);
-
   /* Gstreamer engine */
   engine = g_new (GstEngine, 1);
   sink = gst_element_factory_make ("cluttersink", "video-sink");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]