mpegtsmux: use gst debug for tsmux library
authorDavid Schleef <ds@schleef.org>
Mon, 25 Apr 2011 02:11:36 +0000 (19:11 -0700)
committerDavid Schleef <ds@schleef.org>
Wed, 18 May 2011 19:06:38 +0000 (12:06 -0700)
gst/mpegtsmux/mpegtsmux_aac.c
gst/mpegtsmux/mpegtsmux_h264.c
gst/mpegtsmux/tsmux/tsmux.c
gst/mpegtsmux/tsmux/tsmuxcommon.h
gst/mpegtsmux/tsmux/tsmuxstream.c

index 5afefc8..c433664 100644 (file)
@@ -87,7 +87,6 @@
 #include "mpegtsmux_aac.h"
 #include <string.h>
 
-GST_DEBUG_CATEGORY_EXTERN (mpegtsmux_debug);
 #define GST_CAT_DEFAULT mpegtsmux_debug
 
 GstBuffer *
index 7188ce7..bdf7f2f 100644 (file)
@@ -87,7 +87,6 @@
 #include "mpegtsmux_h264.h"
 #include <string.h>
 
-GST_DEBUG_CATEGORY_EXTERN (mpegtsmux_debug);
 #define GST_CAT_DEFAULT mpegtsmux_debug
 
 #define SPS_PPS_PERIOD GST_SECOND
index e160197..72095d0 100644 (file)
@@ -87,6 +87,8 @@
 #include "tsmuxstream.h"
 #include "crc.h"
 
+#define GST_CAT_DEFAULT mpegtsmux_debug
+
 /* Maximum total data length for a PAT section is 1024 bytes, minus an 
  * 8 byte header, then the length of each program entry is 32 bits, 
  * then finally a 32 bit CRC. Thus the maximum number of programs in this mux
index 4bc7304..9657b30 100644 (file)
@@ -81,8 +81,7 @@
 #define __TSMUX_COMMON_H__
 
 #include <glib.h>
-
-#undef TS_DEBUG_ON
+#include <gst/gst.h>
 
 G_BEGIN_DECLS
 
@@ -169,11 +168,8 @@ tsmux_put_ts (guint8 **pos, guint8 id, gint64 ts)
   tsmux_put16 (pos, ((ts << 1) & 0xfffe) | 0x01);
 }
 
-#ifdef TS_DEBUG_ON
-#define TS_DEBUG(...) g_print(__VA_ARGS__); g_print ("\n")
-#else
-#define TS_DEBUG(...)
-#endif
+GST_DEBUG_CATEGORY_EXTERN (mpegtsmux_debug);
+#define TS_DEBUG GST_DEBUG
 
 G_END_DECLS
 
index f147bfc..28112e1 100644 (file)
@@ -86,6 +86,8 @@
 #include "tsmuxcommon.h"
 #include "tsmuxstream.h"
 
+#define GST_CAT_DEFAULT mpegtsmux_debug
+
 static guint8 tsmux_stream_pes_header_length (TsMuxStream * stream);
 static void tsmux_stream_write_pes_header (TsMuxStream * stream, guint8 * data);
 static void tsmux_stream_find_pts_dts_within (TsMuxStream * stream, guint bound,