diff --git a/gst-libs/gst/vaapi/video-format.c b/gst-libs/gst/vaapi/video-format.c index eac6ac5c8a..023a896633 100644 --- a/gst-libs/gst/vaapi/video-format.c +++ b/gst-libs/gst/vaapi/video-format.c @@ -58,6 +58,9 @@ typedef struct _GstVideoFormatMapMap { VA_FOURCC FOURCC, BYTE_ORDER, BPP, DEPTH, R, G, B, A }, } /* Image formats, listed in HW order preference */ +/* XXX: The new added video format must be added to + * GST_VAAPI_FORMATS_ALL in header file to make it available to all + * vaapi element's pad cap template. */ /* *INDENT-OFF* */ static const GstVideoFormatMap gst_vaapi_video_default_formats[] = { /* LSB and MSB video formats definitions are unclear and ambiguous. diff --git a/gst-libs/gst/vaapi/video-format.h b/gst-libs/gst/vaapi/video-format.h index cef8c504a7..466e115a2d 100644 --- a/gst-libs/gst/vaapi/video-format.h +++ b/gst-libs/gst/vaapi/video-format.h @@ -29,6 +29,11 @@ G_BEGIN_DECLS +#define GST_VAAPI_FORMATS_ALL "{ ENCODED, " \ + "NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, VUYA, Y210, Y410, " \ + "ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE " \ + "}" + const gchar * gst_vaapi_video_format_to_string (GstVideoFormat format); diff --git a/gst/vaapi/gstvaapipluginutil.h b/gst/vaapi/gstvaapipluginutil.h index 293b40924f..bba668b7cd 100644 --- a/gst/vaapi/gstvaapipluginutil.h +++ b/gst/vaapi/gstvaapipluginutil.h @@ -103,16 +103,16 @@ gst_vaapi_caps_feature_contains (const GstCaps * caps, # define GST_CAPS_INTERLACED_FALSE \ "interlace-mode = (string)progressive" -#define GST_VAAPI_MAKE_SURFACE_CAPS \ - GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ - GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410, Y444 }") +#define GST_VAAPI_MAKE_SURFACE_CAPS \ + GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ + GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, GST_VAAPI_FORMATS_ALL) -#define GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS \ - GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ +#define GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS \ + GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "{ RGBA, BGRA }") -#define GST_VAAPI_MAKE_DMABUF_CAPS \ - GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ +#define GST_VAAPI_MAKE_DMABUF_CAPS \ + GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \ GST_CAPS_FEATURE_MEMORY_DMABUF, "{ I420, YV12, RGBA }") G_GNUC_INTERNAL