FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
options.c File Reference
#include "libavcodec/options.c"

Go to the source code of this file.

Data Structures

struct  Dummy12Context
 
struct  Dummy3Context
 

Macros

#define OFFSET(x)   offsetof(Dummy12Context, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int dummy_init (AVCodecContext *ctx)
 
static int dummy_close (AVCodecContext *ctx)
 
static int dummy_encode (AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static void test_copy_print_codec (const AVCodecContext *ctx)
 
static void test_copy (const AVCodec *c1, const AVCodec *c2)
 
int main (void)
 

Variables

static const AVOption dummy_options []
 
static const AVClass dummy_v1_class
 
static const AVClass dummy_v2_class
 
static AVCodec dummy_v1_encoder
 
static AVCodec dummy_v2_encoder
 
static AVCodec dummy_v3_encoder
 
static AVCodec dummy_v4_encoder
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(Dummy12Context, x)

Definition at line 56 of file options.c.

Definition at line 57 of file options.c.

Function Documentation

static int dummy_init ( AVCodecContext ctx)
static

Definition at line 24 of file options.c.

static int dummy_close ( AVCodecContext ctx)
static

Definition at line 32 of file options.c.

static int dummy_encode ( AVCodecContext ctx,
AVPacket pkt,
const AVFrame frame,
int got_packet 
)
static

Definition at line 39 of file options.c.

static void test_copy_print_codec ( const AVCodecContext ctx)
static

Definition at line 123 of file options.c.

Referenced by test_copy().

static void test_copy ( const AVCodec c1,
const AVCodec c2 
)
static

Definition at line 140 of file options.c.

Referenced by main().

int main ( void  )

Definition at line 176 of file options.c.

Variable Documentation

const AVOption dummy_options[]
static
Initial value:
= {
{ "str", "set str", OFFSET(str), AV_OPT_TYPE_STRING, { .str = "i'm src default value" }, 0, 0, VE},
{ "num", "set num", OFFSET(num), AV_OPT_TYPE_INT, { .i64 = 1500100900 }, 0, INT_MAX, VE},
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: options.c:56
#define VE
Definition: options.c:57

Definition at line 58 of file options.c.

const AVClass dummy_v1_class
static
Initial value:
= {
.class_name = "dummy_v1_class",
.item_name = av_default_item_name,
.option = dummy_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:193
static const AVOption dummy_options[]
Definition: options.c:58

Definition at line 64 of file options.c.

const AVClass dummy_v2_class
static
Initial value:
= {
.class_name = "dummy_v2_class",
.item_name = av_default_item_name,
.option = dummy_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:193
static const AVOption dummy_options[]
Definition: options.c:58

Definition at line 71 of file options.c.

AVCodec dummy_v1_encoder
static
Initial value:
= {
.name = "dummy_v1_codec",
.id = AV_CODEC_ID_NONE - 1,
.encode2 = dummy_encode,
.init = dummy_init,
.close = dummy_close,
.priv_class = &dummy_v1_class,
.priv_data_size = sizeof(Dummy12Context),
}
static int dummy_init(AVCodecContext *ctx)
Definition: options.c:24
static const AVClass dummy_v1_class
Definition: options.c:64
static int dummy_close(AVCodecContext *ctx)
Definition: options.c:32
static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: options.c:39

Definition at line 79 of file options.c.

Referenced by main().

AVCodec dummy_v2_encoder
static
Initial value:
= {
.name = "dummy_v2_codec",
.id = AV_CODEC_ID_NONE - 2,
.encode2 = dummy_encode,
.init = dummy_init,
.close = dummy_close,
.priv_class = &dummy_v2_class,
.priv_data_size = sizeof(Dummy12Context),
}
static int dummy_init(AVCodecContext *ctx)
Definition: options.c:24
static const AVClass dummy_v2_class
Definition: options.c:71
static int dummy_close(AVCodecContext *ctx)
Definition: options.c:32
static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: options.c:39

Definition at line 91 of file options.c.

Referenced by main().

AVCodec dummy_v3_encoder
static
Initial value:
= {
.name = "dummy_v3_codec",
.id = AV_CODEC_ID_NONE - 3,
.encode2 = dummy_encode,
.init = dummy_init,
.close = dummy_close,
.priv_data_size = sizeof(Dummy3Context),
}
static int dummy_init(AVCodecContext *ctx)
Definition: options.c:24
static int dummy_close(AVCodecContext *ctx)
Definition: options.c:32
static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: options.c:39

Definition at line 103 of file options.c.

Referenced by main().

AVCodec dummy_v4_encoder
static
Initial value:
= {
.name = "dummy_v4_codec",
.id = AV_CODEC_ID_NONE - 4,
.encode2 = dummy_encode,
.init = dummy_init,
.close = dummy_close,
}
static int dummy_init(AVCodecContext *ctx)
Definition: options.c:24
static int dummy_close(AVCodecContext *ctx)
Definition: options.c:32
static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: options.c:39

Definition at line 114 of file options.c.

Referenced by main().