1 From 152217064f1192bb836620ad7eaadbc031624f4c Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
4 Date: Mon, 20 Mar 2017 16:45:01 +0100
5 Subject: [PATCH] plugins: when debug disabled, default category is NULL
7 As in gstreamer-vaapi a common base class is used, the specific
8 default category is passed to the base-plugin initializator, thus
9 the log messages are categorized with the used plugin.
11 Nonetheless, when the gst-debug is disabled in compilation time,
12 it is needed to pass NULL to the base-plugin initializator. This
15 https://bugzilla.gnome.org/show_bug.cgi?id=780302
17 Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
19 gst/vaapi/gstvaapidecode.c | 4 ++++
20 gst/vaapi/gstvaapiencode.c | 4 ++++
21 gst/vaapi/gstvaapipostproc.c | 4 ++++
22 gst/vaapi/gstvaapisink.c | 4 ++++
23 4 files changed, 16 insertions(+)
25 diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
26 index 407e25b..c2bb42a 100644
27 --- a/gst/vaapi/gstvaapidecode.c
28 +++ b/gst/vaapi/gstvaapidecode.c
30 #define GST_VAAPI_DECODE_FLOW_PARSE_DATA GST_FLOW_CUSTOM_SUCCESS_2
32 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapidecode);
33 +#ifndef GST_DISABLE_GST_DEBUG
34 #define GST_CAT_DEFAULT gst_debug_vaapidecode
36 +#define GST_CAT_DEFAULT NULL
39 #define GST_VAAPI_DECODE_PARAMS_QDATA \
40 g_quark_from_static_string("vaapidec-params")
41 diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c
42 index dd60901..b0f0a32 100644
43 --- a/gst/vaapi/gstvaapiencode.c
44 +++ b/gst/vaapi/gstvaapiencode.c
46 #define GST_VAAPI_ENCODE_FLOW_CONVERT_ERROR GST_FLOW_CUSTOM_ERROR_1
48 GST_DEBUG_CATEGORY_STATIC (gst_vaapiencode_debug);
49 +#ifndef GST_DISABLE_GST_DEBUG
50 #define GST_CAT_DEFAULT gst_vaapiencode_debug
52 +#define GST_CAT_DEFAULT NULL
55 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVaapiEncode,
56 gst_vaapiencode, GST_TYPE_VIDEO_ENCODER,
57 diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
58 index f4ddbb5..d45f7ee 100644
59 --- a/gst/vaapi/gstvaapipostproc.c
60 +++ b/gst/vaapi/gstvaapipostproc.c
62 #define GST_PLUGIN_DESC "A VA-API video postprocessing filter"
64 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapipostproc);
65 +#ifndef GST_DISABLE_GST_DEBUG
66 #define GST_CAT_DEFAULT gst_debug_vaapipostproc
68 +#define GST_CAT_DEFAULT NULL
71 /* Default templates */
73 diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
74 index cca71d9..9cc5154 100644
75 --- a/gst/vaapi/gstvaapisink.c
76 +++ b/gst/vaapi/gstvaapisink.c
78 #define GST_PLUGIN_DESC "A VA-API based videosink"
80 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
81 +#ifndef GST_DISABLE_GST_DEBUG
82 #define GST_CAT_DEFAULT gst_debug_vaapisink
84 +#define GST_CAT_DEFAULT NULL
87 /* Default template */