Those functions set the field of obj with the given name to value. More...

Collaboration diagram for Option setting functions:

Macros

#define av_opt_set_int_list(obj, name, val, term, flags)
 Set a binary option to an integer list. More...
 

Functions

int av_opt_set (void *obj, const char *name, const char *val, int search_flags)
 
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 size, 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_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_video_rate (void *obj, const char *name, AVRational val, int search_flags)
 

Detailed Description

Those functions set the field of obj with the given name to value.

Parameters
[in]objA struct whose first element is a pointer to an AVClass.
[in]namethe name of the field to set
[in]valThe value to set. In case of av_opt_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.
search_flagsflags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN is passed here, then the option may be set on a child of obj.
Returns
0 if the value has been set, or an AVERROR code in case of error: AVERROR_OPTION_NOT_FOUND if no matching option exists AVERROR(ERANGE) if the value is out of range AVERROR(EINVAL) if the value is not valid

Macro Definition Documentation

#define av_opt_set_int_list (   obj,
  name,
  val,
  term,
  flags 
)
Value:
(av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \
AVERROR(EINVAL) : \
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
av_int_list_length(val, term) * sizeof(*(val)), flags))
const char * name
Definition: avisynth_c.h:675
int av_opt_set_bin(void *obj, const char *name, const uint8_t *val, int size, int search_flags)
Definition: opt.c:409
uint8_t
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer 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.Buffer references ownership and permissions
static int flags
Definition: cpu.c:23
#define av_int_list_length(list, term)
Compute the length of an integer list.
Definition: avutil.h:273

Set a binary option to an integer list.

Parameters
objAVClass object to set options on
namename of the binary option
valpointer to an integer list (must have the correct type with regard to the contents of the list)
termlist terminator (usually 0 or -1)
flagssearch flags

Definition at line 671 of file opt.h.

Referenced by asink_init(), configure_audio_filters(), configure_video_filters(), init_filters(), lavfi_read_header(), and vsink_init().

Function Documentation

int av_opt_set_bin ( void obj,
const char *  name,
const uint8_t val,
int  size,
int  search_flags 
)

Definition at line 409 of file opt.c.

Referenced by rtmp_calc_swfhash(), rtmp_http_open(), and rtmp_http_send_cmd().

int av_opt_set_double ( void obj,
const char *  name,
double  val,
int  search_flags 
)

Definition at line 399 of file opt.c.

Referenced by av_opt_set_defaults2().

int av_opt_set_image_size ( void obj,
const char *  name,
int  w,
int  h,
int  search_flags 
)

Definition at line 439 of file opt.c.

int av_opt_set_int ( void obj,
const char *  name,
int64_t  val,
int  search_flags 
)
int av_opt_set_pixel_fmt ( void obj,
const char *  name,
enum AVPixelFormat  fmt,
int  search_flags 
)

Definition at line 515 of file opt.c.

Referenced by av_opt_set_defaults2().

int av_opt_set_q ( void obj,
const char *  name,
AVRational  val,
int  search_flags 
)

Definition at line 404 of file opt.c.

Referenced by av_opt_set_defaults2().

int av_opt_set_sample_fmt ( void obj,
const char *  name,
enum AVSampleFormat  fmt,
int  search_flags 
)

Definition at line 520 of file opt.c.

Referenced by av_opt_set_defaults2(), and main().

int av_opt_set_video_rate ( void obj,
const char *  name,
AVRational  val,
int  search_flags 
)

Definition at line 461 of file opt.c.