SDL_CameraSpec(3type)

πŸ’– SDL_CameraSpec β€” the 3type glow-up πŸ’–

okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where we're decoding SDL_CameraSpec(3type) β€” and yes, she's giving struct energy πŸŽ€


✨ NAME ✨

SDL_CameraSpec β€” literally the details of an output format for a camera device. that's it, that's the whole job description 🫢


✨ SYNOPSIS ✨

#include <SDL3/SDL_camera.h>

typedef struct SDL_CameraSpec
{
    SDL_PixelFormat format;     /**< Frame format */
    SDL_Colorspace colorspace;  /**< Frame colorspace */
    int width;                  /**< Frame width */
    int height;                 /**< Frame height */
    int framerate_numerator;     /**< Frame rate numerator ((num / denom) == FPS, (denom / num) == duration in seconds) */
    int framerate_denominator;   /**< Frame rate denominator ((num / denom) == FPS, (denom / num) == duration in seconds) */
} SDL_CameraSpec;

like… look at her. six fields, zero drama, all vibes πŸ’…


✨ DESCRIPTION ✨

so here's the tea β˜• β€” cameras often support multiple formats, right? and every single one of them gets wrapped up all cozy inside this struct. one spec per format, no cap. πŸ¦‹


✨ AVAILABILITY ✨

this struct has been on the scene since SDL 3.2.0 β€” so if you're on anything older, bestie, she simply isn't there yet 😭


✨ SEE ALSO ✨

go read those too, iykyk πŸ‘‘


and that's the whole page, periodt. this lil' datatype page came to you courtesy of Simple Directmedia Layer, running SDL 3.4.18, and she's stamped with the date SDL_CameraSpec(3type) πŸŽ€ stan a camera format struct, mwah πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from