diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2019-03-21 11:14:37 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-03-21 11:45:08 +0000 |
commit | d6bae53e6bfbbf628e52cbe49750e1911e0cc1b2 (patch) | |
tree | a7191b9e93c0535a88a5f4a5563afde6f74c33f2 /ext | |
parent | 8fd04194a95bbcce01e8ec11ee728cce914b3600 (diff) | |
download | gstreamer-plugins-bad-d6bae53e6bfbbf628e52cbe49750e1911e0cc1b2.tar.gz |
openh264: fix build with gstreamer debug system disabled
See https://gitlab.freedesktop.org/gstreamer/gst-ci/merge_requests/89
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openh264/gstopenh264dec.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ext/openh264/gstopenh264dec.cpp b/ext/openh264/gstopenh264dec.cpp index 0f46d7c27..3ed12c9a2 100644 --- a/ext/openh264/gstopenh264dec.cpp +++ b/ext/openh264/gstopenh264dec.cpp @@ -125,6 +125,7 @@ gst_openh264dec_init (GstOpenh264Dec * openh264dec) gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (openh264dec), TRUE); } +#ifndef GST_DISABLE_GST_DEBUG static void openh264_trace_cb (void *ctx, int level, const char *string) { @@ -144,6 +145,7 @@ openh264_trace_cb (void *ctx, int level, const char *string) gst_debug_log (GST_CAT_DEFAULT, lvl, "", "", 0, o, "%s", string); } +#endif static gboolean gst_openh264dec_start (GstVideoDecoder * decoder) @@ -151,8 +153,6 @@ gst_openh264dec_start (GstVideoDecoder * decoder) GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder); gint ret; SDecodingParam dec_param = { 0 }; - int log_level; - WelsTraceCallback log_cb; if (openh264dec->decoder != NULL) { openh264dec->decoder->Uninitialize (); @@ -161,13 +161,18 @@ gst_openh264dec_start (GstVideoDecoder * decoder) } WelsCreateDecoder (&(openh264dec->decoder)); - log_level = WELS_LOG_WARNING; - log_cb = openh264_trace_cb; - openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_LEVEL, &log_level); - openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK, - (void *) &log_cb); - openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK_CONTEXT, - (void *) &decoder); +#ifndef GST_DISABLE_GST_DEBUG + { + int log_level = WELS_LOG_WARNING; + WelsTraceCallback log_cb = openh264_trace_cb; + + openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_LEVEL, &log_level); + openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK, + (void *) &log_cb); + openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK_CONTEXT, + (void *) &decoder); + } +#endif dec_param.uiTargetDqLayer = 255; dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY; |