doc/examples/demuxing.c File Reference

libavformat demuxing API use example. More...

#include <libavutil/imgutils.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavformat/avformat.h>

Go to the source code of this file.

Functions

static int decode_packet (int *got_frame, int cached)
static int open_codec_context (int *stream_idx, 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 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_tvideo_dst_data [4] = {NULL}
static int video_dst_linesize [4]
static int video_dst_bufsize
static uint8_t ** audio_dst_data = NULL
static int audio_dst_linesize
static int audio_dst_bufsize
static int video_stream_idx = -1
static int audio_stream_idx = -1
static AVFrameframe = NULL
static AVPacket pkt
static int video_frame_count = 0
static int audio_frame_count = 0


Detailed Description

libavformat demuxing API use example.

Show how to use the libavformat and libavcodec API to demux and decode audio and video data.

Definition in file demuxing.c.


Function Documentation

static int decode_packet ( int got_frame,
int  cached 
) [static]

Definition at line 59 of file demuxing.c.

Referenced by decode_packets(), and main().

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

Definition at line 162 of file demuxing.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 191 of file demuxing.c.

static int open_codec_context ( int stream_idx,
AVFormatContext fmt_ctx,
enum AVMediaType  type 
) [static]

Definition at line 126 of file demuxing.c.

Referenced by main().


Variable Documentation

Definition at line 37 of file demuxing.c.

Referenced by decode_packet(), and main().

Definition at line 51 of file demuxing.c.

Referenced by decode_packet().

uint8_t** audio_dst_data = NULL [static]

Definition at line 49 of file demuxing.c.

Referenced by decode_packet(), and main().

FILE* audio_dst_file = NULL [static]

Definition at line 43 of file demuxing.c.

Referenced by decode_packet(), and main().

const char* audio_dst_filename = NULL [static]

Definition at line 41 of file demuxing.c.

Referenced by main().

Definition at line 50 of file demuxing.c.

Referenced by decode_packet().

int audio_frame_count = 0 [static]

Definition at line 57 of file demuxing.c.

Referenced by decode_packet(), and fourxm_read_packet().

AVStream * audio_stream = NULL [static]

Definition at line 38 of file demuxing.c.

Referenced by main(), and yop_read_header().

int audio_stream_idx = -1 [static]

Definition at line 53 of file demuxing.c.

Referenced by decode_packet(), and main().

Definition at line 36 of file demuxing.c.

Referenced by close_input_file(), main(), open_input_file(), and probe_file().

AVFrame* frame = NULL [static]

AVPacket pkt [static]

const char* src_filename = NULL [static]

Definition at line 39 of file demuxing.c.

Referenced by main(), and open_codec_context().

Definition at line 37 of file demuxing.c.

Definition at line 47 of file demuxing.c.

Referenced by decode_packet(), and main().

uint8_t* video_dst_data[4] = {NULL} [static]

Definition at line 45 of file demuxing.c.

Referenced by decode_packet(), and main().

FILE* video_dst_file = NULL [static]

Definition at line 42 of file demuxing.c.

Referenced by decode_packet(), and main().

const char* video_dst_filename = NULL [static]

Definition at line 40 of file demuxing.c.

Referenced by main().

int video_dst_linesize[4] [static]

Definition at line 46 of file demuxing.c.

Referenced by decode_packet(), and main().

int video_frame_count = 0 [static]

Definition at line 56 of file demuxing.c.

Referenced by decode_packet().

AVStream* video_stream = NULL [static]

Definition at line 38 of file demuxing.c.

Referenced by yop_read_header().

int video_stream_idx = -1 [static]

Definition at line 53 of file demuxing.c.

Referenced by decode_packet(), and main().


Generated on Fri Oct 26 02:50:03 2012 for FFmpeg by  doxygen 1.5.8