@ -535,3 +535,8 @@ void cam_give_all(void) {
cam_obj->frames[x].en = 1;
}
bool cam_get_available_frames(void)
{
return 0 < uxQueueMessagesWaiting(cam_obj->frame_buffer_queue);
@ -490,3 +490,10 @@ void esp_camera_return_all(void) {
cam_give_all();
bool esp_camera_available_frames(void)
if (s_state == NULL) {
return false;
return cam_get_available_frames();
@ -240,6 +240,11 @@ esp_err_t esp_camera_load_from_nvs(const char *key);
*/
void esp_camera_return_all(void);
/**
* @brief Check if there are available frames to be immediately acquired
bool esp_camera_available_frames(void);
#ifdef __cplusplus
@ -57,6 +57,8 @@ void cam_give(camera_fb_t *dma_buffer);
void cam_give_all(void);
bool cam_get_available_frames(void);
#endif