FFmpeg
Macros | Functions | Variables
opt.c File Reference
#include "avutil.h"
#include "avassert.h"
#include "avstring.h"
#include "channel_layout.h"
#include "dict.h"
#include "eval.h"
#include "log.h"
#include "mem.h"
#include "parseutils.h"
#include "pixdesc.h"
#include "mathematics.h"
#include "opt.h"
#include "samplefmt.h"
#include "bprint.h"
#include "version.h"
#include <float.h>

Go to the source code of this file.

Macros

#define TYPE_BASE(type)   ((type) & ~AV_OPT_TYPE_FLAG_ARRAY)
 
#define DEFAULT_NUMVAL(opt)
 
#define OPT_EVAL_NUMBER(name, opttype, vartype)
 
#define WHITESPACES   " \n\t\r"
 

Functions

const AVOptionav_opt_next (const void *obj, const AVOption *last)
 Iterate over all AVOptions belonging to obj. More...
 
static int opt_is_pod (enum AVOptionType type)
 
static uint8_t opt_array_sep (const AVOption *o)
 
static void * opt_array_pelem (const AVOption *o, void *array, unsigned idx)
 
static unsigned * opt_array_pcount (const void *parray)
 
static void opt_free_elem (enum AVOptionType type, void *ptr)
 
static void opt_free_array (const AVOption *o, void *parray, unsigned *count)
 
static int opt_set_init (void *obj, const char *name, int search_flags, int require_type, void **ptgt, const AVOption **po, void **pdst)
 Perform common setup for option-setting functions. More...
 
static AVRational double_to_rational (double d)
 
static int read_number (const AVOption *o, const void *dst, double *num, int *den, int64_t *intnum)
 
static int write_number (void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum)
 
static int hexchar2int (char c)
 
static int set_string_binary (void *obj, const AVOption *o, const char *val, uint8_t **dst)
 
static int set_string (void *obj, const AVOption *o, const char *val, uint8_t **dst)
 
static int set_string_number (void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
 
static int set_string_image_size (void *obj, const AVOption *o, const char *val, int *dst)
 
static int set_string_video_rate (void *obj, const AVOption *o, const char *val, AVRational *dst)
 
static int set_string_color (void *obj, const AVOption *o, const char *val, uint8_t *dst)
 
static const char * get_bool_name (int val)
 
static int set_string_bool (void *obj, const AVOption *o, const char *val, int *dst)
 
static int set_string_fmt (void *obj, const AVOption *o, const char *val, uint8_t *dst, int fmt_nb, int((*get_fmt)(const char *)), const char *desc)
 
static int get_pix_fmt (const char *name)
 
static int set_string_pixel_fmt (void *obj, const AVOption *o, const char *val, uint8_t *dst)
 
static int get_sample_fmt (const char *name)
 
static int set_string_sample_fmt (void *obj, const AVOption *o, const char *val, uint8_t *dst)
 
static int set_string_dict (void *obj, const AVOption *o, const char *val, uint8_t **dst)
 
static int set_string_channel_layout (void *obj, const AVOption *o, const char *val, void *dst)
 
static int opt_set_elem (void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
 
static int opt_set_array (void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
 
int av_opt_set (void *obj, const char *name, const char *val, int search_flags)
 
static int set_number (void *obj, const char *name, double num, int den, int64_t intnum, int search_flags, int require_type)
 
int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags)
 
int av_opt_set_double (void *obj, const char *name, double val, int search_flags)
 
int av_opt_set_q (void *obj, const char *name, AVRational val, int search_flags)
 
int av_opt_set_bin (void *obj, const char *name, const uint8_t *val, int len, int search_flags)
 
int av_opt_set_image_size (void *obj, const char *name, int w, int h, int search_flags)
 
int av_opt_set_video_rate (void *obj, const char *name, AVRational val, int search_flags)
 
static int set_format (void *obj, const char *name, int fmt, int search_flags, enum AVOptionType type, const char *desc, int nb_fmts)
 
int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags)
 
int av_opt_set_sample_fmt (void *obj, const char *name, enum AVSampleFormat fmt, int search_flags)
 
int av_opt_set_dict_val (void *obj, const char *name, const AVDictionary *val, int search_flags)
 
int av_opt_set_chlayout (void *obj, const char *name, const AVChannelLayout *channel_layout, int search_flags)
 
static void format_duration (char *buf, size_t size, int64_t d)
 
static int opt_get_elem (const AVOption *o, uint8_t **pbuf, size_t buf_len, const void *dst, int search_flags)
 
static int opt_get_array (const AVOption *o, void *dst, uint8_t **out_val)
 
int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val)
 
