Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/video/api_detection.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ static pthread_mutex_t curl_mutex = PTHREAD_MUTEX_INITIALIZER;
// Default JPEG quality used for API detection snapshots (range typically 0–100).
#define API_DETECTION_JPEG_QUALITY_DEFAULT 85

// Timeout (in seconds) for API detection HTTP requests.
#define API_DETECTION_TIMEOUT_SECONDS 10L

// Maximum number of bytes to log from the API response, including the null terminator.
#define API_DETECTION_RESPONSE_PREVIEW_LEN 64

Expand Down Expand Up @@ -832,7 +835,7 @@ int detect_objects_api_snapshot(const char *api_url, const char *stream_name,

curl_easy_setopt(local_curl, CURLOPT_WRITEFUNCTION, write_memory_callback);
curl_easy_setopt(local_curl, CURLOPT_WRITEDATA, (void *)&chunk);
curl_easy_setopt(local_curl, CURLOPT_TIMEOUT, 10);
curl_easy_setopt(local_curl, CURLOPT_TIMEOUT, API_DETECTION_TIMEOUT_SECONDS);
setup_common_curl_options(local_curl);

// Perform the request
Expand Down
Loading