Files
OmniSocketGo/cmd/v1_camera_pipeline_ifdef.c

36 lines
834 B
C

#include <stdio.h>
#include <stdlib.h>
#include "video_pipeline.h"
int main(void) {
video_pipeline_config_t config;
video_pipeline_stats_t stats;
video_pipeline_config_init(&config);
video_pipeline_config_load_env(&config);
if (getenv("OMNI_VIDEO_DEBUG_TIMING") == NULL) {
config.enable_timing_logs = 1;
}
if (video_pipeline_stats_init(&stats) != 0) {
perror("video_pipeline_stats_init");
return 1;
}
for (;;) {
int rc = video_pipeline_run(&config, &stats, NULL);
if (rc == 0) {
break;
}
if (rc != VIDEO_PIPELINE_RUN_RETRY_IMMEDIATE) {
perror("video_pipeline_run");
video_pipeline_stats_destroy(&stats);
return 1;
}
}
video_pipeline_stats_destroy(&stats);
return 0;
}