Merge pull request #723 from pablogs9/feature/check_available

esp_camera_available_frames implementation
This commit is contained in:
Me No Dev
2025-06-30 20:01:20 +03:00
committed by GitHub
4 changed files with 19 additions and 0 deletions

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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
}

View File

@ -57,6 +57,8 @@ void cam_give(camera_fb_t *dma_buffer);
void cam_give_all(void);
bool cam_get_available_frames(void);
#ifdef __cplusplus
}
#endif