kmssink: Add NV12_10LE40 / NV15 support

This is needed until kmssink is ported to use libgstvideo mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8525>
This commit is contained in:
Nicolas Dufresne 2025-02-19 08:53:13 -05:00 committed by GStreamer Marge Bot
parent 5c974980ef
commit 5e48b89686
2 changed files with 3 additions and 1 deletions

View File

@ -41598,7 +41598,7 @@
"long-name": "KMS video sink",
"pad-templates": {
"sink": {
"caps": "video/x-raw:\n format: { BGRA, RGBA, P016_LE, P010_10LE, NV24, BGRx, RGBx, RGB, BGR, Y42B, NV61, NV16, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, RGB16, BGR16 }\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: { BGRA, RGBA, P016_LE, NV12_10LE40, P010_10LE, NV24, BGRx, RGBx, RGB, BGR, Y42B, NV61, NV16, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, RGB16, BGR16 }\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"
}

View File

@ -51,6 +51,7 @@ static const struct
DEF_FMT (P016, P016_LE),
/* 16bits/c YUV 4:2:0 */
DEF_FMT (NV15, NV12_10LE40),
DEF_FMT (P010, P010_10LE),
/* YUV 4:4:4 */
@ -128,6 +129,7 @@ gst_drm_bpp_from_drm (guint32 drmfmt)
case DRM_FORMAT_NV24:
bpp = 8;
break;
case DRM_FORMAT_NV15:
case DRM_FORMAT_P010:
bpp = 10;
break;