Go to the documentation of this file.
95 codec_ctx = st->codec;
120 codec_ctx = st->codec;
157 if (!strcmp(opt->
name,
"frame_number"))
211 if (!strcmp(opt->
name,
"frame_number"))
216 if (strcmp(str1, str2)) {
228 int main(
int argc,
char* argv[])
int avcodec_close(AVCodecContext *avctx)
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext its...
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static av_cold int end(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
AVStream ** streams
A list of all streams in the file.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int avcodec_is_open(AVCodecContext *s)
static void dump_video_streams(const AVFormatContext *fmt_ctx, int decode)
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
const struct AVCodec * codec
enum AVDiscard skip_frame
Skip decoding for selected frames.
static int find_video_stream_info(AVFormatContext *fmt_ctx, int decode)
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.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
@ AVDISCARD_ALL
discard all
static AVFormatContext * fmt_ctx
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
printf("static const uint8_t my_array[100] = {\n")
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
static int open_and_probe_video_streams(AVFormatContext **fmt_ctx, const char *filename, int decode)
#define i(width, name, range_min, range_max)
int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
static int check_video_streams(const AVFormatContext *fmt_ctx1, const AVFormatContext *fmt_ctx2)
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.
const AVOption * av_opt_next(const void *obj, const AVOption *last)
Iterate over all AVOptions belonging to obj.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
main external API structure.
enum AVMediaType codec_type
This structure stores compressed data.
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec)
int main(int argc, char *argv[])
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
static int try_decode_video_frame(AVCodecContext *codec_ctx, AVPacket *pkt, int decode)