sys: avoid double definition of symbol MEDIASUBTYPE_I420

Namespace the symbol MEDIASUBTYPE_I420 to avoid double definition
across dshow and mediafoundation plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4246>
This commit is contained in:
Stéphane Cerveau 2022-12-07 12:13:24 +00:00 committed by GStreamer Marge Bot
parent 96555c7ee9
commit e88e8527ed
2 changed files with 4 additions and 4 deletions

View file

@ -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))

View file

@ -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;