libavcodec/options.c File Reference

Options definition for AVCodecContext. More...

#include "avcodec.h"
#include "libavutil/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)
static const AVOptionopt_find (void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
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!
int avcodec_get_context_defaults3 (AVCodecContext *s, AVCodec *codec)
 THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!
AVCodecContextavcodec_alloc_context3 (AVCodec *codec)
 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)
 Set the fields of the given AVCodecContext to default values.
AVCodecContextavcodec_alloc_context (void)
 Allocate an AVCodecContext and set 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, OFFSET(log_level_offset), .opt_find = opt_find}


Detailed Description

Options definition for AVCodecContext.

Definition in file options.c.


Define Documentation

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 63 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 68 of file options.c.

#define D   AV_OPT_FLAG_DECODING_PARAM

#define DEFAULT   0

Definition at line 60 of file options.c.

#define E   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 65 of file options.c.

#define OFFSET (  )     offsetof(AVCodecContext,x)

Definition at line 59 of file options.c.

#define S   AV_OPT_FLAG_SUBTITLE_PARAM

Definition at line 64 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

Definition at line 62 of file options.c.


Function Documentation

AVCodecContext* avcodec_alloc_context ( void   ) 

Allocate an AVCodecContext and set 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 555 of file options.c.

Referenced by add_av_stream1(), add_codec(), audio_decode_example(), audio_encode_example(), av_new_stream(), config(), estimate_best_b_count(), ff_mov_init_hinting(), main(), mov_create_chapter_track(), read_ffserver_streams(), vf_open(), 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 541 of file options.c.

Referenced by avcodec_alloc_context(), and init_opts().

AVCodecContext* avcodec_alloc_context3 ( AVCodec codec  ) 

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

Definition at line 528 of file options.c.

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 559 of file options.c.

Referenced by applehttp_read_header(), ff_rtp_chain_mux_open(), http_receive_data(), read_ffserver_streams(), sap_fetch_packet(), and sap_read_header().

void avcodec_get_context_defaults ( AVCodecContext s  ) 

Set 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 551 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 481 of file options.c.

Referenced by avcodec_alloc_context2(), avcodec_get_context_defaults(), avcodec_get_context_defaults3(), and parse_ffconfig().

int avcodec_get_context_defaults3 ( AVCodecContext s,
AVCodec codec 
)

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

Definition at line 511 of file options.c.

Referenced by avcodec_alloc_context3(), new_audio_stream(), new_data_stream(), new_subtitle_stream(), and new_video_stream().

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

Definition at line 31 of file options.c.

static const AVOption* opt_find ( void *  obj,
const char *  name,
const char *  unit,
int  opt_flags,
int  search_flags 
) [static]

Definition at line 40 of file options.c.


Variable Documentation

const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT, OFFSET(log_level_offset), .opt_find = opt_find} [static]

Definition at line 479 of file options.c.

const AVOption options[] [static]

Definition at line 70 of file options.c.


Generated on Fri Oct 26 02:38:17 2012 for FFmpeg by  doxygen 1.5.8