Expand description
Low-level FFI bindings to ccap C library
Structs§
- Ccap
Device Info - @brief Device information structure
- Ccap
Device Names List - @brief Device names list structure
- Ccap
Provider - Ccap
Resolution - @brief Resolution structure
- Ccap
Video Frame - Ccap
Video Frame Info - @brief Video frame data structure for C interface
Constants§
- CCAP_
DESKTOP - CCAP_
MAX_ DEVICES - CCAP_
MAX_ DEVICE_ NAME_ LENGTH - CCAP_
MAX_ PIXEL_ FORMATS - CCAP_
MAX_ RESOLUTIONS - CCAP_
VERSION_ MAJOR - CCAP_
VERSION_ MINOR - CCAP_
VERSION_ PATCH - CCAP_
VERSION_ STRING - Ccap
Convert Backend_ CCAP_ CONVERT_ BACKEND_ APPLE_ ACCELERATE - < Apple Accelerate implementation
- Ccap
Convert Backend_ CCAP_ CONVERT_ BACKEND_ AUTO - < Automatically choose the best available backend
- Ccap
Convert Backend_ CCAP_ CONVERT_ BACKEND_ AVX2 - < AVX2 implementation
- Ccap
Convert Backend_ CCAP_ CONVERT_ BACKEND_ CPU - < CPU implementation
- Ccap
Convert Backend_ CCAP_ CONVERT_ BACKEND_ NEON - < ARM NEON implementation
- Ccap
Convert Flag_ CCAP_ CONVERT_ FLAG_ BT601 - < Use BT.601 color space
- Ccap
Convert Flag_ CCAP_ CONVERT_ FLAG_ BT709 - < Use BT.709 color space
- Ccap
Convert Flag_ CCAP_ CONVERT_ FLAG_ DEFAULT - < Default: BT.601 video range
- Ccap
Convert Flag_ CCAP_ CONVERT_ FLAG_ FULL_ RANGE - < Use full range color space
- Ccap
Convert Flag_ CCAP_ CONVERT_ FLAG_ VIDEO_ RANGE - < Use video range color space
- Ccap
Error Code_ CCAP_ ERROR_ DEVICE_ OPEN_ FAILED - < Camera device open failed
- Ccap
Error Code_ CCAP_ ERROR_ DEVICE_ START_ FAILED - < Camera start failed
- Ccap
Error Code_ CCAP_ ERROR_ DEVICE_ STOP_ FAILED - < Camera stop failed
- Ccap
Error Code_ CCAP_ ERROR_ FILE_ OPEN_ FAILED - < Failed to open video file
- Ccap
Error Code_ CCAP_ ERROR_ FRAME_ CAPTURE_ FAILED - < Frame capture failed
- Ccap
Error Code_ CCAP_ ERROR_ FRAME_ CAPTURE_ TIMEOUT - < Frame capture timeout
- Ccap
Error Code_ CCAP_ ERROR_ FRAME_ RATE_ SET_ FAILED - < Frame rate setting failed
- Ccap
Error Code_ CCAP_ ERROR_ INITIALIZATION_ FAILED - < Initialization failed
- Ccap
Error Code_ CCAP_ ERROR_ INTERNAL_ ERROR - < Unknown or internal error
- Ccap
Error Code_ CCAP_ ERROR_ INVALID_ DEVICE - < Invalid device name or device index
- Ccap
Error Code_ CCAP_ ERROR_ MEMORY_ ALLOCATION_ FAILED - < Memory allocation failed
- Ccap
Error Code_ CCAP_ ERROR_ NONE - < No error occurred
- Ccap
Error Code_ CCAP_ ERROR_ NO_ DEVICE_ FOUND - < No camera device found or device discovery failed
- Ccap
Error Code_ CCAP_ ERROR_ PROPERTY_ SET_ FAILED - < Property setting failed
- Ccap
Error Code_ CCAP_ ERROR_ SEEK_ FAILED - < Seek operation failed
- Ccap
Error Code_ CCAP_ ERROR_ UNSUPPORTED_ PIXEL_ FORMAT - < Requested pixel format is not supported
- Ccap
Error Code_ CCAP_ ERROR_ UNSUPPORTED_ RESOLUTION - < Requested resolution is not supported
- Ccap
Error Code_ CCAP_ ERROR_ UNSUPPORTED_ VIDEO_ FORMAT - < Video format is not supported
- Ccap
Frame Orientation_ CCAP_ FRAME_ ORIENTATION_ BOTTOM_ TO_ TOP - Ccap
Frame Orientation_ CCAP_ FRAME_ ORIENTATION_ TOP_ TO_ BOTTOM - Ccap
LogLevel_ CCAP_ LOG_ LEVEL_ ERROR - < Error log level
- Ccap
LogLevel_ CCAP_ LOG_ LEVEL_ INFO - < Info log level (Error | Warning | Info)
- Ccap
LogLevel_ CCAP_ LOG_ LEVEL_ NONE - < No log output
- Ccap
LogLevel_ CCAP_ LOG_ LEVEL_ VERBOSE - < Verbose log level (Error | Warning | Info | Verbose)
- Ccap
LogLevel_ CCAP_ LOG_ LEVEL_ WARNING - < Warning log level (Error | Warning)
- Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ BGR24 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ BGRA32 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ I420 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ I420F - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ NV12 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ NV12F - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ RGB24 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ RGBA32 - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ UNKNOWN - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ UYVY - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ UYVY_ F - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ YUYV - Ccap
Pixel Format_ CCAP_ PIXEL_ FORMAT_ YUYV_ F - Ccap
Property Name_ CCAP_ PROPERTY_ CURRENT_ FRAME_ INDEX - < Current frame index (read/write for seek)
- Ccap
Property Name_ CCAP_ PROPERTY_ CURRENT_ TIME - < Current playback position in seconds (read/write for seek)
- Ccap
Property Name_ CCAP_ PROPERTY_ DURATION - < Video total duration in seconds (read-only)
- Ccap
Property Name_ CCAP_ PROPERTY_ FRAME_ COUNT - < Total number of frames (read-only)
- Ccap
Property Name_ CCAP_ PROPERTY_ FRAME_ ORIENTATION - Ccap
Property Name_ CCAP_ PROPERTY_ FRAME_ RATE - Ccap
Property Name_ CCAP_ PROPERTY_ HEIGHT - Ccap
Property Name_ CCAP_ PROPERTY_ PIXEL_ FORMAT_ INTERNAL - Ccap
Property Name_ CCAP_ PROPERTY_ PIXEL_ FORMAT_ OUTPUT - Ccap
Property Name_ CCAP_ PROPERTY_ PLAYBACK_ SPEED - < Playback speed multiplier (read/write, default 1.0)
- Ccap
Property Name_ CCAP_ PROPERTY_ WIDTH
Functions§
- ccap_
convert_ ⚠bgr_ to_ bgra - @brief Convert BGR to BGRA (add alpha=255) @param src Source BGR data @param src_stride Source stride in bytes @param dst Destination BGRA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠bgr_ to_ rgb - @brief Convert BGR to RGB (swap R and B channels) @param src Source BGR data @param src_stride Source stride in bytes @param dst Destination RGB data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠bgr_ to_ rgba - @brief Convert BGR to RGBA (add alpha=255, swap R and B channels) @param src Source BGR data @param src_stride Source stride in bytes @param dst Destination RGBA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠bgra_ to_ bgr - @brief Convert BGRA to BGR (remove alpha channel) @param src Source BGRA data @param src_stride Source stride in bytes @param dst Destination BGR data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠bgra_ to_ rgb - @brief Convert BGRA to RGB (remove alpha, swap R and B channels) @param src Source BGRA data @param src_stride Source stride in bytes @param dst Destination RGB data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠bgra_ to_ rgba - @brief Convert BGRA to RGBA (swap R and B channels) @param src Source BGRA data @param src_stride Source stride in bytes @param dst Destination RGBA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠can_ use_ apple_ accelerate - @brief Check if Apple Accelerate is currently enabled @return true if Apple Accelerate is enabled, false otherwise
- ccap_
convert_ ⚠can_ use_ avx2 - @brief Check if AVX2 is currently enabled @return true if AVX2 is enabled, false otherwise
- ccap_
convert_ ⚠can_ use_ neon - @brief Check if ARM NEON is currently enabled @return true if ARM NEON is enabled, false otherwise
- ccap_
convert_ ⚠enable_ apple_ accelerate - @brief Enable or disable Apple Accelerate implementation @param enable true to enable Apple Accelerate, false to disable @return true if Apple Accelerate is available and enabled, false otherwise
- ccap_
convert_ ⚠enable_ avx2 - @brief Enable or disable AVX2 implementation @param enable true to enable AVX2, false to disable @return true if AVX2 is available and enabled, false otherwise
- ccap_
convert_ ⚠enable_ neon - @brief Enable or disable ARM NEON implementation @param enable true to enable ARM NEON, false to disable @return true if ARM NEON is available and enabled, false otherwise
- ccap_
convert_ ⚠get_ backend - @brief Get the current conversion backend that will be used @return Current conversion backend
- ccap_
convert_ ⚠has_ apple_ accelerate - @brief Check if Apple Accelerate is available @return true if Apple Accelerate is available, false otherwise
- ccap_
convert_ ⚠has_ avx2 - @brief Check if AVX2 is supported by the CPU @return true if AVX2 is available, false otherwise
- ccap_
convert_ ⚠has_ neon - @brief Check if ARM NEON is supported by the CPU @return true if ARM NEON is available, false otherwise
- ccap_
convert_ ⚠i420_ to_ bgr24 - @brief Convert I420 to BGR24 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_u U plane data @param src_u_stride U plane stride in bytes @param src_v V plane data @param src_v_stride V plane stride in bytes @param dst Destination BGR24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠i420_ to_ bgra32 - @brief Convert I420 to BGRA32 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_u U plane data @param src_u_stride U plane stride in bytes @param src_v V plane data @param src_v_stride V plane stride in bytes @param dst Destination BGRA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠i420_ to_ rgb24 - @brief Convert I420 to RGB24 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_u U plane data @param src_u_stride U plane stride in bytes @param src_v V plane data @param src_v_stride V plane stride in bytes @param dst Destination RGB24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠i420_ to_ rgba32 - @brief Convert I420 to RGBA32 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_u U plane data @param src_u_stride U plane stride in bytes @param src_v V plane data @param src_v_stride V plane stride in bytes @param dst Destination RGBA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠nv12_ to_ bgr24 - @brief Convert NV12 to BGR24 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_uv UV plane data (interleaved) @param src_uv_stride UV plane stride in bytes @param dst Destination BGR24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠nv12_ to_ bgra32 - @brief Convert NV12 to BGRA32 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_uv UV plane data (interleaved) @param src_uv_stride UV plane stride in bytes @param dst Destination BGRA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠nv12_ to_ rgb24 - @brief Convert NV12 to RGB24 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_uv UV plane data (interleaved) @param src_uv_stride UV plane stride in bytes @param dst Destination RGB24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠nv12_ to_ rgba32 - @brief Convert NV12 to RGBA32 @param src_y Y plane data @param src_y_stride Y plane stride in bytes @param src_uv UV plane data (interleaved) @param src_uv_stride UV plane stride in bytes @param dst Destination RGBA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠rgb_ to_ bgr - @brief Convert RGB to BGR (swap R and B channels) @param src Source RGB data @param src_stride Source stride in bytes @param dst Destination BGR data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠rgb_ to_ bgra - @brief Convert RGB to BGRA (add alpha=255, swap R and B channels) @param src Source RGB data @param src_stride Source stride in bytes @param dst Destination BGRA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠rgb_ to_ rgba - @brief Convert RGB to RGBA (add alpha=255) @param src Source RGB data @param src_stride Source stride in bytes @param dst Destination RGBA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠rgba_ to_ bgr - @brief Convert RGBA to BGR (remove alpha, swap R and B channels) @param src Source RGBA data @param src_stride Source stride in bytes @param dst Destination BGR data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠rgba_ to_ bgra - @brief Convert RGBA to BGRA (swap R and B channels) @param src Source RGBA data @param src_stride Source stride in bytes @param dst Destination BGRA data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠rgba_ to_ rgb - @brief Convert RGBA to RGB (remove alpha channel) @param src Source RGBA data @param src_stride Source stride in bytes @param dst Destination RGB data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip)
- ccap_
convert_ ⚠set_ backend - @brief Set the conversion backend @param backend Backend to set @return true if the backend was set successfully, false otherwise
- ccap_
convert_ ⚠uyvy_ to_ bgr24 - @brief Convert UYVY to BGR24 @param src Source UYVY data @param src_stride Source stride in bytes @param dst Destination BGR24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠uyvy_ to_ bgra32 - @brief Convert UYVY to BGRA32 @param src Source UYVY data @param src_stride Source stride in bytes @param dst Destination BGRA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠uyvy_ to_ rgb24 - @brief Convert UYVY to RGB24 @param src Source UYVY data @param src_stride Source stride in bytes @param dst Destination RGB24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠uyvy_ to_ rgba32 - @brief Convert UYVY to RGBA32 @param src Source UYVY data @param src_stride Source stride in bytes @param dst Destination RGBA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠yuv_ to_ rgb_ 601f - @brief Convert single YUV pixel to RGB using BT.601 full range @param y Y component @param u U component @param v V component @param r Output R component (0-255) @param g Output G component (0-255) @param b Output B component (0-255)
- ccap_
convert_ ⚠yuv_ to_ rgb_ 601v - @brief Convert single YUV pixel to RGB using BT.601 video range @param y Y component @param u U component @param v V component @param r Output R component (0-255) @param g Output G component (0-255) @param b Output B component (0-255)
- ccap_
convert_ ⚠yuv_ to_ rgb_ 709f - @brief Convert single YUV pixel to RGB using BT.709 full range @param y Y component @param u U component @param v V component @param r Output R component (0-255) @param g Output G component (0-255) @param b Output B component (0-255)
- ccap_
convert_ ⚠yuv_ to_ rgb_ 709v - @brief Convert single YUV pixel to RGB using BT.709 video range @param y Y component @param u U component @param v V component @param r Output R component (0-255) @param g Output G component (0-255) @param b Output B component (0-255)
- ccap_
convert_ ⚠yuyv_ to_ bgr24 - @brief Convert YUYV to BGR24 @param src Source YUYV data @param src_stride Source stride in bytes @param dst Destination BGR24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠yuyv_ to_ bgra32 - @brief Convert YUYV to BGRA32 @param src Source YUYV data @param src_stride Source stride in bytes @param dst Destination BGRA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠yuyv_ to_ rgb24 - @brief Convert YUYV to RGB24 @param src Source YUYV data @param src_stride Source stride in bytes @param dst Destination RGB24 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
convert_ ⚠yuyv_ to_ rgba32 - @brief Convert YUYV to RGBA32 @param src Source YUYV data @param src_stride Source stride in bytes @param dst Destination RGBA32 data @param dst_stride Destination stride in bytes @param width Image width in pixels @param height Image height in pixels (negative for vertical flip) @param flag Conversion flags (color space and range)
- ccap_
dump_ ⚠frame_ to_ directory - @brief Save a video frame to directory with auto-generated filename @param frame Pointer to video frame @param directory Directory path to save the file @param output_path Buffer to store the full output path (caller must allocate) @param output_path_size Size of the output_path buffer @return Number of characters written to output_path (excluding null terminator), or -1 on error @note If output_path is NULL, returns the required buffer size (including null terminator) Filename will be generated based on current time and frame index This function is for debugging purposes and not performance optimized
- ccap_
dump_ ⚠frame_ to_ file - @brief Save a video frame as BMP or YUV file @param frame Pointer to video frame @param filename_no_suffix Filename without extension (extension will be added automatically) @param output_path Buffer to store the full output path (caller must allocate) @param output_path_size Size of the output_path buffer @return Number of characters written to output_path (excluding null terminator), or -1 on error @note If output_path is NULL, returns the required buffer size (including null terminator) YUV formats will be saved as .yuv files, RGB formats as .bmp files This function is for debugging purposes and not performance optimized
- ccap_
error_ ⚠code_ to_ string - @brief Convert error code to English string description @param errorCode The error code to convert @return Error description string
- ccap_
get_ ⚠version - @brief Get library version string @return Version string
- ccap_
pixel_ ⚠format_ is_ rgb - @brief Check if a pixel format has RGB color @param format Pixel format @return true if RGB format, false otherwise
- ccap_
pixel_ ⚠format_ is_ yuv - @brief Check if a pixel format has YUV color @param format Pixel format @return true if YUV format, false otherwise
- ccap_
pixel_ ⚠format_ to_ string - @brief Get string representation of pixel format @param format Pixel format @param buffer Output buffer to store the string (caller must allocate) @param buffer_size Size of the output buffer @return Number of characters written (excluding null terminator), or -1 on error @note If buffer is NULL, returns the required buffer size (including null terminator)
- ccap_
provider_ ⚠close - @brief Close camera device @param provider Pointer to CcapProvider instance
- ccap_
provider_ ⚠create - @brief Create a new camera provider instance @return Pointer to CcapProvider instance, or NULL on failure
- ccap_
provider_ ⚠create_ with_ device - @brief Create a camera provider and open specified device
@param deviceName Device name to open (NULL for default device)
@param extraInfo Extra backend hint (can be NULL).
On Windows, accepted values include
auto,msmf,dshow, andbackend=<value>.autoenumerates both Windows backends and routes each device to a compatible backend automatically. Other platforms ignore this parameter. @return Pointer to CcapProvider instance, or NULL on failure - ccap_
provider_ ⚠create_ with_ index - @brief Create a camera provider and open device by index
@param deviceIndex Device index (negative for default device)
@param extraInfo Extra backend hint (can be NULL).
On Windows, accepted values include
auto,msmf,dshow, andbackend=<value>.autoenumerates both Windows backends and routes each device to a compatible backend automatically. Other platforms ignore this parameter. @return Pointer to CcapProvider instance, or NULL on failure - ccap_
provider_ ⚠destroy - @brief Destroy a camera provider instance and release all resources @param provider Pointer to CcapProvider instance
- ccap_
provider_ ⚠find_ device_ names_ list - @brief Find all available camera device names @param provider Pointer to CcapProvider instance @param deviceList Output parameter for device names list @return true on success, false on failure
- ccap_
provider_ ⚠get_ device_ info - @brief Get device information @param provider Pointer to CcapProvider instance @param deviceInfo Output parameter for device information @return true on success, false on failure
- ccap_
provider_ ⚠get_ property - @brief Get camera property @param provider Pointer to CcapProvider instance @param prop Property name @return Property value, or NaN on failure
- ccap_
provider_ ⚠grab - @brief Grab a new frame (synchronous) @param provider Pointer to CcapProvider instance @param timeoutMs Timeout in milliseconds (0xFFFFFFFF for infinite) @return Pointer to CcapVideoFrame, or NULL on failure/timeout @note The returned frame must be released using ccap_video_frame_release
- ccap_
provider_ ⚠is_ file_ mode - @brief Check if provider is in file playback mode @param provider Pointer to CcapProvider instance @return true if opened with a video file, false if opened with a camera device
- ccap_
provider_ ⚠is_ opened - @brief Check if camera device is opened @param provider Pointer to CcapProvider instance @return true if opened, false otherwise
- ccap_
provider_ ⚠is_ started - @brief Check if capture is started @param provider Pointer to CcapProvider instance @return true if started, false otherwise
- ccap_
provider_ ⚠open - @brief Open a camera device @param provider Pointer to CcapProvider instance @param deviceName Device name (NULL for default device) @param autoStart Whether to start capturing automatically @return true on success, false on failure
- ccap_
provider_ ⚠open_ by_ index - @brief Open a camera device by index @param provider Pointer to CcapProvider instance @param deviceIndex Device index (negative for default device) @param autoStart Whether to start capturing automatically @return true on success, false on failure
- ccap_
provider_ ⚠set_ max_ available_ frame_ size - @brief Set maximum number of available frames in cache @param provider Pointer to CcapProvider instance @param size Maximum number of available frames
- ccap_
provider_ ⚠set_ max_ cache_ frame_ size - @brief Set maximum number of frames in internal cache @param provider Pointer to CcapProvider instance @param size Maximum number of cached frames
- ccap_
provider_ ⚠set_ new_ frame_ callback - @brief Set callback for new frame notifications (asynchronous) @param provider Pointer to CcapProvider instance @param callback Callback function (NULL to remove callback) @param userData User data passed to callback @return true on success, false on failure
- ccap_
provider_ ⚠set_ property - @brief Set camera property @param provider Pointer to CcapProvider instance @param prop Property name @param value Property value @return true on success, false on failure
- ccap_
provider_ ⚠start - @brief Start frame capturing @param provider Pointer to CcapProvider instance @return true on success, false on failure
- ccap_
provider_ ⚠stop - @brief Stop frame capturing @param provider Pointer to CcapProvider instance
- ccap_
save_ ⚠rgb_ data_ as_ bmp - @brief Save RGB data as BMP file @param filename Output filename @param data RGB/BGR image data @param width Image width in pixels @param line_offset Bytes per line (stride) @param height Image height in pixels @param is_bgr true if data is in BGR order, false for RGB @param has_alpha true if data has alpha channel @param is_top_to_bottom true if data is top-to-bottom, false for bottom-to-top @return true on success, false on failure
- ccap_
set_ ⚠error_ callback - @brief Set error callback for all camera operations @param callback Error callback function (NULL to remove callback) @param userData User data passed to callback @return true on success, false on failure @note This callback will be used by all provider instances
- ccap_
set_ ⚠log_ level - @brief Set the log level for ccap library @param level Log level to set @note This affects both C and C++ interfaces logging output
- ccap_
video_ ⚠frame_ get_ info - @brief Get frame information @param frame Pointer to CcapVideoFrame instance @param frameInfo Output parameter for frame information @return true on success, false on failure
- ccap_
video_ ⚠frame_ release - @brief Release a video frame @param frame Pointer to CcapVideoFrame instance
Type Aliases§
- Ccap
Convert Backend - @brief Conversion backend enumeration
- Ccap
Convert Flag - @brief Conversion flags for color space and range
- Ccap
Error Callback - @brief Error callback function type for C interface
- Ccap
Error Code - @brief Error codes for camera capture operations
- Ccap
Frame Orientation - @brief Frame orientation enumeration
- Ccap
LogLevel - @brief Log level enumeration for C interface
- Ccap
NewFrame Callback - @brief Callback function type for new frame notifications
- Ccap
Pixel Format - @brief Pixel format enumeration, compatible with ccap::PixelFormat
- Ccap
Property Name - @brief Property name enumeration for camera configuration