From: Joshua M. Doe Date: Tue, 28 Apr 2020 18:55:00 +0000 (-0400) Subject: mfvideosrc: add GRAY16_LE format support X-Git-Tag: 1.19.3~507^2~1985 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfc605a66687fe6931b8c723e371d534aa31ed56;p=platform%2Fupstream%2Fgstreamer.git mfvideosrc: add GRAY16_LE format support FOURCC "Y16 " is used by FLIR Boson USB Video Class (UVC) camera Part-of: --- diff --git a/sys/mediafoundation/gstmfutils.cpp b/sys/mediafoundation/gstmfutils.cpp index a0fe636..22bcbb8 100644 --- a/sys/mediafoundation/gstmfutils.cpp +++ b/sys/mediafoundation/gstmfutils.cpp @@ -35,6 +35,9 @@ GST_DEBUG_CATEGORY_EXTERN (gst_mf_utils_debug); #define MAKE_RAW_FORMAT_CAPS(format) \ "video/x-raw, format = (string) " format +/* No GUID is defined for "Y16 " in mfapi.h, but it's used by several devices */ +DEFINE_MEDIATYPE_GUID (MFVideoFormat_Y16, FCC ('Y16 ')); + static struct { const GUID &mf_format; @@ -58,6 +61,7 @@ static struct {MFVideoFormat_P016, MAKE_RAW_FORMAT_CAPS ("P016"), GST_VIDEO_FORMAT_P016_LE}, {MFVideoFormat_v210, MAKE_RAW_FORMAT_CAPS ("v210"), GST_VIDEO_FORMAT_v210}, {MFVideoFormat_v216, MAKE_RAW_FORMAT_CAPS ("v216"), GST_VIDEO_FORMAT_v216}, + {MFVideoFormat_Y16, MAKE_RAW_FORMAT_CAPS ("GRAY16_LE"), GST_VIDEO_FORMAT_GRAY16_LE}, }; static struct diff --git a/sys/mediafoundation/gstmfutils.h b/sys/mediafoundation/gstmfutils.h index 80624a4..cdb2cd9 100644 --- a/sys/mediafoundation/gstmfutils.h +++ b/sys/mediafoundation/gstmfutils.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS #define GST_MF_VIDEO_FORMATS \ "{ BGRx, BGRA, BGR, RGB15, RGB16, VUYA, YUY2, YVYU, UYVY, NV12, YV12, I420," \ - " P010, P016, v210, v216 }" + " P010, P016, v210, v216, GRAY16_LE }" GstVideoFormat gst_mf_video_subtype_to_video_format (const GUID *subtype);