AVOptions. More...
#include "rational.h"
#include "avutil.h"
#include "dict.h"
Go to the source code of this file.
Data Structures | |
struct | AVOption |
AVOption. More... | |
Defines | |
#define | AV_OPT_FLAG_ENCODING_PARAM 1 |
a generic parameter which can be set by the user for muxing or encoding | |
#define | AV_OPT_FLAG_DECODING_PARAM 2 |
a generic parameter which can be set by the user for demuxing or decoding | |
#define | AV_OPT_FLAG_METADATA 4 |
some data extracted or inserted into the file like title, comment, ... | |
#define | AV_OPT_FLAG_AUDIO_PARAM 8 |
#define | AV_OPT_FLAG_VIDEO_PARAM 16 |
#define | AV_OPT_FLAG_SUBTITLE_PARAM 32 |
#define | AV_OPT_SEARCH_CHILDREN 0x0001 |
Search in possible children of the given object first. | |
Typedefs | |
typedef struct AVOption | AVOption |
AVOption. | |
Enumerations | |
enum | AVOptionType { FF_OPT_TYPE_FLAGS, FF_OPT_TYPE_INT, FF_OPT_TYPE_INT64, FF_OPT_TYPE_DOUBLE, FF_OPT_TYPE_FLOAT, FF_OPT_TYPE_STRING, FF_OPT_TYPE_RATIONAL, FF_OPT_TYPE_BINARY, FF_OPT_TYPE_CONST = 128, FF_OPT_TYPE_FLAGS, FF_OPT_TYPE_INT, FF_OPT_TYPE_INT64, FF_OPT_TYPE_DOUBLE, FF_OPT_TYPE_FLOAT, FF_OPT_TYPE_STRING, FF_OPT_TYPE_RATIONAL, FF_OPT_TYPE_BINARY, FF_OPT_TYPE_CONST = 128 } |
Functions | |
attribute_deprecated const AVOption * | av_find_opt (void *obj, const char *name, const char *unit, int mask, int flags) |
Look for an option in obj. | |
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. | |
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) |
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) |
const char * | av_get_string (void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len) |
const AVOption * | av_next_option (void *obj, const AVOption *last) |
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) |
void | av_opt_set_defaults2 (void *s, int mask, int flags) |
Set the values of the AVCodecContext or AVFormatContext structure. | |
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. | |
void | av_opt_free (void *obj) |
Free all string and binary options in obj. | |
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. | |
int | av_opt_set_dict (void *obj, struct AVDictionary **options) |
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. |
AVOptions.
Definition in file opt.h.
#define AV_OPT_FLAG_DECODING_PARAM 2 |
#define AV_OPT_FLAG_ENCODING_PARAM 1 |
#define AV_OPT_FLAG_METADATA 4 |
#define AV_OPT_SEARCH_CHILDREN 0x0001 |
enum AVOptionType |
attribute_deprecated const AVOption* av_find_opt | ( | void * | obj, | |
const char * | name, | |||
const char * | unit, | |||
int | mask, | |||
int | flags | |||
) |
Look for an option in obj.
Look only for the options which have the flags set as specified in mask and flags (that is, for which it is the case that opt->flags & mask == flags).
[in] | obj | a pointer to a struct whose first element is a pointer to an AVClass |
[in] | name | the name of the option to look for |
[in] | unit | the unit of the option to look for, or any if NULL |
Look only for the options which have the flags set as specified in mask and flags (that is, for which it is the case that opt->flags & mask == flags).
[in] | obj | a pointer to a struct whose first element is a pointer to an AVClass |
[in] | name | the name of the option to look for |
[in] | unit | the unit of the option to look for, or any if NULL |
double av_get_double | ( | void * | obj, | |
const char * | name, | |||
const AVOption ** | o_out | |||
) |
int64_t av_get_int | ( | void * | obj, | |
const char * | name, | |||
const AVOption ** | o_out | |||
) |
AVRational av_get_q | ( | void * | obj, | |
const char * | name, | |||
const AVOption ** | o_out | |||
) |
const char* av_get_string | ( | void * | obj, | |
const char * | name, | |||
const AVOption ** | o_out, | |||
char * | buf, | |||
int | buf_len | |||
) |
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.
Consider only options which have all the specified flags set.
[in] | obj | A pointer to a struct whose first element is a pointer to an AVClass. |
[in] | name | The name of the option to look for. |
[in] | unit | When searching for named constants, name of the unit it belongs to. |
opt_flags | Find only options with all the specified flags set (AV_OPT_FLAG). | |
search_flags | A combination of AV_OPT_SEARCH_*. |
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.
field_name | the name of the flag field option | |
flag_name | the name of the flag to check |
void av_opt_free | ( | void * | obj | ) |
void av_opt_set_defaults2 | ( | void * | s, | |
int | mask, | |||
int | flags | |||
) |
Set the values of the AVCodecContext or AVFormatContext structure.
They are set to the defaults specified in the according AVOption options array default_val field.
s | AVCodecContext or AVFormatContext for which the defaults will be set |
int av_opt_set_dict | ( | void * | obj, | |
struct AVDictionary ** | options | |||
) |
int av_opt_show2 | ( | void * | obj, | |
void * | av_log_obj, | |||
int | req_flags, | |||
int | rej_flags | |||
) |
Show the obj options.
req_flags | requested flags for the options to show. Show only the options for which it is opt->flags & req_flags. | |
rej_flags | rejected flags for the options to show. Show only the options for which it is !(opt->flags & req_flags). | |
av_log_obj | log context to use for showing the options |
const AVOption* av_set_double | ( | void * | obj, | |
const char * | name, | |||
double | n | |||
) |
const AVOption* av_set_int | ( | void * | obj, | |
const char * | name, | |||
int64_t | n | |||
) |
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.
For each key/value pair found, stores the value in the field in ctx that is named like the key. ctx must be an AVClass context, storing is done using AVOptions.
opts | options string to parse, may be NULL | |
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 |
const AVOption* av_set_q | ( | void * | obj, | |
const char * | name, | |||
AVRational | n | |||
) |
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.
[in] | obj | A struct whose first element is a pointer to an AVClass. |
[in] | name | the name of the field to set |
[in] | val | The value to set. If the field is not of a string type, then the given string is parsed. SI postfixes and some named scalars are supported. If the field is of a numeric type, it has to be a numeric or named scalar. Behavior with more than one scalar and +- infix operators is undefined. If the field is of a flags type, it has to be a sequence of numeric scalars or named flags separated by '+' or '-'. Prefixing a flag with '+' causes it to be set without affecting the other flags; similarly, '-' unsets a flag. |
[out] | o_out | if non-NULL put here a pointer to the AVOption found |
alloc | when 1 then the old value will be av_freed() and the new av_strduped() when 0 then no av_free() nor av_strdup() will be used |