33 const char *filename,
void *log_ctx)
49 "Failed to open input file '%s'\n", filename);
Libavcodec external API header.
#define FF_THREAD_SLICE
Decode more than one part of a single frame at once.
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
static const AVInputFormat * iformat
reference-counted frame API
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Alias for avcodec_receive_frame_flags(avctx, frame, 0).
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
const AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_load_image(struct AVFrame **outframe, const char *filename, void *log_ctx)
Load image from filename and put the resulting image in an AVFrame.
Miscellaneous utilities which make use of the libavformat library.
main external API structure.
int thread_type
Which multithreading methods to use.
This struct describes the properties of an encoded stream.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
AVStream ** streams
A list of all streams in the file.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.