static int get_number (void *obj, const char *name, double *num, int *den, int64_t *intnum, int search_flags)
 
int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val)
 
int av_opt_get_double (void *obj, const char *name, int search_flags, double *out_val)
 
int av_opt_get_q (void *obj, const char *name, int search_flags, AVRational *out_val)
 
int av_opt_get_image_size (void *obj, const char *name, int search_flags, int *w_out, int *h_out)
 
int av_opt_get_video_rate (void *obj, const char *name, int search_flags, AVRational *out_val)
 
static int get_format (void *obj, const char *name, int search_flags, int *out_fmt, enum AVOptionType type, const char *desc)
 
int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt)
 
int av_opt_get_sample_fmt (void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt)
 
int av_opt_get_chlayout (void *obj, const char *name, int search_flags, AVChannelLayout *cl)
 
int av_opt_get_dict_val (void *obj, const char *name, int search_flags, AVDictionary **out_val)
 
int av_opt_flag_is_set (void *obj, const char *field_name, const char *flag_name)
 Check whether a particular flag is set in a flags field. More...
 
static void log_int_value (void *av_log_obj, int level, int64_t i)
 
static void log_value (void *av_log_obj, int level, double d)
 
static const char * get_opt_const_name (void *obj, const char *unit, int64_t value)
 
static char * get_opt_flags_string (void *obj, const char *unit, int64_t value)
 
static void log_type (void *av_log_obj, const AVOption *o, enum AVOptionType parent_type)
 
static void log_default (void *obj, void *av_log_obj, const AVOption *opt)
 
static void opt_list (void *obj, void *av_log_obj, const char *unit, int req_flags, int rej_flags, enum AVOptionType parent_type)
 
int av_opt_show2 (void *obj, void *av_log_obj, int req_flags, int rej_flags)
 Show the obj options. More...
 
void av_opt_set_defaults (void *s)
 Set the values of all AVOption fields to their default values. More...
 
void av_opt_set_defaults2 (void *s, int mask, int flags)
 Set the values of all AVOption fields to their default values. More...
 
static int parse_key_value_pair (void *ctx, const char **buf, const char *key_val_sep, const char *pairs_sep)
 Store the value in the field in ctx that is named like key. More...
 
