29#include <sys/syscall.h>
35#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
38#define VIDEO_SURFACES_MAX 3
49#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58,7,100)
50 return frame->interlaced_frame;
52 return frame->flags & AV_FRAME_FLAG_INTERLACED;
61static inline const char* av_err2string(
int errnum)
63 static char str[3][AV_ERROR_MAX_STRING_SIZE];
64 char buf[AV_ERROR_MAX_STRING_SIZE];
68 av_make_error_string(buf, AV_ERROR_MAX_STRING_SIZE, errnum);
69 snprintf(str[idx],
sizeof(str[idx]),
"%s", buf);
73#define av_err2str(err) av_err2string(err)
83 static char buf[3][20];
87 return "--:--:--.---";
93 snprintf(buf[idx],
sizeof(buf[idx]),
"%2d:%02d:%02d.%03d",
94 (
int)(ts / (3600000)), (
int)((ts / (60000)) % 60),
95 (
int)((ts / (1000)) % 60), (
int)(ts % 1000));
static bool isInterlacedFrame(AVFrame *frame)
Check, if this is an interlaced frame.
static const char * Timestamp2String(int64_t ts, uint8_t divisor)
Workaround for av_err2str() not working with C++.