From db8235024523a0375443f36eb5fec627386452d5 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 18 Jul 2018 19:41:50 +0900 Subject: [PATCH] libav: Fix symbol redefine build error https://bugzilla.gnome.org/show_bug.cgi?id=796827 --- ext/libav/gstav.c | 2 -- ext/libav/gstav.h | 2 -- ext/libav/gstavauddec.c | 6 +++++- ext/libav/gstavviddec.c | 6 +++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c index 9afcdf1..2a88230 100644 --- a/ext/libav/gstav.c +++ b/ext/libav/gstav.c @@ -39,7 +39,6 @@ #endif GST_DEBUG_CATEGORY (ffmpeg_debug); -GST_DEBUG_CATEGORY (CAT_PERFORMANCE); static GMutex gst_avcodec_mutex; @@ -140,7 +139,6 @@ static gboolean plugin_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (ffmpeg_debug, "libav", 0, "libav elements"); - GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE"); /* Bail if not FFmpeg. We can no longer ensure operation with Libav */ if (!gst_ffmpeg_avcodec_is_ffmpeg ()) { diff --git a/ext/libav/gstav.h b/ext/libav/gstav.h index df15ce8..0693b77 100644 --- a/ext/libav/gstav.h +++ b/ext/libav/gstav.h @@ -34,8 +34,6 @@ GST_DEBUG_CATEGORY_EXTERN (ffmpeg_debug); #define GST_CAT_DEFAULT ffmpeg_debug -GST_DEBUG_CATEGORY_EXTERN (CAT_PERFORMANCE); - G_BEGIN_DECLS extern gboolean gst_ffmpegdemux_register (GstPlugin * plugin); diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c index f202454..a2518df 100644 --- a/ext/libav/gstavauddec.c +++ b/ext/libav/gstavauddec.c @@ -36,6 +36,8 @@ #include "gstavutils.h" #include "gstavauddec.h" +GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); + /* A number of function prototypes are given so we can refer to them later. */ static void gst_ffmpegauddec_base_init (GstFFMpegAudDecClass * klass); static void gst_ffmpegauddec_class_init (GstFFMpegAudDecClass * klass); @@ -134,6 +136,8 @@ gst_ffmpegauddec_class_init (GstFFMpegAudDecClass * klass) gstaudiodecoder_class->flush = GST_DEBUG_FUNCPTR (gst_ffmpegauddec_flush); gstaudiodecoder_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_ffmpegauddec_propose_allocation); + + GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE"); } static void @@ -729,7 +733,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d", ffmpegdec->padded_size); } - GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + GST_CAT_TRACE_OBJECT (GST_CAT_PERFORMANCE, ffmpegdec, "Copy input to add padding"); memcpy (ffmpegdec->padded, data, size); memset (ffmpegdec->padded + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index acb1ce9..40ad991 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -32,6 +32,8 @@ #include "gstavutils.h" #include "gstavviddec.h" +GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); + #define MAX_TS_MASK 0xff #define DEFAULT_LOWRES 0 @@ -248,6 +250,8 @@ gst_ffmpegviddec_class_init (GstFFMpegVidDecClass * klass) viddec_class->drain = gst_ffmpegviddec_drain; viddec_class->decide_allocation = gst_ffmpegviddec_decide_allocation; viddec_class->propose_allocation = gst_ffmpegviddec_propose_allocation; + + GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE"); } static void @@ -1765,7 +1769,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d", ffmpegdec->padded_size); } - GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + GST_CAT_TRACE_OBJECT (GST_CAT_PERFORMANCE, ffmpegdec, "Copy input to add padding"); memcpy (ffmpegdec->padded, data, size); memset (ffmpegdec->padded + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); -- 2.7.4