Heavy work on improving category documentation.

Still more to go!

Reference Issue #9440.
This commit is contained in:
Ryan C. Gordon
2024-12-16 01:10:37 -05:00
parent 9aca97f4e7
commit 79316ca36e
30 changed files with 209 additions and 43 deletions

View File

@@ -29,6 +29,25 @@
* provide SDL_Surface objects as new frames of video come in. These surfaces
* can be uploaded to an SDL_Texture or processed as pixels in memory.
*
* Several platforms will alert the user if an app tries to access a camera,
* and some will present a UI asking the user if your application should be
* allowed to obtain images at all, which they can deny. A successfully
* opened camera will not provide images until permission is granted.
* Applications, after opening a camera device, can see if they were granted
* access by either polling with the SDL_GetCameraPermissionState() function,
* or waiting for an SDL_EVENT_CAMERA_DEVICE_APPROVED or
* SDL_EVENT_CAMERA_DEVICE_DENIED event. Platforms that don't have any
* user approval process will report approval immediately.
*
* Note that SDL cameras only provide video as individual frames; they will
* not provide full-motion video encoded in a movie file format, although an
* app is free to encode the acquired frames into any format it likes. It
* also does not provide audio from the camera hardware through this API;
* not only do many webcams not have microphones at all, many people--from
* streamers to people on Zoom calls--will want to use a separate microphone
* regardless of the camera. In any case, recorded audio will be available
* through SDL's audio API no matter what hardware provides the microphone.
*
* ## Camera gotchas
*
* Consumer-level camera hardware tends to take a little while to warm up,
@@ -40,10 +59,10 @@
*
* It's not uncommon that a newly-opened camera will provide a couple of
* completely black frames, maybe followed by some under-exposed images. If
* taking single frame automatically, or recording video from a camera's input
* without the user initiating it from a preview, it could be wise to drop the
* first several frames (if not the first several _seconds_ worth of frames!)
* before using images from a camera.
* taking a single frame automatically, or recording video from a camera's
* input without the user initiating it from a preview, it could be wise to
* drop the first several frames (if not the first several _seconds_ worth of
* frames!) before using images from a camera.
*/
#ifndef SDL_camera_h_