int av_set_options_string (void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
 Parse the key/value pairs list in opts. More...
 
static int is_key_char (char c)
 
static int get_key (const char **ropts, const char *delim, char **rkey)
 Read a key from a string. More...
 
int av_opt_get_key_value (const char **ropts, const char *key_val_sep, const char *pairs_sep, unsigned flags, char **rkey, char **rval)
 Extract a key-value pair from the beginning of a string. More...
 
int av_opt_set_from_string (void *ctx, const char *opts, const char *const *shorthand, const char *key_val_sep, const char *pairs_sep)
 Parse the key-value pairs list in opts. More...
 
void av_opt_free (void *obj)
 Free all allocated objects in obj. More...
 
int av_opt_set_dict2 (void *obj, AVDictionary **options, int search_flags)
 Set all the options from a given dictionary on an object. More...
 
int av_opt_set_dict (void *obj, AVDictionary **options)
 Set all the options from a given dictionary on an object. More...
 
const AVOptionav_opt_find (void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
 Look for an option in an object. More...
 
const AVOptionav_opt_find2 (void *obj, const char *name, const char *unit, int opt_flags, int search_flags, void **target_obj)
 Look for an option in an object. More...
 
void * av_opt_child_next (void *obj, void *prev)
 Iterate over AVOptions-enabled children of obj. More...
 
const AVClassav_opt_child_class_iterate (const AVClass *parent, void **iter)
 Iterate over potential AVOptions-enabled children of parent. More...
 
void * av_opt_ptr (const AVClass *class, void *obj, const char *name)
 Gets a pointer to the requested field in a struct. More...
 
static int opt_copy_elem (void *logctx, enum AVOptionType type, void *dst, const void *src)
 
static int opt_copy_array (void *logctx, const AVOption *o, void **pdst, const void *const *psrc)
 
int av_opt_copy (void *dst, const void *src)
 Copy options from src object into dest object. More...
 
int av_opt_get_array_size (void *obj, const char *name, int search_flags, unsigned int *out_val)
 For an array-type option, get the number of elements in the array. More...
 
int av_opt_get_array (void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType out_type, void *out_val)
 For an array-type option, retrieve the values of one or more array elements. More...
 
int av_opt_set_array (void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType val_type, const void *val)
 Add, replace, or remove elements for an array option. More...
 
int av_opt_query_ranges (AVOptionRanges **ranges_arg, void *obj, const char *key, int flags)
 Get a list of allowed ranges for the given option. More...
 
int av_opt_query_ranges_default (AVOptionRanges **ranges_arg, void *obj, const char *key, int flags)
 Get a default list of allowed ranges for the given option. More...
 
void av_opt_freep_ranges (AVOptionRanges **rangesp)
 Free an AVOptionRanges struct and set it to NULL. More...
 
int av_opt_is_set_to_default (void *obj, const AVOption *o)
 Check if given option is set to its default value. More...
 
int av_opt_is_set_to_default_by_name (void *obj, const char *name, int search_flags)
 Check if given option is set to its default value. More...
 
static int opt_serialize (void *obj, int opt_flags, int flags, int *cnt, AVBPrint *bprint, const char key_val_sep, const char pairs_sep)
 
int av_opt_serialize (void *obj, int opt_flags, int flags, char **buffer, const char key_val_sep, const char pairs_sep)
 Serialize object's options. More...
 

Variables

struct {
   size_t   size
 
   const char *   name
 
opt_type_desc []
 

Detailed Description

AVOptions

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file opt.c.

Macro Definition Documentation

◆ TYPE_BASE

#define TYPE_BASE (   type)    ((type) & ~AV_OPT_TYPE_FLAG_ARRAY)

Definition at line 46 of file opt.c.

◆ DEFAULT_NUMVAL

#define DEFAULT_NUMVAL (   opt)
Value:
((opt->type == AV_OPT_TYPE_INT64 || \
opt->type == AV_OPT_TYPE_UINT64 || \
opt->type == AV_OPT_TYPE_CONST || \
opt->type == AV_OPT_TYPE_FLAGS || \
opt->type == AV_OPT_TYPE_UINT || \
opt->type == AV_OPT_TYPE_INT) \
? opt->default_val.i64 \
: opt->default_val.dbl)

Definition at line 411 of file opt.c.

◆ OPT_EVAL_NUMBER

#define OPT_EVAL_NUMBER (   name,
  opttype,
  vartype 
)
Value:
int av_opt_eval_ ## name(void *obj, const AVOption *o, \
const char *val, vartype *name ## _out) \
{ \
if (!o || o->type != opttype || o->flags & AV_OPT_FLAG_READONLY) \
return AVERROR(EINVAL); \
return set_string_number(obj, obj, o, val, name ## _out); \
}

Definition at line 849 of file opt.c.

◆ WHITESPACES

#define WHITESPACES   " \n\t\r"

Definition at line 1837 of file opt.c.

Function Documentation

◆ opt_is_pod()

static int opt_is_pod ( enum AVOptionType  type)
static

Definition at line 87 of file opt.c.

Referenced by opt_copy_elem().

◆ opt_array_sep()

static uint8_t opt_array_sep ( const AVOption o)
static

Definition at line 110 of file opt.c.

Referenced by av_opt_set_defaults2(), opt_get_array(), and opt_set_array().

◆ opt_array_pelem()

static void* opt_array_pelem ( const AVOption o,
void *  array,
unsigned  idx 
)
static

◆ opt_array_pcount()

static unsigned* opt_array_pcount ( const void *  parray)
static

◆ opt_free_elem()

static void opt_free_elem ( enum AVOptionType  type,
void *  ptr 
)
static

Definition at line 128 of file opt.c.

Referenced by av_opt_free(), av_opt_get_array(), av_opt_set_array(), and opt_free_array().

◆ opt_free_array()

static void opt_free_array ( const AVOption o,
void *  parray,
unsigned *  count 
)
static

Definition at line 149 of file opt.c.

Referenced by av_opt_free(), av_opt_set_array(), opt_copy_array(), and opt_set_array().

◆ opt_set_init()

static int opt_set_init ( void *  obj,
const char *  name,
int  search_flags,
int  require_type,
void **  ptgt,
const AVOption **  po,
void **  pdst 
)
static

Perform common setup for option-setting functions.

Parameters
require_typewhen non-0, require the option to be of this type
ptgttarget object is written here
pothe option is written here
pdstpointer to option value is written here

Definition at line 166 of file opt.c.

Referenced by av_opt_set(), av_opt_set_array(), av_opt_set_bin(), av_opt_set_chlayout(), av_opt_set_dict_val(), av_opt_set_image_size(), set_format(), and set_number().

◆ double_to_rational()

static AVRational double_to_rational ( double  d)
static

Definition at line 234 of file opt.c.

Referenced by av_opt_get_array(), av_opt_get_q(), and write_number().

◆ read_number()

static int read_number ( const AVOption o,
const void *  dst,
double num,
int *  den,
int64_t intnum 
)
static

Definition at line 242 of file opt.c.

Referenced by av_opt_get_array(), av_opt_is_set_to_default(), av_opt_set_array(), and get_number().

◆ write_number()

static int write_number ( void *  obj,
const AVOption o,
void *  dst,
double  num,
int  den,
int64_t  intnum 
)
static

◆ hexchar2int()

static int hexchar2int ( char  c)
static

Definition at line 358 of file opt.c.

Referenced by set_string_binary().

◆ set_string_binary()

static int set_string_binary ( void *  obj,
const AVOption o,
const char *  val,
uint8_t **  dst 
)
static

Definition at line 368 of file opt.c.

Referenced by av_opt_is_set_to_default(), av_opt_set_defaults2(), and opt_set_elem().

◆ set_string()

static int set_string ( void *  obj,
const AVOption o,
const char *  val,
uint8_t **  dst 
)
static

Definition at line 402 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ set_string_number()

static int set_string_number ( void *  obj,
void *  target_obj,
const AVOption o,
const char *  val,
void *  dst 
)
static

Definition at line 420 of file opt.c.

Referenced by opt_set_elem().

◆ set_string_image_size()

static int set_string_image_size ( void *  obj,
const AVOption o,
const char *  val,
int *  dst 
)
static

Definition at line 514 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ set_string_video_rate()

static int set_string_video_rate ( void *  obj,
const AVOption o,
const char *  val,
AVRational dst 
)
static

Definition at line 529 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ set_string_color()

static int set_string_color ( void *  obj,
const AVOption o,
const char *  val,
uint8_t *  dst 
)
static

Definition at line 537 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ get_bool_name()

static const char* get_bool_name ( int  val)
static

Definition at line 552 of file opt.c.

Referenced by log_default(), and opt_get_elem().

◆ set_string_bool()

static int set_string_bool ( void *  obj,
const AVOption o,
const char *  val,
int *  dst 
)
static

Definition at line 559 of file opt.c.

Referenced by opt_set_elem().

◆ set_string_fmt()

static int set_string_fmt ( void *  obj,
const AVOption o,
const char *  val,
uint8_t *  dst,
int  fmt_nb,
int((*get_fmt)(const char *))  ,
const char *  desc 
)
static

Definition at line 590 of file opt.c.

Referenced by set_string_pixel_fmt(), and set_string_sample_fmt().

◆ get_pix_fmt()

static int get_pix_fmt ( const char *  name)
static

Definition at line 630 of file opt.c.

Referenced by set_string_pixel_fmt().

◆ set_string_pixel_fmt()

static int set_string_pixel_fmt ( void *  obj,
const AVOption o,
const char *  val,
uint8_t *  dst 
)
static

Definition at line 635 of file opt.c.

Referenced by opt_set_elem().

◆ get_sample_fmt()

static int get_sample_fmt ( const char *  name)
static

Definition at line 641 of file opt.c.

Referenced by set_string_sample_fmt().

◆ set_string_sample_fmt()

static int set_string_sample_fmt ( void *  obj,
const AVOption o,
const char *  val,
uint8_t *  dst 
)
static

Definition at line 646 of file opt.c.

Referenced by opt_set_elem().

◆ set_string_dict()

static int set_string_dict ( void *  obj,
const AVOption o,
const char *  val,
uint8_t **  dst 
)
static

Definition at line 652 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ set_string_channel_layout()

static int set_string_channel_layout ( void *  obj,
const AVOption o,
const char *  val,
void *  dst 
)
static

Definition at line 670 of file opt.c.

Referenced by av_opt_set_defaults2(), and opt_set_elem().

◆ opt_set_elem()

static int opt_set_elem ( void *  obj,
void *  target_obj,
const AVOption o,
const char *  val,
void *  dst 
)
static

Definition at line 680 of file opt.c.

Referenced by av_opt_set(), av_opt_set_array(), and opt_set_array().

◆ opt_set_array()

static int opt_set_array ( void *  obj,
void *  target_obj,
const AVOption o,
const char *  val,
void *  dst 
)
static

Definition at line 756 of file opt.c.

Referenced by av_opt_set(), and av_opt_set_defaults2().

◆ set_number()

static int set_number ( void *  obj,
const char *  name,
double  num,
int  den,
int64_t  intnum,
int  search_flags,
int  require_type 
)
static

Definition at line 866 of file opt.c.

Referenced by av_opt_set_double(), av_opt_set_int(), av_opt_set_q(), and av_opt_set_video_rate().

◆ set_format()

static int set_format ( void *  obj,
const char *  name,
int  fmt,
int  search_flags,
enum AVOptionType  type,
const char *  desc,
int  nb_fmts 
)
static

Definition at line 950 of file opt.c.

Referenced by av_opt_set_pixel_fmt(), av_opt_set_sample_fmt(), and dshow_cycle_pins().

◆ format_duration()

static void format_duration ( char *  buf,
size_t  size,
int64_t  d 
)
static

Definition at line 1015 of file opt.c.

Referenced by log_default(), and opt_get_elem().

◆ opt_get_elem()

static int opt_get_elem ( const AVOption o,
uint8_t **  pbuf,
size_t  buf_len,
const void *  dst,
int  search_flags 
)
static

Definition at line 1050 of file opt.c.

Referenced by av_opt_get(), av_opt_get_array(), and opt_get_array().

◆ opt_get_array()

static int opt_get_array ( const AVOption o,
void *  dst,
uint8_t **  out_val 
)
static

Definition at line 1155 of file opt.c.

Referenced by av_opt_get(), and av_opt_is_set_to_default().

◆ get_number()

static int get_number ( void *  obj,
const char *  name,
double num,
int *  den,
int64_t intnum,
int  search_flags 
)
static

Definition at line 1258 of file opt.c.

Referenced by av_opt_get_double(), av_opt_get_int(), and av_opt_get_q().

◆ get_format()

static int get_format ( void *  obj,
const char *  name,
int  search_flags,
int *  out_fmt,
enum AVOptionType  type,
const char *  desc 
)
static

Definition at line 1339 of file opt.c.

Referenced by av_opt_get_pixel_fmt(), and av_opt_get_sample_fmt().

◆ log_int_value()

static void log_int_value ( void *  av_log_obj,
int  level,
int64_t  i 
)
static

Definition at line 1412 of file opt.c.

Referenced by log_default().

◆ log_value()

static void log_value ( void *  av_log_obj,
int  level,
double  d 
)
static

Definition at line 1429 of file opt.c.

Referenced by log_default(), and opt_list().

◆ get_opt_const_name()

static const char* get_opt_const_name ( void *  obj,
const char *  unit,
int64_t  value 
)
static

Definition at line 1462 of file opt.c.

Referenced by log_default().

◆ get_opt_flags_string()

static char* get_opt_flags_string ( void *  obj,
const char *  unit,
int64_t  value 
)
static

Definition at line 1475 of file opt.c.

Referenced by log_default().

◆ log_type()

static void log_type ( void *  av_log_obj,
const AVOption o,
enum AVOptionType  parent_type 
)
static

Definition at line 1496 of file opt.c.

Referenced by opt_list().

◆ log_default()

static void log_default ( void *  obj,
void *  av_log_obj,
const AVOption opt 
)
static

Definition at line 1513 of file opt.c.

Referenced by opt_list().

◆ opt_list()

static void opt_list ( void *  obj,
void *  av_log_obj,
const char *  unit,
int  req_flags,
int  rej_flags,
enum AVOptionType  parent_type 
)
static

Definition at line 1591 of file opt.c.

Referenced by av_opt_show2().

◆ parse_key_value_pair()

static int parse_key_value_pair ( void *  ctx,
const char **  buf,
const char *  key_val_sep,
const char *  pairs_sep 
)
static

Store the value in the field in ctx that is named like key.

ctx must be an AVClass context, storing is done using AVOptions.

Parameters
bufthe string to parse, buf will be updated to point at the separator just after the parsed key/value pair
key_val_sepa 0-terminated list of characters used to separate key from value
pairs_sepa 0-terminated list of characters used to separate two pairs from each other
Returns
0 if the key/value pair has been successfully parsed and set, or a negative value corresponding to an AVERROR code in case of error: AVERROR(EINVAL) if the key/value pair cannot be parsed, the error code issued by av_opt_set() if the key/value pair cannot be set

Definition at line 1783 of file opt.c.

Referenced by av_set_options_string().

◆ is_key_char()

static int is_key_char ( char  c)
static

Definition at line 1839 of file opt.c.

Referenced by get_key().

◆ get_key()

static int get_key ( const char **  ropts,
const char *  delim,
char **  rkey 
)
static

Read a key from a string.

The key consists of is_key_char characters and must be terminated by a character from the delim string; spaces are ignored.

Returns
0 for success (even with ellipsis), <0 for failure

Definition at line 1854 of file opt.c.

Referenced by av_opt_get_key_value().

◆ opt_copy_elem()

static int opt_copy_elem ( void *  logctx,
enum AVOptionType  type,
void *  dst,
const void *  src 
)
static

Definition at line 2069 of file opt.c.

Referenced by av_opt_copy(), av_opt_get_array(), av_opt_set_array(), and opt_copy_array().

◆ opt_copy_array()

static int opt_copy_array ( void *  logctx,
const AVOption o,
void **  pdst,
const void *const *  psrc 
)
static

Definition at line 2117 of file opt.c.

Referenced by av_opt_copy().

◆ opt_serialize()

static int opt_serialize ( void *  obj,
int  opt_flags,
int  flags,
int *  cnt,
AVBPrint *  bprint,
const char  key_val_sep,
const char  pairs_sep 
)
static

Definition at line 2727 of file opt.c.

Referenced by av_opt_serialize().

Variable Documentation

◆ size

size_t size

Definition at line 62 of file opt.c.

Referenced by av_opt_is_set_to_default(), format_duration(), and opt_copy_elem().

◆ name

const char* name

◆ opt_type_desc

const { ... } opt_type_desc[]
Initial value:
= {
[AV_OPT_TYPE_FLAGS] = { sizeof(unsigned), "<flags>" },
[AV_OPT_TYPE_INT] = { sizeof(int), "<int>" },
[AV_OPT_TYPE_INT64] = { sizeof(int64_t), "<int64>" },
[AV_OPT_TYPE_UINT] = { sizeof(unsigned), "<unsigned>" },
[AV_OPT_TYPE_UINT64] = { sizeof(uint64_t), "<uint64>" },
[AV_OPT_TYPE_DOUBLE] = { sizeof(double), "<double>" },
[AV_OPT_TYPE_FLOAT] = { sizeof(float), "<float>" },
[AV_OPT_TYPE_STRING] = { sizeof(char *), "<string>" },
[AV_OPT_TYPE_RATIONAL] = { sizeof(AVRational), "<rational>" },
[AV_OPT_TYPE_BINARY] = { sizeof(uint8_t *), "<binary>" },
[AV_OPT_TYPE_DICT] = { sizeof(AVDictionary *), "<dictionary>" },
[AV_OPT_TYPE_IMAGE_SIZE] = { sizeof(int[2]), "<image_size>" },
[AV_OPT_TYPE_VIDEO_RATE] = { sizeof(AVRational), "<video_rate>" },
[AV_OPT_TYPE_PIXEL_FMT] = { sizeof(int), "<pix_fmt>" },
[AV_OPT_TYPE_SAMPLE_FMT] = { sizeof(int), "<sample_fmt>" },
[AV_OPT_TYPE_DURATION] = { sizeof(int64_t), "<duration>" },
[AV_OPT_TYPE_COLOR] = { sizeof(uint8_t[4]), "<color>" },
[AV_OPT_TYPE_CHLAYOUT] = { sizeof(AVChannelLayout),"<channel_layout>" },
[AV_OPT_TYPE_BOOL] = { sizeof(int), "<boolean>" },
}

Referenced by av_opt_get_array(), av_opt_set_array(), log_type(), opt_array_pelem(), opt_copy_array(), opt_copy_elem(), opt_set_array(), and opt_set_init().

AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AV_OPT_TYPE_SAMPLE_FMT
@ AV_OPT_TYPE_SAMPLE_FMT
Underlying C type is enum AVSampleFormat.
Definition: opt.h:311
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
Definition: opt.h:315
int64_t
long long int64_t
Definition: coverity.c:34
AVOption
AVOption.
Definition: opt.h:429
AV_OPT_TYPE_DURATION
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
Definition: opt.h:319
AVDictionary
Definition: dict.c:34
AV_OPT_TYPE_RATIONAL
@ AV_OPT_TYPE_RATIONAL
Underlying C type is AVRational.
Definition: opt.h:280
AV_OPT_TYPE_BINARY
@ AV_OPT_TYPE_BINARY
Underlying C type is a uint8_t* that is either NULL or points to an array allocated with the av_mallo...
Definition: opt.h:286
val
static double val(void *priv, double ch)
Definition: aeval.c:77
float
float
Definition: af_crystalizer.c:122
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
Definition: opt.h:263
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AV_OPT_TYPE_COLOR
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
Definition: opt.h:323
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is two consecutive integers.
Definition: opt.h:303
AV_OPT_TYPE_DICT
@ AV_OPT_TYPE_DICT
Underlying C type is AVDictionary*.
Definition: opt.h:290
double
double
Definition: af_crystalizer.c:132
AV_OPT_TYPE_UINT
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
Definition: opt.h:335
AV_OPT_TYPE_CHLAYOUT
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
Definition: opt.h:331
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:318
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition: opt.h:271
AV_OPT_FLAG_READONLY
#define AV_OPT_FLAG_READONLY
The option may not be set through the AVOptions API, only read.
Definition: opt.h:368
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_TYPE_PIXEL_FMT
@ AV_OPT_TYPE_PIXEL_FMT
Underlying C type is enum AVPixelFormat.
Definition: opt.h:307
set_string_number
static int set_string_number(void *obj, void *target_obj, const AVOption *o, const char *val, void *dst)
Definition: opt.c:420
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Underlying C type is unsigned int.
Definition: opt.h:255
name
const char * name
Definition: opt.c:63
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition: opt.h:276
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
AV_OPT_TYPE_UINT64
@ AV_OPT_TYPE_UINT64
Underlying C type is uint64_t.
Definition: opt.h:294