26                   const char *filename, 
void *log_ctx)
 
   34     int frame_decoded, ret = 0;
 
   43                "Failed to open input file '%s'\n", filename);
 
   92     if (ret < 0 || !frame_decoded) {
 
  103     if ((ret = 
av_image_alloc(data, linesize, *w, *h, *pix_fmt, 16)) < 0)
 
static enum AVPixelFormat pix_fmt
 
This structure describes decoded (raw) audio or video data. 
 
ptrdiff_t const GLvoid * data
 
int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align)
Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordi...
 
enum AVCodecID codec_id
Specific type of the encoded data (the codec used). 
 
This struct describes the properties of an encoded stream. 
 
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values. 
 
static av_cold int end(AVCodecContext *avctx)
 
AVStream ** streams
A list of all streams in the file. 
 
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters. 
 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered. 
 
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g. 
 
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
 
void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height)
Copy image in src_data to dst_data. 
 
AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format. 
 
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values. 
 
int ff_load_image(uint8_t *data[4], int linesize[4], int *w, int *h, enum AVPixelFormat *pix_fmt, const char *filename, void *log_ctx)
Load image from filename and put the resulting image in data. 
 
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
 
static AVInputFormat * iformat
 
attribute_deprecated int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt)
Decode the video frame of size avpkt->size from avpkt->data into picture. 
 
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer...
 
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line. 
 
main external API structure. 
 
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID. 
 
void av_packet_unref(AVPacket *pkt)
Wipe the packet. 
 
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry. 
 
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec. 
 
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream. 
 
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes. 
 
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information. 
 
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values. 
 
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext. 
 
int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header. 
 
AVCodecParameters * codecpar
Codec parameters associated with this stream. 
 
AVPixelFormat
Pixel format. 
 
This structure stores compressed data. 
 
Miscellaneous utilities which make use of the libavformat library.