feat(cam): support format conversion function

This commit is contained in:
gaoxu
2025-08-26 17:16:56 +08:00
committed by BOT
parent f7ddaefdc5
commit de3e6d22e3
14 changed files with 256 additions and 3 deletions
@@ -8,6 +8,7 @@
#include <stdbool.h>
#include "esp_err.h"
#include "esp_cam_ctlr_types.h"
#include "hal/cam_ctlr_types.h"
#ifdef __cplusplus
extern "C" {
@@ -146,6 +147,19 @@ struct esp_cam_ctlr_t {
*/
void *(*alloc_buffer)(esp_cam_ctlr_t *, size_t, uint32_t);
/**
* @brief Configure format conversion
*
* @param[in] esp_cam_ctlr_t * ESP CAM controller handle
* @param[in] const cam_ctlr_format_conv_config_t * Color conversion configuration
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG: Invalid argument
* - ESP_ERR_NOT_SUPPORTED: Format conversion not supported by this controller
*/
esp_err_t (*format_conversion)(esp_cam_ctlr_t *, const cam_ctlr_format_conv_config_t *);
void *user_data; ///< User data
};