From e88e8527ed03575b8801b4a17df651f7b4d65192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 7 Dec 2022 12:13:24 +0000 Subject: [PATCH] sys: avoid double definition of symbol MEDIASUBTYPE_I420 Namespace the symbol MEDIASUBTYPE_I420 to avoid double definition across dshow and mediafoundation plugins. Part-of: --- subprojects/gst-plugins-bad/sys/directshow/gstdshow.cpp | 4 ++-- .../gst-plugins-bad/sys/mediafoundation/gstmfcapturedshow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/directshow/gstdshow.cpp b/subprojects/gst-plugins-bad/sys/directshow/gstdshow.cpp index 2980027e63..b49109fe4d 100644 --- a/subprojects/gst-plugins-bad/sys/directshow/gstdshow.cpp +++ b/subprojects/gst-plugins-bad/sys/directshow/gstdshow.cpp @@ -34,7 +34,7 @@ wchar_to_gchar (WCHAR * w) return g_utf16_to_utf8 ((const gunichar2 *) w, wcslen (w), NULL, NULL, NULL); } -const GUID MEDIASUBTYPE_I420 +const GUID DSHOW_MEDIASUBTYPE_I420 = { 0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71} }; @@ -613,7 +613,7 @@ gst_dshow_show_propertypage (IBaseFilter * base_filter) GstVideoFormat gst_dshow_guid_to_gst_video_format (AM_MEDIA_TYPE *mediatype) { - if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_I420, FORMAT_VideoInfo)) + if (gst_dshow_check_mediatype (mediatype, DSHOW_MEDIASUBTYPE_I420, FORMAT_VideoInfo)) return GST_VIDEO_FORMAT_I420; if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_RGB24, FORMAT_VideoInfo)) diff --git a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfcapturedshow.cpp b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfcapturedshow.cpp index 30ebe425e6..9edfa114c1 100644 --- a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfcapturedshow.cpp +++ b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfcapturedshow.cpp @@ -41,7 +41,7 @@ using namespace Microsoft::WRL; GST_DEBUG_CATEGORY_EXTERN (gst_mf_source_object_debug); #define GST_CAT_DEFAULT gst_mf_source_object_debug -DEFINE_GUID (MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, +DEFINE_GUID (MF_MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); /* From qedit.h */ @@ -756,7 +756,7 @@ subtype_to_format (REFGUID subtype) return GST_VIDEO_FORMAT_YV12; else if (subtype == MEDIASUBTYPE_NV12) return GST_VIDEO_FORMAT_NV12; - else if (subtype == MEDIASUBTYPE_I420) + else if (subtype == MF_MEDIASUBTYPE_I420) return GST_VIDEO_FORMAT_I420; else if (subtype == MEDIASUBTYPE_IYUV) return GST_VIDEO_FORMAT_I420;