24 #include <sys/types.h>
81 #define INPUT_DEQUEUE_TIMEOUT_US 8000
82 #define OUTPUT_DEQUEUE_TIMEOUT_US 8000
83 #define OUTPUT_DEQUEUE_BLOCK_TIMEOUT_US 1000000
132 color_format, color_format);
168 "Frame: width=%d stride=%d height=%d slice-height=%d "
169 "crop-top=%d crop-bottom=%d crop-left=%d crop-right=%d encoder=%s\n"
170 "destination linesizes=%d,%d,%d\n" ,
255 av_log(avctx,
AV_LOG_ERROR,
"Could not get %s from format %s\n",
"slice-height", format);
263 }
else if (strstr(s->
codec_name,
"OMX.SEC.avc.dec")) {
270 av_log(avctx,
AV_LOG_ERROR,
"Could not get %s from format %s\n",
"color-format", format);
299 "Output crop parameters top=%d bottom=%d left=%d right=%d, "
300 "resulting dimensions width=%d height=%d\n",
339 "Failed to configure codec (status = %d) with format %s\n",
351 "Failed to start codec (status = %d) with format %s\n",
362 "Failed to configure context\n");
383 int need_flushing = 0;
395 if (pkt->
size == 0) {
403 while (offset < pkt->size || (need_flushing && !s->
flushing)) {
429 av_log(avctx,
AV_LOG_ERROR,
"Failed to queue input empty buffer (status = %d)\n", status);
438 memcpy(data, pkt->
data + offset, size);
457 output_dequeue_timeout_us = 0;
469 " offset=%" PRIi32
" size=%" PRIi32
" ts=%" PRIi64
470 " flags=%" PRIu32
"\n", index, info.
offset, info.
size,
530 "while flushing remaining frames, output will probably lack frames\n",
531 output_dequeue_timeout_us / 1000);
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define AV_LOG_WARNING
Something somehow does not look correct.
memory handling functions
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
timestamp utils, mostly useful for debugging/logging purposes
enum AVPixelFormat pix_fmt
int width
width and height of the video frame
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
static const uint8_t offset[127][2]
int width
picture width / height.
GLsizei GLboolean const GLfloat * value
#define FF_ARRAY_ELEMS(a)
int64_t av_gettime(void)
Get the current time in microseconds.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
#define AV_LOG_INFO
Standard information.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static const char * format
int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
common internal and external API header
uint64_t dequeued_buffer_nb
#define AVERROR_EXTERNAL
Generic error in an external library.
AVPixelFormat
Pixel format.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.