mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
libs: video-format: add GST_VAAPI_FORMATS_ALL
GST_VAAPI_FORMATS_ALL collects all declared formats in video-format as a caps template string, and make them available in caps with memory:VASurface feature. Fixes: #199
This commit is contained in:
parent
a8be369840
commit
f16c93a187
3 changed files with 15 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue