From 7acfd0cdd12356ef76772c97cc151aa039e4b883 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 29 May 2022 06:55:27 +0900 Subject: [PATCH] directshow: Fix for uninitialized debug category warning A method in the code is used in another place (device provider) Part-of: --- subprojects/gst-plugins-bad/sys/directshow/gstdshowvideosrc.cpp | 6 +----- subprojects/gst-plugins-bad/sys/directshow/plugin.cpp | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/directshow/gstdshowvideosrc.cpp b/subprojects/gst-plugins-bad/sys/directshow/gstdshowvideosrc.cpp index 269b9c7..72732f1 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/gstdshowvideosrc.cpp +++ b/subprojects/gst-plugins-bad/sys/directshow/gstdshowvideosrc.cpp @@ -28,7 +28,7 @@ #include -GST_DEBUG_CATEGORY_STATIC (dshowvideosrc_debug); +GST_DEBUG_CATEGORY_EXTERN (dshowvideosrc_debug); #define GST_CAT_DEFAULT dshowvideosrc_debug static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", @@ -156,10 +156,6 @@ gst_dshowvideosrc_class_init (GstDshowVideoSrcClass * klass) "DirectShow video capture source", "Source/Video", "Receive data from a directshow video capture graph", "Sebastien Moutte "); - - GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0, - "Directshow video source"); - } static void diff --git a/subprojects/gst-plugins-bad/sys/directshow/plugin.cpp b/subprojects/gst-plugins-bad/sys/directshow/plugin.cpp index 6920760..8cf331b 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/plugin.cpp +++ b/subprojects/gst-plugins-bad/sys/directshow/plugin.cpp @@ -32,6 +32,7 @@ GST_DEBUG_CATEGORY (dshowdec_debug); GST_DEBUG_CATEGORY (dshowsrcwrapper_debug); +GST_DEBUG_CATEGORY (dshowvideosrc_debug); static gboolean plugin_init (GstPlugin * plugin) @@ -39,6 +40,8 @@ plugin_init (GstPlugin * plugin) GST_DEBUG_CATEGORY_INIT (dshowdec_debug, "dshowdec", 0, "DirectShow decoder"); GST_DEBUG_CATEGORY_INIT (dshowsrcwrapper_debug, "dshowsrcwrapper", 0, "DirectShow source wrapper"); + GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0, + "Directshow video source"); dshow_adec_register (plugin); dshow_vdec_register (plugin); -- 2.7.4