mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Add support for 4-plane frames
This commit is contained in:
@@ -495,6 +495,21 @@ ssize_t DrmRenderer::exportEGLImages(AVFrame *frame, EGLDisplay dpy,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_FD_EXT;
|
||||||
|
attribs[attribIndex++] = object.fd;
|
||||||
|
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_OFFSET_EXT;
|
||||||
|
attribs[attribIndex++] = plane.offset;
|
||||||
|
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_PITCH_EXT;
|
||||||
|
attribs[attribIndex++] = plane.pitch;
|
||||||
|
if (m_EGLExtDmaBuf && object.format_modifier != DRM_FORMAT_MOD_INVALID) {
|
||||||
|
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT;
|
||||||
|
attribs[attribIndex++] = (EGLint)(object.format_modifier & 0xFFFFFFFF);
|
||||||
|
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT;
|
||||||
|
attribs[attribIndex++] = (EGLint)(object.format_modifier >> 32);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,12 +51,17 @@ typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platf
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
||||||
|
#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
|
||||||
|
#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
|
||||||
|
#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
|
||||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
||||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
||||||
#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
|
#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
|
||||||
#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
|
#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
|
||||||
#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
|
#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
|
||||||
#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
|
#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
|
||||||
|
#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
|
||||||
|
#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EGL_MAX_PLANES 4
|
#define EGL_MAX_PLANES 4
|
||||||
|
|||||||
Reference in New Issue
Block a user