libavcodec/options.c File Reference

Options definition for AVCodecContext. More...

#include "avcodec.h"
#include "opt.h"
#include <float.h>

Go to the source code of this file.

Defines

#define OFFSET(x)   offsetof(AVCodecContext,x)
#define DEFAULT   0
#define V   AV_OPT_FLAG_VIDEO_PARAM
#define A   AV_OPT_FLAG_AUDIO_PARAM
#define S   AV_OPT_FLAG_SUBTITLE_PARAM
#define E   AV_OPT_FLAG_ENCODING_PARAM
#define D   AV_OPT_FLAG_DECODING_PARAM
#define AV_CODEC_DEFAULT_BITRATE   200*1000
#define alloc_and_copy_or_fail(obj, size, pad)

Functions

static const char * context_to_name (void *ptr)
void avcodec_get_context_defaults2 (AVCodecContext *s, enum AVMediaType codec_type)
 THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!
AVCodecContextavcodec_alloc_context2 (enum AVMediaType codec_type)
 THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!
void avcodec_get_context_defaults (AVCodecContext *s)
 Sets the fields of the given AVCodecContext to default values.
AVCodecContextavcodec_alloc_context (void)
 Allocates an AVCodecContext and sets its fields to default values.
int avcodec_copy_context (AVCodecContext *dest, const AVCodecContext *src)
 Copy the settings of the source AVCodecContext into the destination AVCodecContext.

Variables

static const AVOption options []
static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT }


Detailed Description

Options definition for AVCodecContext.

Definition in file options.c.


Define Documentation

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 44 of file options.c.

#define alloc_and_copy_or_fail ( obj,
size,
pad   ) 

Value:

if (src->obj && size > 0) { \
        dest->obj = av_malloc(size + pad); \
        if (!dest->obj) \
            goto fail; \
        memcpy(dest->obj, src->obj, size); \
        if (pad) \
            memset(((uint8_t *) dest->obj) + size, 0, pad); \
    }

Referenced by avcodec_copy_context().

#define AV_CODEC_DEFAULT_BITRATE   200*1000

Definition at line 49 of file options.c.

#define D   AV_OPT_FLAG_DECODING_PARAM

#define DEFAULT   0

Definition at line 41 of file options.c.

#define E   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 46 of file options.c.

Referenced by idct().

#define OFFSET (  )     offsetof(AVCodecContext,x)

Definition at line 40 of file options.c.

#define S   AV_OPT_FLAG_SUBTITLE_PARAM

Definition at line 45 of file options.c.

Referenced by dering_altivec(), fdct_row_mmx(), fdct_row_mmx2(), search_for_ms(), and wv_unpack_mono().

#define V   AV_OPT_FLAG_VIDEO_PARAM


Function Documentation

AVCodecContext* avcodec_alloc_context ( void   ) 

Allocates an AVCodecContext and sets its fields to default values.

The resulting struct can be deallocated by simply calling av_free().

Returns:
An AVCodecContext filled with default values or NULL on failure.
See also:
avcodec_get_context_defaults

Definition at line 470 of file options.c.

Referenced by add_av_stream1(), add_codec(), audio_decode_example(), audio_encode_example(), av_new_stream(), estimate_best_b_count(), ff_mov_init_hinting(), main(), mov_create_chapter_track(), read_ffserver_streams(), video_decode_example(), and video_encode_example().

AVCodecContext* avcodec_alloc_context2 ( enum AVMediaType  codec_type  ) 

THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!

Definition at line 456 of file options.c.

Referenced by avcodec_alloc_context(), and main().

int avcodec_copy_context ( AVCodecContext dest,
const AVCodecContext src 
)

Copy the settings of the source AVCodecContext into the destination AVCodecContext.

The resulting destination codec context will be unopened, i.e. you are required to call avcodec_open() before you can use this AVCodecContext to decode/encode video/audio data.

Parameters:
dest target codec context, should be initialized with avcodec_alloc_context(), but otherwise uninitialized
src source codec context
Returns:
AVERROR() on error (e.g. memory allocation error), 0 on success

Definition at line 474 of file options.c.

Referenced by read_ffserver_streams().

void avcodec_get_context_defaults ( AVCodecContext s  ) 

Sets the fields of the given AVCodecContext to default values.

Parameters:
s The AVCodecContext of which the fields should be set to default values.

Definition at line 466 of file options.c.

void avcodec_get_context_defaults2 ( AVCodecContext s,
enum AVMediaType  codec_type 
)

THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!

Definition at line 426 of file options.c.

Referenced by avcodec_alloc_context2(), avcodec_get_context_defaults(), new_audio_stream(), new_subtitle_stream(), new_video_stream(), and parse_ffconfig().

static const char* context_to_name ( void *  ptr  )  [static]

Definition at line 31 of file options.c.


Variable Documentation

const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT } [static]

Definition at line 424 of file options.c.

const AVOption options[] [static]

Definition at line 51 of file options.c.


Generated on Fri Oct 26 02:36:53 2012 for FFmpeg by  doxygen 1.5.8