Simple DirectMedia Layer https://libsdl.org
Find a file
Vicki Pfau 27439467ce camera: Don't try to fake entire range for FRMIVAL_TYPE_CONTINUOUS
V4L2 is able to advertise that a video device is able to display any frame
interval within a continuous range. SDL does not allow advertising this and
only exposes discrete frame intervals. To work around this, SDL attempted to
generate a subset of the range with a fixed interval. Unfortunately, the way
this was accomplish is inherently broken and led to attempting to allocate a
very large number of formats per resolution and colorspace. With the Magewell
Pro Capture HDMI, which can expose FRMSIZE_TYPE_CONTINUOUS as well, this can
expose a truly astronomical number of formats, exceeding 1 PB of RAM. This will
lead to an OOM kill for any process that tries to initialize the camera
subsystem.

This patch just tests to see if some common frame rates are within the
contiuous range and expose those. SDL still does not handle
FRMSIZE_TYPE_CONTINUOUS in a graceful way so it still uses over a gigabyte of
RAM for each possible combination of sizes, but with this patch it no longer
leads to an OOM kill. The API will need amending for proper support for both
continuous frame sizes and frame intervals.

(cherry picked from commit ab6dd970ac)
2026-02-24 06:55:10 -08:00
.github ci: Add steamrt4 workflows 2026-01-02 12:19:08 -05:00
android-project Updated to version 3.4.3 for development 2026-02-20 15:59:20 -08:00
build-scripts release: synchronize build-scripts/build-release.py 2026-01-21 21:52:07 +01:00
cmake ci: add CFLAGS to pkg-config link command 2026-02-20 11:20:57 -08:00
docs Fixed building with Xcode 15.4 2026-01-03 08:04:59 -08:00
examples examples: Make source code and console tabs take 80% of browser page. 2026-02-16 13:17:55 -05:00
include headers: selected sdl-wiki-bot-authored updates from main branch 2026-02-21 03:03:32 +03:00
src camera: Don't try to fake entire range for FRMIVAL_TYPE_CONTINUOUS 2026-02-24 06:55:10 -08:00
test vulkan: Only enable KHR_portability_enumeration when available 2026-02-20 11:35:37 -05:00
VisualC SDL_test: allow disabling colorized output 2025-12-15 23:19:25 +01:00
VisualC-GDK Updated copyright for 2026 2026-01-01 09:48:19 -08:00
wayland-protocols wayland: Update the color management protocol 2025-12-15 13:54:31 -05:00
Xcode Updated to version 3.4.3 for development 2026-02-20 15:59:20 -08:00
.clang-format
.clang-tidy
.editorconfig .editorconfig: Remove excess apostrophe at *.cocci 2024-06-16 09:18:17 -07:00
.gitignore Updated .gitignore for png test data 2025-10-10 08:59:27 -07:00
.wikiheaders-options wikiheaders: Generate a current list of supported environment variables. 2025-09-02 15:49:52 -04:00
Android.mk android: remove dependency on cpu-features.h 2025-11-11 23:41:43 +00:00
BUGS.txt Added a Discord link to BUGS.txt 2025-01-13 16:42:50 -08:00
CMakeLists.txt Updated to version 3.4.3 for development 2026-02-20 15:59:20 -08:00
CREDITS.md Updated the credits for SDL 3.0 2025-01-13 16:42:50 -08:00
INSTALL.md Add a link to docs/INTRO-mingw.md 2025-03-06 16:25:17 -08:00
LICENSE.txt Updated copyright for 2026 2026-01-01 09:48:19 -08:00
README.md Revert "Update README.md" 2025-11-16 01:15:10 +03:00
WhatsNew.txt Added SDL_HINT_MOUSE_DPI_SCALE_CURSORS 2025-12-09 17:12:08 -08:00

Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.

You can find the latest release and additional information at: https://www.libsdl.org/

Installation instructions and a quick introduction is available in INSTALL.md

This library is distributed under the terms of the zlib license, available in LICENSE.txt.

Enjoy!

Sam Lantinga (slouken@libsdl.org)