server: improve debugging in various objects
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 12 Jan 2011 17:14:48 +0000 (18:14 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 12 Jan 2011 17:14:48 +0000 (18:14 +0100)
gst/rtsp-server/rtsp-media-factory-uri.c
gst/rtsp-server/rtsp-media-factory.c
gst/rtsp-server/rtsp-media-mapping.c
gst/rtsp-server/rtsp-media.c
gst/rtsp-server/rtsp-session-pool.c
gst/rtsp-server/rtsp-session.c

index c0932b9..bb0d661 100644 (file)
@@ -60,7 +60,7 @@ free_data (FactoryData * data)
 
 static const gchar *factory_key = "GstRTSPMediaFactoryURI";
 
-GST_DEBUG_CATEGORY (rtsp_media_factory_uri_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_media_factory_uri_debug);
 #define GST_CAT_DEFAULT rtsp_media_factory_uri_debug
 
 static void gst_rtsp_media_factory_uri_get_property (GObject * object,
index 2fe309d..f4045e8 100644 (file)
@@ -32,7 +32,7 @@ enum
   PROP_LAST
 };
 
-GST_DEBUG_CATEGORY (rtsp_media_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_media_debug);
 #define GST_CAT_DEFAULT rtsp_media_debug
 
 static void gst_rtsp_media_factory_get_property (GObject * object, guint propid,
@@ -102,7 +102,8 @@ gst_rtsp_media_factory_class_init (GstRTSPMediaFactoryClass * klass)
   klass->configure = default_configure;
   klass->create_pipeline = default_create_pipeline;
 
-  GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmedia", 0, "GstRTSPMedia");
+  GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmediafactory", 0,
+      "GstRTSPMediaFactory");
 }
 
 static void
index d65f41c..5943c30 100644 (file)
@@ -21,7 +21,7 @@
 
 G_DEFINE_TYPE (GstRTSPMediaMapping, gst_rtsp_media_mapping, G_TYPE_OBJECT);
 
-GST_DEBUG_CATEGORY_EXTERN (rtsp_media_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_media_debug);
 #define GST_CAT_DEFAULT rtsp_media_debug
 
 static void gst_rtsp_media_mapping_finalize (GObject * obj);
@@ -39,11 +39,16 @@ gst_rtsp_media_mapping_class_init (GstRTSPMediaMappingClass * klass)
   gobject_class->finalize = gst_rtsp_media_mapping_finalize;
 
   klass->find_media = find_media;
+
+  GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmediamapping", 0,
+      "GstRTSPMediaMapping");
 }
 
 static void
 gst_rtsp_media_mapping_init (GstRTSPMediaMapping * mapping)
 {
+  GST_DEBUG_OBJECT (mapping, "created");
+
   mapping->mappings = g_hash_table_new_full (g_str_hash, g_str_equal,
       g_free, g_object_unref);
 }
@@ -53,6 +58,8 @@ gst_rtsp_media_mapping_finalize (GObject * obj)
 {
   GstRTSPMediaMapping *mapping = GST_RTSP_MEDIA_MAPPING (obj);
 
+  GST_DEBUG_OBJECT (mapping, "finalized");
+
   g_hash_table_unref (mapping->mappings);
 
   G_OBJECT_CLASS (gst_rtsp_media_mapping_parent_class)->finalize (obj);
index cd1e42a..7d6c76c 100644 (file)
@@ -53,7 +53,7 @@ enum
   SIGNAL_LAST
 };
 
-GST_DEBUG_CATEGORY_EXTERN (rtsp_media_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_media_debug);
 #define GST_CAT_DEFAULT rtsp_media_debug
 
 static GQuark ssrc_stream_map_key;
@@ -134,6 +134,8 @@ gst_rtsp_media_class_init (GstRTSPMediaClass * klass)
   ssrc_stream_map_key = g_quark_from_static_string ("GstRTSPServer.stream");
 
   gst_element_register (NULL, "rtspfunnel", GST_RANK_NONE, RTSP_TYPE_FUNNEL);
+
+  GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmedia", 0, "GstRTSPMedia");
 }
 
 static void
index cbaf71e..36c0211 100644 (file)
@@ -30,7 +30,7 @@ enum
   PROP_LAST
 };
 
-GST_DEBUG_CATEGORY (rtsp_session_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_session_debug);
 #define GST_CAT_DEFAULT rtsp_session_debug
 
 static void gst_rtsp_session_pool_get_property (GObject * object, guint propid,
@@ -62,8 +62,8 @@ gst_rtsp_session_pool_class_init (GstRTSPSessionPoolClass * klass)
 
   klass->create_session_id = create_session_id;
 
-  GST_DEBUG_CATEGORY_INIT (rtsp_session_debug, "rtspsession", 0,
-      "GstRTSPSession");
+  GST_DEBUG_CATEGORY_INIT (rtsp_session_debug, "rtspsessionpool", 0,
+      "GstRTSPSessionPool");
 }
 
 static void
index 8d507e5..ce86d43 100644 (file)
@@ -32,7 +32,7 @@ enum
   PROP_LAST
 };
 
-GST_DEBUG_CATEGORY_EXTERN (rtsp_session_debug);
+GST_DEBUG_CATEGORY_STATIC (rtsp_session_debug);
 #define GST_CAT_DEFAULT rtsp_session_debug
 
 static void gst_rtsp_session_get_property (GObject * object, guint propid,
@@ -63,6 +63,9 @@ gst_rtsp_session_class_init (GstRTSPSessionClass * klass)
       g_param_spec_uint ("timeout", "timeout",
           "the timeout of the session (0 = never)", 0, G_MAXUINT,
           DEFAULT_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  GST_DEBUG_CATEGORY_INIT (rtsp_session_debug, "rtspsession", 0,
+      "GstRTSPSession");
 }
 
 static void