[farsight2/master] Add gst debug category to the rawudp transmitter
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:47 PST 2008
---
transmitters/rawudp/fs-rawudp-transmitter.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/transmitters/rawudp/fs-rawudp-transmitter.c b/transmitters/rawudp/fs-rawudp-transmitter.c
index 6e20467..127c69a 100644
--- a/transmitters/rawudp/fs-rawudp-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-transmitter.c
@@ -48,6 +48,8 @@
#include <netdb.h>
#include <unistd.h>
+GST_DEBUG_CATEGORY (fs_rawudp_transmitter_debug);
+#define GST_CAT_DEFAULT fs_rawudp_transmitter_debug
/* Signals */
enum
@@ -140,6 +142,11 @@ fs_rawudp_transmitter_register_type (FsPlugin *module)
(GInstanceInitFunc) fs_rawudp_transmitter_init
};
+ if (fs_rawudp_transmitter_debug == NULL)
+ GST_DEBUG_CATEGORY_INIT (fs_rawudp_transmitter_debug,
+ "fsrawudptransmitter", 0,
+ "Farsight raw UDP transmitter");
+
fs_rawudp_stream_transmitter_register_type (module);
type = g_type_module_register_type (G_TYPE_MODULE (module),
@@ -148,8 +155,18 @@ fs_rawudp_transmitter_register_type (FsPlugin *module)
return type;
}
-FS_INIT_PLUGIN (fs_rawudp_transmitter_register_type, NULL)
+static void
+fs_rawudp_transmitter_unload (FsPlugin *plugin)
+{
+ if (fs_rawudp_transmitter_debug)
+ {
+ gst_debug_category_free (fs_rawudp_transmitter_debug);
+ fs_rawudp_transmitter_debug = NULL;
+ }
+}
+FS_INIT_PLUGIN (fs_rawudp_transmitter_register_type,
+ fs_rawudp_transmitter_unload)
static void
fs_rawudp_transmitter_class_init (FsRawUdpTransmitterClass *klass)
--
1.5.6.5
More information about the farsight-commits
mailing list