Sam Lantinga
0dd579d40d
Removed SDL_Keysym
2024-06-21 22:06:08 -07:00
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
Ryan C. Gordon
5bc654aad3
camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule.
2024-06-13 18:13:51 -04:00
Ryan C. Gordon
9d3d893322
testcamera: Report device name and SDL camera driver in the window title.
2024-06-13 17:05:47 -04:00
Sam Lantinga
80a907e0e6
Backed out the viewport and cliprect changes in 9fb5a9ccac0a6bb6af02e72644c1c56dc6ab6f3e
...
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
Sam Lantinga
9fb5a9ccac
Use floating point values for viewport, clip rectangle, and texture sizes
...
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.
Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
Hunter Kvalevog
14f7eebac6
testcamera: Add [--camera name] parameter
2024-06-04 16:24:27 -07:00
Sam Lantinga
4d392bfc67
Fixed camera capture on iOS
...
My phone captured 1920x1080 images even though the highest reported format was higher resolution, so I adjusted testcamera to be able to handle different sized images than expected.
Fixes https://github.com/libsdl-org/SDL/issues/9930
2024-06-04 11:34:39 -07:00
Sam Lantinga
60396971ce
Move the main header with SDL_MAIN_USE_CALLBACKS
2024-06-04 10:42:44 -07:00
Ryan C. Gordon
3364aff757
main: Make the main callback return value symbols smaller (thanks, @Lzard!).
...
Reference #9901 .
2024-05-27 16:03:45 -04:00
L zard
06aa02453a
Tests: Use the main callback code macros
2024-05-27 09:22:07 -07:00
Anonymous Maarten
d3d7c04bf8
testcamera: libSDL3_test destroys the window and renderer
...
This fixes a "DEBUG: Parameter 'renderer' is invalid" message when exiting testcamera.
2024-05-17 14:39:29 +02:00
Sam Lantinga
4609af618a
Updated logging functions for SDL3 naming convention
2024-05-16 10:22:15 -07:00
Sam Lantinga
db43a6b418
testcamera: open the camera using the highest framerate available
2024-05-02 12:27:20 -07:00
Sam Lantinga
e6e1412e20
testcamera: create the texture as a streaming texture, since we'll update it every frame.
...
Also set the window size to the camera texture size
2024-05-02 11:40:28 -07:00
Ryan C. Gordon
38e3c6a4aa
main: Add an optional appstate
param to main callback entry points.
...
This allows apps to maintain state data without using global variables.
Fixes #9377 .
2024-03-27 17:22:08 -04:00
Susko3
01248a99c8
Add default: break;
to switches on SDL_Event::type
...
This is just a nice-to-have, as `SDL_Event::type` in an `Uint32`, so there are no
compiler errors about not handling all `SDL_EventType` enum values.
2024-03-06 15:40:05 -08:00
Anonymous Maarten
cbf0b1ce81
testcamera: create window and renderer through test library
2024-02-21 00:49:15 +01:00
Ryan C. Gordon
f59c66a97f
testcamera: Allow app to flip between a front and back camera.
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
b1ed49772c
camera: Replace testcamera.c with testcameraminimal.c
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
87e7046fca
camera: Public API functions should say "Format" not "Spec" to match audio.
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
d3e6ef3cc6
camera: Massive code reworking.
...
- Simplified public API, simplified backend interface.
- Camera device hotplug events.
- Thread code is split up so it backends that provide own threads can use it.
- Added "dummy" backend.
Note that CoreMedia (Apple) and Android backends need to be updated, as does
the testcamera app (testcameraminimal works).
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
cb10c80aaf
camera: Reworked to operate with a driver interface, like other subsystems.
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
7ae955ce68
camera: Renamed everything from "video capture" to "camera", wired to CMake.
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
f49ce4a15d
camera: Renamed "video_capture" files to "camera" and moved to own subdir.
2024-02-20 15:56:26 -05:00