mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-12 11:26:39 +00:00
openh264: fix build with gstreamer debug system disabled
See https://gitlab.freedesktop.org/gstreamer/gst-ci/merge_requests/89
This commit is contained in:
parent
8fd04194a9
commit
d6bae53e6b
1 changed files with 14 additions and 9 deletions
|
@ -125,6 +125,7 @@ gst_openh264dec_init (GstOpenh264Dec * openh264dec)
|
||||||
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (openh264dec), TRUE);
|
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (openh264dec), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
static void
|
static void
|
||||||
openh264_trace_cb (void *ctx, int level, const char *string)
|
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);
|
gst_debug_log (GST_CAT_DEFAULT, lvl, "", "", 0, o, "%s", string);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_openh264dec_start (GstVideoDecoder * decoder)
|
gst_openh264dec_start (GstVideoDecoder * decoder)
|
||||||
|
@ -151,8 +153,6 @@ gst_openh264dec_start (GstVideoDecoder * decoder)
|
||||||
GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
|
GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
|
||||||
gint ret;
|
gint ret;
|
||||||
SDecodingParam dec_param = { 0 };
|
SDecodingParam dec_param = { 0 };
|
||||||
int log_level;
|
|
||||||
WelsTraceCallback log_cb;
|
|
||||||
|
|
||||||
if (openh264dec->decoder != NULL) {
|
if (openh264dec->decoder != NULL) {
|
||||||
openh264dec->decoder->Uninitialize ();
|
openh264dec->decoder->Uninitialize ();
|
||||||
|
@ -161,13 +161,18 @@ gst_openh264dec_start (GstVideoDecoder * decoder)
|
||||||
}
|
}
|
||||||
WelsCreateDecoder (&(openh264dec->decoder));
|
WelsCreateDecoder (&(openh264dec->decoder));
|
||||||
|
|
||||||
log_level = WELS_LOG_WARNING;
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
log_cb = openh264_trace_cb;
|
{
|
||||||
|
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_LEVEL, &log_level);
|
||||||
openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK,
|
openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK,
|
||||||
(void *) &log_cb);
|
(void *) &log_cb);
|
||||||
openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK_CONTEXT,
|
openh264dec->decoder->SetOption (DECODER_OPTION_TRACE_CALLBACK_CONTEXT,
|
||||||
(void *) &decoder);
|
(void *) &decoder);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
dec_param.uiTargetDqLayer = 255;
|
dec_param.uiTargetDqLayer = 255;
|
||||||
dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY;
|
dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY;
|
||||||
|
|
Loading…
Reference in a new issue