MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::IO::CameraConfig Struct Reference

Configuration for opening a camera device via FFmpeg. More...

#include <CameraSource.hpp>

+ Collaboration diagram for MayaFlux::IO::CameraConfig:

Public Attributes

std::string device_name
 Platform device string.
 
std::string display_name
 Human-readable device name for a chooser.
 
std::string format_override
 Leave empty to use CAMERA_FORMAT for current platform.
 
std::string input_format
 Capture format or codec (e.g. "mjpeg"); empty selects mjpeg where the platform supports it.
 
int pixel_format { -1 }
 Target AVPixelFormat as int; negative selects AV_PIX_FMT_RGBA.
 
double target_fps { 30.0 }
 Hint only; device may ignore.
 
uint32_t target_height { 1080 }
 Requested height in pixels.
 
uint32_t target_width { 1920 }
 Requested width in pixels.
 

Detailed Description

Configuration for opening a camera device via FFmpeg.

Platform device string conventions:

  • Linux: "/dev/video0", "/dev/video1", …
  • macOS: "0" (AVFoundation device index) or a camera name such as "FaceTime HD Camera"; frame rate must equal a rate range maximum
  • Windows: "video=Integrated Camera" (DirectShow filter name)

Resolution, frame rate and input format are hints. If the device rejects them, open() retries without the input format, then without frame rate, then with device defaults. The negotiated values are available from FFmpegCameraReader after open().

Definition at line 24 of file CameraSource.hpp.


The documentation for this struct was generated from the following file: