FFmpeg 5.1.6
|
Demuxing and decoding example. More...
#include <libavutil/imgutils.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
Go to the source code of this file.
Functions | |
static int | output_video_frame (AVFrame *frame) |
static int | output_audio_frame (AVFrame *frame) |
static int | decode_packet (AVCodecContext *dec, const AVPacket *pkt) |
static int | open_codec_context (int *stream_idx, AVCodecContext **dec_ctx, AVFormatContext *fmt_ctx, enum AVMediaType type) |
static int | get_format_from_sample_fmt (const char **fmt, enum AVSampleFormat sample_fmt) |
int | main (int argc, char **argv) |
Variables | |
static AVFormatContext * | fmt_ctx = NULL |
static AVCodecContext * | video_dec_ctx = NULL |
static AVCodecContext * | audio_dec_ctx |
static int | width |
static int | height |
static enum AVPixelFormat | pix_fmt |
static AVStream * | video_stream = NULL |
static AVStream * | audio_stream = NULL |
static const char * | src_filename = NULL |
static const char * | video_dst_filename = NULL |
static const char * | audio_dst_filename = NULL |
static FILE * | video_dst_file = NULL |
static FILE * | audio_dst_file = NULL |
static uint8_t * | video_dst_data [4] = {NULL} |
static int | video_dst_linesize [4] |
static int | video_dst_bufsize |
static int | video_stream_idx = -1 |
static int | audio_stream_idx = -1 |
static AVFrame * | frame = NULL |
static AVPacket * | pkt = NULL |
static int | video_frame_count = 0 |
static int | audio_frame_count = 0 |
Demuxing and decoding example.
Show how to use the libavformat and libavcodec API to demux and decode audio and video data.
Definition in file demuxing_decoding.c.
|
static |
Definition at line 59 of file demuxing_decoding.c.
Referenced by decode_packet().
|
static |
Definition at line 90 of file demuxing_decoding.c.
Referenced by decode_packet().
|
static |
Definition at line 110 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 146 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 197 of file demuxing_decoding.c.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 226 of file demuxing_decoding.c.
|
static |
Definition at line 38 of file demuxing_decoding.c.
Referenced by log_packet(), main(), open_codec_context(), and write_frame().
|
static |
Definition at line 39 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 39 of file demuxing_decoding.c.
Referenced by main(), and output_audio_frame().
|
static |
Definition at line 40 of file demuxing_decoding.c.
Referenced by alloc_picture(), fill_yuv_image(), main(), and output_video_frame().
|
static |
Definition at line 40 of file demuxing_decoding.c.
Referenced by alloc_picture(), fill_yuv_image(), main(), and output_video_frame().
|
static |
Definition at line 41 of file demuxing_decoding.c.
Referenced by alloc_picture(), main(), and output_video_frame().
|
static |
Definition at line 42 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 42 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 43 of file demuxing_decoding.c.
Referenced by main(), and open_codec_context().
|
static |
Definition at line 44 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 45 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 46 of file demuxing_decoding.c.
Referenced by main(), and output_video_frame().
|
static |
Definition at line 47 of file demuxing_decoding.c.
Referenced by main(), and output_audio_frame().
|
static |
Definition at line 49 of file demuxing_decoding.c.
Referenced by main(), and output_video_frame().
|
static |
Definition at line 50 of file demuxing_decoding.c.
Referenced by main(), and output_video_frame().
|
static |
Definition at line 51 of file demuxing_decoding.c.
Referenced by main(), and output_video_frame().
|
static |
Definition at line 53 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 53 of file demuxing_decoding.c.
Referenced by main().
|
static |
Definition at line 54 of file demuxing_decoding.c.
Referenced by alloc_audio_frame(), dec_enc(), decode(), decode_audio_frame(), decode_packet(), decode_write(), display_frame(), encode(), encode_audio_frame(), encode_write(), filter_encode_write_frame(), get_audio_frame(), get_input(), init_input_frame(), init_output_frame(), main(), output_audio_frame(), output_video_frame(), print_frame(), process_output(), write_audio_frame(), and write_frame().
|
static |
Definition at line 55 of file demuxing_decoding.c.
Referenced by dec_enc(), decode(), decode_packet(), encode(), log_packet(), main(), and write_frame().
|
static |
Definition at line 56 of file demuxing_decoding.c.
Referenced by output_video_frame().
|
static |
Definition at line 57 of file demuxing_decoding.c.
Referenced by output_audio_frame().