20#include <libavutil/frame.h>
58#define GL_CHECK(stmt) do { \
60 glCheckError(#stmt, __FILE__, __LINE__); \
64#define EGL_CHECK(stmt) do { \
66 eglCheckError(#stmt, __FILE__, __LINE__); \
76#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
79#define VIDEO_SURFACES_MAX 3
90#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58,7,100)
91 return frame->interlaced_frame;
114#define av_err2str(err) av_err2string(err)
131 static char buf[3][20];
135 return "--:--:--.---";
142 (
int)(
ts / (3600000)), (
int)((
ts / (60000)) % 60),
143 (
int)((
ts / (1000)) % 60), (
int)(
ts % 1000));
static void glCheckError(const char *stmt, const char *fname, int line)
Check for OpenGL errors and log them.
static const char * av_err2string(int errnum)
Workaround for av_err2str() not working with C++.
#define LOGERROR
log to LOG_ERR
static const char * Timestamp2StringMs(int64_t ts)
Input PTS is in ms.
static const char * Timestamp2StringPts(int64_t ts)
Input PTS is in PTSTICKS.
static uint32_t ReadBytes(const uint8_t *data, int count)
Return count amount of bytes from data
static void eglCheckError(const char *stmt, const char *fname, int line)
Check for EGL errors and log them.
static bool isInterlacedFrame(AVFrame *frame)
Check, if this is an interlaced frame.
static const char * Timestamp2String(int64_t ts, uint8_t divisor)
Nice time-stamp string.