libavcodec/options.c File Reference

Options definition for AVCodecContext. More...

#include "avcodec.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include <float.h>
#include "options_table.h"

Go to the source code of this file.

Defines

#define alloc_and_copy_or_fail(obj, size, pad)
#define FOFFSET(x)   offsetof(AVFrame,x)
#define SROFFSET(x)   offsetof(AVSubtitleRect,x)

Functions

static const char * context_to_name (void *ptr)
static void * codec_child_next (void *obj, void *prev)
static const AVClasscodec_child_class_next (const AVClass *prev)
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)
 Set the fields of the given AVCodecContext to default values corresponding to the given codec (defaults may be codec-dependent).
AVCodecContextavcodec_alloc_context3 (AVCodec *codec)
 Allocate an AVCodecContext and set its fields to default values.
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.
const AVClassavcodec_get_class (void)
 Get the AVClass for AVCodecContext.
const AVClassavcodec_get_frame_class (void)
 Get the AVClass for AVFrame.
const AVClassavcodec_get_subtitle_rect_class (void)
 Get the AVClass for AVSubtitleRect.

Variables

static const AVClass av_codec_context_class
static const AVOption frame_options []
static const AVClass av_frame_class
static const AVOption subtitle_rect_options []
static const AVClass av_subtitle_rect_class


Detailed Description

Options definition for AVCodecContext.

Definition in file options.c.


Define Documentation

#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 FOFFSET (  )     offsetof(AVFrame,x)

Definition at line 233 of file options.c.

#define SROFFSET (  )     offsetof(AVSubtitleRect,x)

Definition at line 259 of file options.c.


Function Documentation

static const AVClass* codec_child_class_next ( const AVClass prev  )  [static]

Definition at line 52 of file options.c.

static void* codec_child_next ( void *  obj,
void *  prev 
) [static]

Definition at line 44 of file options.c.

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

Definition at line 35 of file options.c.


Variable Documentation

Initial value:

 {
    .class_name              = "AVCodecContext",
    .item_name               = context_to_name,
    .option                  = options,
    .version                 = LIBAVUTIL_VERSION_INT,
    .log_level_offset_offset = 0x42,
    .child_next              = codec_child_next,
    .child_class_next        = codec_child_class_next,
}

Definition at line 68 of file options.c.

const AVClass av_frame_class [static]

Initial value:

 {
    .class_name              = "AVFrame",
    .item_name               = NULL,
    .option                  = frame_options,
    .version                 = LIBAVUTIL_VERSION_INT,
}

Definition at line 247 of file options.c.

Initial value:

 {
    .class_name             = "AVSubtitleRect",
    .item_name              = NULL,
    .option                 = subtitle_rect_options,
    .version                = LIBAVUTIL_VERSION_INT,
}

Definition at line 271 of file options.c.

const AVOption frame_options[] [static]

Initial value:

{
{"best_effort_timestamp", "", FOFFSET(best_effort_timestamp), AV_OPT_TYPE_INT64, {.dbl = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, 0},
{"pkt_pos", "", FOFFSET(pkt_pos), AV_OPT_TYPE_INT64, {.dbl = -1 }, INT64_MIN, INT64_MAX, 0},
{"sample_aspect_ratio", "", FOFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0},
{"width", "", FOFFSET(width), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"height", "", FOFFSET(height), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"format", "", FOFFSET(format), AV_OPT_TYPE_INT, {.dbl = -1 }, 0, INT_MAX, 0},
{"channel_layout", "", FOFFSET(channel_layout), AV_OPT_TYPE_INT64, {.dbl = 0 }, 0, INT64_MAX, 0},
{"sample_rate", "", FOFFSET(sample_rate), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{NULL},
}

Definition at line 235 of file options.c.

const AVOption subtitle_rect_options[] [static]

Initial value:

{
{"x", "", SROFFSET(x), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"y", "", SROFFSET(y), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"w", "", SROFFSET(w), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"h", "", SROFFSET(h), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"type", "", SROFFSET(type), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, 0},
{"forced", "", SROFFSET(forced), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, 0},
{NULL},
}

Definition at line 261 of file options.c.


Generated on Fri Oct 26 02:47:58 2012 for FFmpeg by  doxygen 1.5.8