mpegtspacketizer: Initialize debugging in _get_type

There's no need for an extra function since all debuggin will require
a MpegTSPacketizer which means that the GType will be created, therefore
move the debug category initialization there.
This commit is contained in:
Edward Hervey 2009-09-15 18:57:25 +02:00
parent 56b71d6a48
commit d88af539f9
3 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,9 @@
GST_DEBUG_CATEGORY_STATIC (mpegts_packetizer_debug); GST_DEBUG_CATEGORY_STATIC (mpegts_packetizer_debug);
#define GST_CAT_DEFAULT mpegts_packetizer_debug #define GST_CAT_DEFAULT mpegts_packetizer_debug
G_DEFINE_TYPE (MpegTSPacketizer, mpegts_packetizer, G_TYPE_OBJECT); static void _init_local (void);
G_DEFINE_TYPE_EXTENDED (MpegTSPacketizer, mpegts_packetizer, G_TYPE_OBJECT, 0,
_init_local ());
static void mpegts_packetizer_dispose (GObject * object); static void mpegts_packetizer_dispose (GObject * object);
static void mpegts_packetizer_finalize (GObject * object); static void mpegts_packetizer_finalize (GObject * object);
@ -2085,8 +2087,8 @@ out:
return res; return res;
} }
void static void
mpegts_packetizer_init_debug () _init_local ()
{ {
GST_DEBUG_CATEGORY_INIT (mpegts_packetizer_debug, "mpegtspacketizer", 0, GST_DEBUG_CATEGORY_INIT (mpegts_packetizer_debug, "mpegtspacketizer", 0,
"MPEG transport stream parser"); "MPEG transport stream parser");

View file

@ -107,7 +107,6 @@ typedef struct
GType gst_mpegts_packetizer_get_type(void); GType gst_mpegts_packetizer_get_type(void);
void mpegts_packetizer_init_debug ();
MpegTSPacketizer *mpegts_packetizer_new (); MpegTSPacketizer *mpegts_packetizer_new ();
void mpegts_packetizer_clear (MpegTSPacketizer *packetizer); void mpegts_packetizer_clear (MpegTSPacketizer *packetizer);
void mpegts_packetizer_push (MpegTSPacketizer *packetizer, GstBuffer *buffer); void mpegts_packetizer_push (MpegTSPacketizer *packetizer, GstBuffer *buffer);

View file

@ -1302,7 +1302,6 @@ gst_mpegtsparse_plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (mpegts_parse_debug, "mpegtsparse", 0, GST_DEBUG_CATEGORY_INIT (mpegts_parse_debug, "mpegtsparse", 0,
"MPEG transport stream parser"); "MPEG transport stream parser");
mpegts_packetizer_init_debug ();
gst_mpegtsdesc_init_debug (); gst_mpegtsdesc_init_debug ();
return gst_element_register (plugin, "mpegtsparse", return gst_element_register (plugin, "mpegtsparse",