mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
waylandsink: Move format caps list to shared library
So it can be shared and more easily updated. While on it, order the formats according to the documentation for GstVideo.VIDEO_FORMATS_ALL. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
This commit is contained in:
parent
9e6891076c
commit
fd82342bbd
4 changed files with 16 additions and 14 deletions
|
@ -31183,7 +31183,7 @@
|
||||||
"long-name": "Gtk Wayland Video Sink",
|
"long-name": "Gtk Wayland Video Sink",
|
||||||
"pad-templates": {
|
"pad-templates": {
|
||||||
"sink": {
|
"sink": {
|
||||||
"caps": "video/x-raw:\n format: { BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, NV61, YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:DMABuf):\n format: DMA_DRM\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
"caps": "video/x-raw:\n format: { AYUV, ABGR, ARGB, BGRA, RGBA, YUV9, YVU9, Y41B, I420, YV12, NV12, NV21, Y42B, NV16, NV61, UYVY, YUY2, YVYU, BGRx, RGBx, xBGR, xRGB, v308, BGR, RGB, BGR16, RGB16 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:DMABuf):\n format: DMA_DRM\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||||
"direction": "sink",
|
"direction": "sink",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
@ -239346,7 +239346,7 @@
|
||||||
"long-name": "wayland video sink",
|
"long-name": "wayland video sink",
|
||||||
"pad-templates": {
|
"pad-templates": {
|
||||||
"sink": {
|
"sink": {
|
||||||
"caps": "video/x-raw:\n format: { BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, NV61, YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:DMABuf):\n format: DMA_DRM\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
"caps": "video/x-raw:\n format: { AYUV, ABGR, ARGB, BGRA, RGBA, YUV9, YVU9, Y41B, I420, YV12, NV12, NV21, Y42B, NV16, NV61, UYVY, YUY2, YVYU, BGRx, RGBx, xBGR, xRGB, v308, BGR, RGB, BGR16, RGB16 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:DMABuf):\n format: DMA_DRM\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||||
"direction": "sink",
|
"direction": "sink",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,15 +42,10 @@
|
||||||
#define GST_CAT_DEFAULT gst_debug_gtk_wayland_sink
|
#define GST_CAT_DEFAULT gst_debug_gtk_wayland_sink
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
|
|
||||||
#define WL_VIDEO_FORMATS \
|
|
||||||
"{ BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, " \
|
|
||||||
"RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, NV61, " \
|
|
||||||
"YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }"
|
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (WL_VIDEO_FORMATS) ";"
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_WL_VIDEO_FORMATS) ";"
|
||||||
GST_VIDEO_DMA_DRM_CAPS_MAKE)
|
GST_VIDEO_DMA_DRM_CAPS_MAKE)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -69,15 +69,10 @@ enum
|
||||||
GST_DEBUG_CATEGORY (gstwayland_debug);
|
GST_DEBUG_CATEGORY (gstwayland_debug);
|
||||||
#define GST_CAT_DEFAULT gstwayland_debug
|
#define GST_CAT_DEFAULT gstwayland_debug
|
||||||
|
|
||||||
#define WL_VIDEO_FORMATS \
|
|
||||||
"{ BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, " \
|
|
||||||
"RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, NV61, " \
|
|
||||||
"YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }"
|
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (WL_VIDEO_FORMATS) ";"
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_WL_VIDEO_FORMATS) ";"
|
||||||
GST_VIDEO_DMA_DRM_CAPS_MAKE)
|
GST_VIDEO_DMA_DRM_CAPS_MAKE)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,18 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_WL_VIDEO_FORMATS:
|
||||||
|
*
|
||||||
|
* A list of supported video formats for use in cap templates.
|
||||||
|
*
|
||||||
|
* Since: 1.24
|
||||||
|
*/
|
||||||
|
#define GST_WL_VIDEO_FORMATS \
|
||||||
|
"{ AYUV, ABGR, ARGB, BGRA, RGBA, YUV9, YVU9, Y41B, I420, YV12, " \
|
||||||
|
"NV12, NV21, Y42B, NV16, NV61, UYVY, YUY2, YVYU, BGRx, RGBx, xBGR, xRGB, " \
|
||||||
|
"v308, BGR, RGB, BGR16, RGB16 }"
|
||||||
|
|
||||||
GST_WL_API
|
GST_WL_API
|
||||||
void gst_wl_videoformat_init_once (void);
|
void gst_wl_videoformat_init_once (void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue