From 1551759cecea072c0b920519810e9ec41eb39119 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 12 Dec 2017 00:11:24 +0900 Subject: [PATCH] qtdemux: Apply qtdemux debug category to gstisoff .. instead of the use of default debug category. And, make new header to declare the debug category https://bugzilla.gnome.org/show_bug.cgi?id=791483 --- gst/isomp4/Makefile.am | 1 + gst/isomp4/gstisoff.c | 3 +++ gst/isomp4/qtdemux.c | 1 + gst/isomp4/qtdemux.h | 3 --- gst/isomp4/qtdemux_debug.h | 12 ++++++++++++ gst/isomp4/qtdemux_dump.c | 3 +++ gst/isomp4/qtdemux_lang.c | 4 +++- gst/isomp4/qtdemux_types.c | 3 +++ 8 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 gst/isomp4/qtdemux_debug.h diff --git a/gst/isomp4/Makefile.am b/gst/isomp4/Makefile.am index de91ff6..d76cb42 100644 --- a/gst/isomp4/Makefile.am +++ b/gst/isomp4/Makefile.am @@ -24,6 +24,7 @@ noinst_HEADERS = \ qtatomparser.h \ qtdemux.h \ qtdemux_types.h \ + qtdemux_debug.h \ qtdemux_dump.h \ qtdemux_lang.h \ qtpalette.h \ diff --git a/gst/isomp4/gstisoff.c b/gst/isomp4/gstisoff.c index 5c9f1ed..829a73a 100644 --- a/gst/isomp4/gstisoff.c +++ b/gst/isomp4/gstisoff.c @@ -22,9 +22,12 @@ * Boston, MA 02111-1307, USA. */ +#include "qtdemux_debug.h" #include "gstisoff.h" #include +#define GST_CAT_DEFAULT qtdemux_debug + void gst_isoff_qt_sidx_parser_init (GstSidxParser * parser) { diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 6064750..4fda82a 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -101,6 +101,7 @@ #define ABSDIFF(x, y) ( (x) > (y) ? ((x) - (y)) : ((y) - (x)) ) GST_DEBUG_CATEGORY (qtdemux_debug); +#define GST_CAT_DEFAULT qtdemux_debug typedef struct _QtDemuxSegment QtDemuxSegment; typedef struct _QtDemuxSample QtDemuxSample; diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h index ebd7258..18a1398 100644 --- a/gst/isomp4/qtdemux.h +++ b/gst/isomp4/qtdemux.h @@ -28,9 +28,6 @@ G_BEGIN_DECLS -GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug); -#define GST_CAT_DEFAULT qtdemux_debug - #define GST_TYPE_QTDEMUX \ (gst_qtdemux_get_type()) #define GST_QTDEMUX(obj) \ diff --git a/gst/isomp4/qtdemux_debug.h b/gst/isomp4/qtdemux_debug.h new file mode 100644 index 0000000..26da268 --- /dev/null +++ b/gst/isomp4/qtdemux_debug.h @@ -0,0 +1,12 @@ +#ifndef __GST_QTDEMUX_DEBUG_H__ +#define __GST_QTDEMUX_DEBUG_H__ + +#include + +G_BEGIN_DECLS + +GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug); + +G_END_DECLS + +#endif /* __GST_QTDEMUX_DEBUG_H__ */ diff --git a/gst/isomp4/qtdemux_dump.c b/gst/isomp4/qtdemux_dump.c index de37811..57e0bc6 100644 --- a/gst/isomp4/qtdemux_dump.c +++ b/gst/isomp4/qtdemux_dump.c @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. */ +#include "qtdemux_debug.h" #include "qtdemux_types.h" #include "qtdemux_dump.h" #include "fourcc.h" @@ -27,6 +28,8 @@ #include +#define GST_CAT_DEFAULT qtdemux_debug + #define GET_UINT8(data) gst_byte_reader_get_uint8_unchecked(data) #define GET_UINT16(data) gst_byte_reader_get_uint16_be_unchecked(data) #define GET_UINT32(data) gst_byte_reader_get_uint32_be_unchecked(data) diff --git a/gst/isomp4/qtdemux_lang.c b/gst/isomp4/qtdemux_lang.c index 59a78d7..c9646b2 100644 --- a/gst/isomp4/qtdemux_lang.c +++ b/gst/isomp4/qtdemux_lang.c @@ -17,11 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#include "qtdemux.h" +#include "qtdemux_debug.h" #include "qtdemux_lang.h" #include +#define GST_CAT_DEFAULT qtdemux_debug + /* http://developer.apple.com/mac/library/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html */ static const gchar qt_lang_map[][4] = { diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c index d14ea30..e4fa3b4 100644 --- a/gst/isomp4/qtdemux_types.c +++ b/gst/isomp4/qtdemux_types.c @@ -17,10 +17,13 @@ * Boston, MA 02110-1301, USA. */ +#include "qtdemux_debug.h" #include "qtdemux_types.h" #include "qtdemux_dump.h" #include "fourcc.h" +#define GST_CAT_DEFAULT qtdemux_debug + static const QtNodeType qt_node_types[] = { {FOURCC_moov, "movie", QT_FLAG_CONTAINER,}, {FOURCC_mvhd, "movie header", 0, -- 2.7.4