FFmpeg 8.1
Loading...
Searching...
No Matches
demux_decode.c File Reference

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 AVFormatContextfmt_ctx = NULL
static AVCodecContextvideo_dec_ctx = NULL
static AVCodecContextaudio_dec_ctx
static int width
static int height
static enum AVPixelFormat pix_fmt
static AVStreamvideo_stream = NULL
static AVStreamaudio_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 AVFrameframe = NULL
static AVPacketpkt = NULL
static int video_frame_count = 0
static int audio_frame_count = 0

Function Documentation

◆ output_video_frame()

int output_video_frame ( AVFrame * frame)
static
Examples
demux_decode.c.

Definition at line 59 of file demux_decode.c.

Referenced by decode_packet().

◆ output_audio_frame()

int output_audio_frame ( AVFrame * frame)
static
Examples
demux_decode.c.

Definition at line 90 of file demux_decode.c.

Referenced by decode_packet().

◆ decode_packet()

int decode_packet ( AVCodecContext * dec,
const AVPacket * pkt )
static
Examples
demux_decode.c, extract_mvs.c, and qsv_decode.c.

Definition at line 110 of file demux_decode.c.

Referenced by main().

◆ open_codec_context()

int open_codec_context ( int * stream_idx,
AVCodecContext ** dec_ctx,
AVFormatContext * fmt_ctx,
enum AVMediaType type )
static
Examples
demux_decode.c, and extract_mvs.c.

Definition at line 146 of file demux_decode.c.

Referenced by main().

◆ get_format_from_sample_fmt()

int get_format_from_sample_fmt ( const char ** fmt,
enum AVSampleFormat sample_fmt )
static

Definition at line 197 of file demux_decode.c.

◆ main()

int main ( int argc,
char ** argv )

Definition at line 226 of file demux_decode.c.

Variable Documentation

◆ fmt_ctx

AVFormatContext* fmt_ctx = NULL
static

Definition at line 38 of file demux_decode.c.

◆ video_dec_ctx

AVCodecContext* video_dec_ctx = NULL
static
Examples
demux_decode.c, and extract_mvs.c.

Definition at line 39 of file demux_decode.c.

Referenced by decode_packet(), main(), and open_codec_context().

◆ audio_dec_ctx

AVCodecContext * audio_dec_ctx
static
Examples
demux_decode.c.

Definition at line 39 of file demux_decode.c.

Referenced by main(), and output_audio_frame().

◆ width

◆ height

◆ pix_fmt

◆ video_stream

◆ audio_stream

AVStream * audio_stream = NULL
static
Examples
demux_decode.c.

Definition at line 42 of file demux_decode.c.

Referenced by main().

◆ src_filename

const char* src_filename = NULL
static
Examples
demux_decode.c, and extract_mvs.c.

Definition at line 43 of file demux_decode.c.

Referenced by main(), open_codec_context(), and open_codec_context().

◆ video_dst_filename

const char* video_dst_filename = NULL
static
Examples
demux_decode.c.

Definition at line 44 of file demux_decode.c.

Referenced by main().

◆ audio_dst_filename

const char* audio_dst_filename = NULL
static
Examples
demux_decode.c.

Definition at line 45 of file demux_decode.c.

Referenced by main().

◆ video_dst_file

FILE* video_dst_file = NULL
static
Examples
demux_decode.c.

Definition at line 46 of file demux_decode.c.

Referenced by main(), and output_video_frame().

◆ audio_dst_file

FILE* audio_dst_file = NULL
static
Examples
demux_decode.c.

Definition at line 47 of file demux_decode.c.

Referenced by main(), and output_audio_frame().

◆ video_dst_data

uint8_t* video_dst_data[4] = {NULL}
static
Examples
demux_decode.c.

Definition at line 49 of file demux_decode.c.

Referenced by main(), and output_video_frame().

◆ video_dst_linesize

int video_dst_linesize[4]
static
Examples
demux_decode.c.

Definition at line 50 of file demux_decode.c.

Referenced by main(), and output_video_frame().

◆ video_dst_bufsize

int video_dst_bufsize
static
Examples
demux_decode.c.

Definition at line 51 of file demux_decode.c.

Referenced by main(), and output_video_frame().

◆ video_stream_idx

int video_stream_idx = -1
static
Examples
demux_decode.c, and extract_mvs.c.

Definition at line 53 of file demux_decode.c.

Referenced by main(), and open_codec_context().

◆ audio_stream_idx

int audio_stream_idx = -1
static
Examples
demux_decode.c.

Definition at line 53 of file demux_decode.c.

Referenced by main().

◆ frame

AVFrame* frame = NULL
static
Examples
decode_audio.c, decode_filter_audio.c, decode_filter_video.c, decode_video.c, demux_decode.c, encode_audio.c, encode_video.c, extract_mvs.c, filter_audio.c, hw_decode.c, mux.c, qsv_decode.c, qsv_transcode.c, transcode.c, transcode_aac.c, vaapi_encode.c, and vaapi_transcode.c.

Definition at line 54 of file demux_decode.c.

Referenced by alloc_audio_frame(), alloc_frame(), av_ambient_viewing_environment_create_side_data(), av_buffersink_get_frame(), av_buffersink_get_frame_flags(), av_buffersink_get_samples(), av_buffersrc_add_frame(), av_buffersrc_add_frame_flags(), av_buffersrc_write_frame(), av_content_light_metadata_create_side_data(), av_detection_bbox_create_side_data(), av_downmix_info_update_side_data(), av_dv_frame_profile(), av_dynamic_hdr_plus_create_side_data(), av_dynamic_hdr_vivid_create_side_data(), av_film_grain_params_create_side_data(), av_film_grain_params_select(), av_frame_apply_cropping(), av_frame_free(), av_frame_get_buffer(), av_frame_get_plane_buffer(), av_frame_get_side_data(), av_frame_is_writable(), av_frame_make_writable(), av_frame_new_side_data(), av_frame_new_side_data_from_buf(), av_frame_remove_side_data(), av_frame_unref(), av_guess_frame_rate(), av_guess_sample_aspect_ratio(), av_hwframe_get_buffer(), av_interleaved_write_uncoded_frame(), av_mastering_display_metadata_create_side_data(), av_stereo3d_create_side_data(), av_video_enc_params_create_side_data(), av_video_hint_create_side_data(), av_write_uncoded_frame(), avcodec_default_get_buffer2(), avcodec_fill_audio_frame(), avcodec_receive_frame(), avcodec_receive_frame_flags(), avcodec_send_frame(), dec_enc(), dec_enc(), decode(), decode(), decode_audio_frame(), decode_packet(), decode_packet(), decode_packet(), decode_write(), display_frame(), encode(), encode(), encode_audio_frame(), encode_write(), encode_write(), encode_write(), filter_encode_write_frame(), get_audio_frame(), get_input(), init_input_frame(), init_output_frame(), main(), main(), output_audio_frame(), output_video_frame(), print_frame(), process_output(), sws_test_frame(), write_audio_frame(), and write_frame().

◆ pkt

◆ video_frame_count

int video_frame_count = 0
static
Examples
demux_decode.c, and extract_mvs.c.

Definition at line 56 of file demux_decode.c.

Referenced by decode_packet(), and output_video_frame().

◆ audio_frame_count

int audio_frame_count = 0
static
Examples
demux_decode.c.

Definition at line 57 of file demux_decode.c.

Referenced by output_audio_frame().