mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
wlvideoformat: Add P010
It is similar to NV12 but has 10bits per channel instead of 8. As it is supported by many modern GPUs, VA-API and an increasing number of Wayland compositors, let's support it as well. Also bump the required libdrm version accordingly and add a temporary define for the WL_SHM format. Tested with Weston, Mutter and Sway. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
This commit is contained in:
parent
fd82342bbd
commit
649eeeaa27
4 changed files with 13 additions and 4 deletions
|
@ -31183,7 +31183,7 @@
|
|||
"long-name": "Gtk Wayland Video Sink",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"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",
|
||||
"caps": "video/x-raw:\n format: { AYUV, ABGR, ARGB, BGRA, RGBA, P010_10LE, 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",
|
||||
"presence": "always"
|
||||
}
|
||||
|
@ -239346,7 +239346,7 @@
|
|||
"long-name": "wayland video sink",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"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",
|
||||
"caps": "video/x-raw:\n format: { AYUV, ABGR, ARGB, BGRA, RGBA, P010_10LE, 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",
|
||||
"presence": "always"
|
||||
}
|
||||
|
|
|
@ -29,6 +29,14 @@
|
|||
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
/* This can be removed once we can bump the required wl_client_dep,
|
||||
* which again is blocked by a CI image update, see
|
||||
* https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275
|
||||
*/
|
||||
#ifndef WL_SHM_FORMAT_P010
|
||||
#define WL_SHM_FORMAT_P010 DRM_FORMAT_P010
|
||||
#endif
|
||||
|
||||
#define GST_CAT_DEFAULT gst_wl_videoformat_debug
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||
|
||||
|
@ -74,6 +82,7 @@ static const wl_VideoFormat wl_formats[] = {
|
|||
{WL_SHM_FORMAT_NV21, DRM_FORMAT_NV21, GST_VIDEO_FORMAT_NV21},
|
||||
{WL_SHM_FORMAT_NV16, DRM_FORMAT_NV16, GST_VIDEO_FORMAT_NV16},
|
||||
{WL_SHM_FORMAT_NV61, DRM_FORMAT_NV61, GST_VIDEO_FORMAT_NV61},
|
||||
{WL_SHM_FORMAT_P010, DRM_FORMAT_P010, GST_VIDEO_FORMAT_P010_10LE},
|
||||
{WL_SHM_FORMAT_YUV410, DRM_FORMAT_YUV410, GST_VIDEO_FORMAT_YUV9},
|
||||
{WL_SHM_FORMAT_YVU410, DRM_FORMAT_YVU410, GST_VIDEO_FORMAT_YVU9},
|
||||
{WL_SHM_FORMAT_YUV411, DRM_FORMAT_YUV411, GST_VIDEO_FORMAT_Y41B},
|
||||
|
|
|
@ -37,7 +37,7 @@ G_BEGIN_DECLS
|
|||
* Since: 1.24
|
||||
*/
|
||||
#define GST_WL_VIDEO_FORMATS \
|
||||
"{ AYUV, ABGR, ARGB, BGRA, RGBA, YUV9, YVU9, Y41B, I420, YV12, " \
|
||||
"{ AYUV, ABGR, ARGB, BGRA, RGBA, P010_10LE, YUV9, YVU9, Y41B, I420, YV12, " \
|
||||
"NV12, NV21, Y42B, NV16, NV61, UYVY, YUY2, YVYU, BGRx, RGBx, xBGR, xRGB, " \
|
||||
"v308, BGR, RGB, BGR16, RGB16 }"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
wl_req = '>= 1.15'
|
||||
wl_client_dep = dependency('wayland-client', version: wl_req, required: get_option('wayland'))
|
||||
libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required: get_option('wayland'))
|
||||
libdrm_dep = dependency('libdrm', version: '>= 2.4.98', required: get_option('wayland'))
|
||||
wl_protocol_dep = dependency('wayland-protocols', version: wl_req, required: get_option('wayland'))
|
||||
wl_scanner = find_program('wayland-scanner', required: get_option('wayland'))
|
||||
# Also used in ext/wayland
|
||||
|
|
Loading…
Reference in a new issue