Commit Graph

14 Commits

Author SHA1 Message Date
Sam Lantinga
d7391394d3 Switched the camera format to use framerate ratio instead of interval ratio
This is more intuitive for game developers and users.

Fixes https://github.com/libsdl-org/SDL/issues/9896
2024-06-18 07:39:52 -07:00
Sam Lantinga
aeea819494 Added colorspace to SDL_CameraSpec 2024-06-16 17:47:16 -07:00
Sam Lantinga
fd678ff50f Fixed SDL capitalization 2024-05-15 14:53:52 -07:00
Green Sky
0ee874f02d fix pipewire camera interval fraction inversion
SDL expects an interval fraction to be provided by the backend, but
pipewire provides a framerate fraction, we we just switch them.
2024-05-15 14:42:45 -07:00
Petar Popovic
9c6aa5066a PipeWire: removing log message 2024-05-10 13:06:20 -07:00
Wim Taymans
f3d79ad75f camera: make things work on older PipeWire 2024-05-09 13:19:27 -07:00
Wim Taymans
fb429f0dfe camera: work around old PipeWire versions 2024-05-09 13:19:27 -07:00
Wim Taymans
8186e4b322 camera: don't use newer PipeWire cleanup features 2024-05-09 13:19:27 -07:00
Wim Taymans
2b9ac185cd camera: improve PipeWire version checks
Remove the custom server version check. We can easily do this as part of
starting the hotplug loop. Check that we are at least running against a
1.0.0 server.

Log the compiled, linked, server and required versions.

Check that we are compiled and linked with the right version before using
the time symbol of a struct.
2024-05-09 13:19:27 -07:00
Wim Taymans
da06e67b1b camera: PipeWire 24 bits formats are endianness independent 2024-05-09 13:19:27 -07:00
Wim Taymans
3c7bccfb2b camera: clean up format table some more
Move the common formats outside of the ifdef
2024-05-09 13:19:27 -07:00
Wim Taymans
55d4b44441 camera: move PipeWire camera first in list
If it fails, we fall back to the next one, which is v4l2.
2024-05-09 13:19:27 -07:00
Wim Taymans
5d779153b2 camera: pipewire: only list formats with valid mapping 2024-05-09 13:19:27 -07:00
Wim Taymans
a340748c06 camera: add PipeWire camera support
The PipeWire camera will enumerate the pipewire Video/Source nodes with
their formats.

When capturing is started, a stream to the node will be created and
frames will be captured.
2024-05-09 13:19:27 -07:00