mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-06 15:00:43 +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('wayland-egl'),
|
||||
dependency('wayland-client'),
|
||||
dependency('vulkan'),
|
||||
]
|
||||
|
||||
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) {
|
||||
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){
|
||||
.width = fmt.discrete.width,
|
||||
.height = fmt.discrete.height,
|
||||
|
||||
Reference in New Issue
Block a user