FFmpeg
|
AVOptions. More...
#include "avutil.h"
#include "avstring.h"
#include "common.h"
#include "opt.h"
#include "eval.h"
#include "dict.h"
#include "log.h"
#include "parseutils.h"
#include "pixdesc.h"
#include "mathematics.h"
#include "samplefmt.h"
#include <float.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT_NUMVAL(opt) |
#define | OPT_EVAL_NUMBER(name, opttype, vartype) |
#define | WHITESPACES " \n\t" |
Functions | |
const AVOption * | av_find_opt (void *v, const char *name, const char *unit, int mask, int flags) |
Look for an option in obj. | |
const AVOption * | av_next_option (void *obj, const AVOption *last) |
const AVOption * | av_opt_next (void *obj, const AVOption *last) |
Iterate over all AVOptions belonging to obj. | |
static int | read_number (const AVOption *o, 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, const AVOption *o, const char *val, void *dst) |
int | av_set_string3 (void *obj, const char *name, const char *val, int alloc, const AVOption **o_out) |
Set the field of obj with the given name to value. | |
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) |
const AVOption * | av_set_double (void *obj, const char *name, double n) |
const AVOption * | av_set_q (void *obj, const char *name, AVRational n) |
const AVOption * | av_set_int (void *obj, const char *name, int64_t n) |
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) |
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) |
const char * | av_get_string (void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len) |
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, const AVOption **o_out, double *num, int *den, int64_t *intnum, int search_flags) |
double | av_get_double (void *obj, const char *name, const AVOption **o_out) |
AVRational | av_get_q (void *obj, const char *name, const AVOption **o_out) |
int64_t | av_get_int (void *obj, const char *name, const AVOption **o_out) |
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) |
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_flag_is_set (void *obj, const char *field_name, const char *flag_name) |
Check whether a particular flag is set in a flags field. | |
static void | log_value (void *av_log_obj, int level, double d) |
static void | opt_list (void *obj, void *av_log_obj, const char *unit, int req_flags, int rej_flags) |
int | av_opt_show2 (void *obj, void *av_log_obj, int req_flags, int rej_flags) |
Show the obj options. | |
void | av_opt_set_defaults (void *s) |
Set the values of all AVOption fields to their default values. | |
void | av_opt_set_defaults2 (void *s, int mask, int flags) |
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. | |
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. | |
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. | |
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. | |
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. | |
void | av_opt_free (void *obj) |
Free all string and binary options in obj. | |
int | av_opt_set_dict (void *obj, AVDictionary **options) |
Set all the options from a given dictionary on an object. | |
const AVOption * | av_opt_find (void *obj, const char *name, const char *unit, int opt_flags, int search_flags) |
Look for an option in an object. | |
const AVOption * | av_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. | |
void * | av_opt_child_next (void *obj, void *prev) |
Iterate over AVOptions-enabled children of obj. | |
const AVClass * | av_opt_child_class_next (const AVClass *parent, const AVClass *prev) |
Iterate over potential AVOptions-enabled children of parent. | |
void * | av_opt_ptr (const AVClass *class, void *obj, const char *name) |
Gets a pointer to the requested field in a struct. | |
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. | |
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. | |
void | av_opt_freep_ranges (AVOptionRanges **rangesp) |
Free an AVOptionRanges struct and set it to NULL. | |
Variables | |
static const double | const_values [] |
static const char *const | const_names [] |
AVOptions.
Definition in file opt.c.
#define DEFAULT_NUMVAL | ( | opt | ) |
Definition at line 174 of file opt.c.
Referenced by set_string_number().
#define OPT_EVAL_NUMBER | ( | name, | |
opttype, | |||
vartype | |||
) |
|
static |
Definition at line 73 of file opt.c.
Referenced by get_number(), and set_string_number().
|
static |
Definition at line 91 of file opt.c.
Referenced by set_number(), and set_string_number().
|
static |
Definition at line 131 of file opt.c.
Referenced by set_string_binary().
|
static |
Definition at line 138 of file opt.c.
Referenced by av_opt_set().
Definition at line 167 of file opt.c.
Referenced by av_opt_set().
|
static |
Definition at line 180 of file opt.c.
Referenced by av_opt_set().
|
static |
Definition at line 334 of file opt.c.
Referenced by av_opt_set_double(), av_opt_set_int(), av_opt_set_q(), av_set_double(), av_set_int(), and av_set_q().
|
static |
Definition at line 439 of file opt.c.
Referenced by av_opt_set_pixel_fmt(), av_opt_set_sample_fmt(), and dshow_cycle_pins().
|
static |
Definition at line 583 of file opt.c.
Referenced by av_get_double(), av_get_int(), av_get_q(), av_opt_get_double(), av_opt_get_int(), and av_opt_get_q().
|
static |
Definition at line 698 of file opt.c.
Referenced by av_opt_get_pixel_fmt(), and av_opt_get_sample_fmt().
Definition at line 739 of file opt.c.
Referenced by opt_list().
|
static |
Definition at line 758 of file opt.c.
Referenced by av_opt_show2().
|
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.
buf | the string to parse, buf will be updated to point at the separator just after the parsed key/value pair |
key_val_sep | a 0-terminated list of characters used to separate key from value |
pairs_sep | a 0-terminated list of characters used to separate two pairs from each other |
Definition at line 955 of file opt.c.
Referenced by av_set_options_string().
|
static |
|
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.
Definition at line 1019 of file opt.c.
Referenced by av_opt_get_key_value().
|
static |
Definition at line 117 of file opt.c.
Referenced by av_expr_eval(), config(), get_qscale(), and set_string_number().
|
static |
Definition at line 124 of file opt.c.
Referenced by av_expr_parse(), config(), ff_rate_control_init(), and set_string_number().