mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-07 07:16:21 +09:00
v4l2: skip resolutions that we cant import with eglCreateImage for yuyv
This commit is contained in:
@@ -74,6 +74,7 @@ dep = [
|
|||||||
dependency('libdrm'),
|
dependency('libdrm'),
|
||||||
dependency('wayland-egl'),
|
dependency('wayland-egl'),
|
||||||
dependency('wayland-client'),
|
dependency('wayland-client'),
|
||||||
|
dependency('vulkan'),
|
||||||
]
|
]
|
||||||
|
|
||||||
if build_machine.system() == 'linux'
|
if build_machine.system() == 'linux'
|
||||||
|
|||||||
@@ -222,6 +222,13 @@ static size_t gsr_capture_v4l2_get_supported_resolutions(int fd, gsr_capture_v4l
|
|||||||
|
|
||||||
while(xioctl(fd, VIDIOC_ENUM_FRAMESIZES, &fmt) == 0) {
|
while(xioctl(fd, VIDIOC_ENUM_FRAMESIZES, &fmt) == 0) {
|
||||||
if(fmt.type == V4L2_FRMSIZE_TYPE_DISCRETE && resolution_index < max_resolutions) {
|
if(fmt.type == V4L2_FRMSIZE_TYPE_DISCRETE && resolution_index < max_resolutions) {
|
||||||
|
// Skip unsupported resolutions for now (those that eglCreateImage cant import because of pitch hardware limitation).
|
||||||
|
// TODO: Find a fix for this.
|
||||||
|
if(pixfmt == GSR_CAPTURE_V4L2_PIXFMT_YUYV && (fmt.discrete.width % 128 != 0)) {
|
||||||
|
++fmt.index;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
resolutions[resolution_index] = (gsr_capture_v4l2_resolution){
|
resolutions[resolution_index] = (gsr_capture_v4l2_resolution){
|
||||||
.width = fmt.discrete.width,
|
.width = fmt.discrete.width,
|
||||||
.height = fmt.discrete.height,
|
.height = fmt.discrete.height,
|
||||||
|
|||||||
Reference in New Issue
Block a user