doc/examples/decoding_encoding.c File Reference

libavcodec API use example. More...

#include <math.h>
#include <libavutil/opt.h>
#include <libavcodec/avcodec.h>
#include <libavutil/audioconvert.h>
#include <libavutil/common.h>
#include <libavutil/imgutils.h>
#include <libavutil/mathematics.h>
#include <libavutil/samplefmt.h>

Go to the source code of this file.

Defines

#define INBUF_SIZE   4096
#define AUDIO_INBUF_SIZE   20480
#define AUDIO_REFILL_THRESH   4096

Functions

static int check_sample_fmt (AVCodec *codec, enum AVSampleFormat sample_fmt)
static int select_sample_rate (AVCodec *codec)
static int select_channel_layout (AVCodec *codec)
static void audio_encode_example (const char *filename)
static void audio_decode_example (const char *outfilename, const char *filename)
static void video_encode_example (const char *filename, int codec_id)
static void pgm_save (unsigned char *buf, int wrap, int xsize, int ysize, char *filename)
static void video_decode_example (const char *outfilename, const char *filename)
int main (int argc, char **argv)


Detailed Description

libavcodec API use example.

Note that libavcodec only handles codecs (mpeg, mpeg4, etc...), not file formats (avi, vob, mp4, mov, mkv, mxf, flv, mpegts, mpegps, etc...). See library 'libavformat' for the format handling

Definition in file decoding_encoding.c.


Define Documentation

#define AUDIO_INBUF_SIZE   20480

Definition at line 43 of file decoding_encoding.c.

Referenced by audio_decode_example().

#define AUDIO_REFILL_THRESH   4096

Definition at line 44 of file decoding_encoding.c.

Referenced by audio_decode_example().

#define INBUF_SIZE   4096

Definition at line 42 of file decoding_encoding.c.

Referenced by video_decode_example().


Function Documentation

static void audio_decode_example ( const char *  outfilename,
const char *  filename 
) [static]

Definition at line 233 of file decoding_encoding.c.

Referenced by main().

static void audio_encode_example ( const char *  filename  )  [static]

Definition at line 102 of file decoding_encoding.c.

Referenced by main().

static int check_sample_fmt ( AVCodec codec,
enum AVSampleFormat  sample_fmt 
) [static]

Definition at line 47 of file decoding_encoding.c.

Referenced by audio_encode_example().

int main ( int  argc,
char **  argv 
)

Definition at line 601 of file decoding_encoding.c.

static void pgm_save ( unsigned char *  buf,
int  wrap,
int  xsize,
int  ysize,
char *  filename 
) [static]

Definition at line 465 of file decoding_encoding.c.

Referenced by video_decode_example().

static int select_channel_layout ( AVCodec codec  )  [static]

Definition at line 77 of file decoding_encoding.c.

Referenced by audio_encode_example().

static int select_sample_rate ( AVCodec codec  )  [static]

Definition at line 60 of file decoding_encoding.c.

Referenced by audio_encode_example().

static void video_decode_example ( const char *  outfilename,
const char *  filename 
) [static]

Definition at line 478 of file decoding_encoding.c.

Referenced by main().

static void video_encode_example ( const char *  filename,
int  codec_id 
) [static]

Definition at line 329 of file decoding_encoding.c.

Referenced by main().


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