FFmpeg
Data Fields
AVOptionRanges Struct Reference
libavutil » Data Structures » AVOptions

List of AVOptionRange structs. More...

#include <opt.h>

Data Fields

  Array of option ranges. More...
 
  Number of ranges per component. More...
 
  Number of componentes. More...
 

Detailed Description

List of AVOptionRange structs.

Definition at line 336 of file opt.h.

Field Documentation

range

AVOptionRange** AVOptionRanges::range

Array of option ranges.

Most of option types use just one component. Following describes multi-component option types:

AV_OPT_TYPE_IMAGE_SIZE: component index 0: range of pixel count (width * height). component index 1: range of width. component index 2: range of height.

Note
To obtain multi-component version of this structure, user must provide AV_OPT_MULTI_COMPONENT_RANGE to av_opt_query_ranges or av_opt_query_ranges_default function.

Multi-component range can be read as in following example:

int range_index, component_index;
AVOptionRange *range[3]; //may require more than 3 in the future.
for (range_index = 0; range_index < ranges->nb_ranges; range_index++) {
for (component_index = 0; component_index < ranges->nb_components; component_index++)
range[component_index] = ranges->range[ranges->nb_ranges * component_index + range_index];
//do something with range here.
}

Definition at line 367 of file opt.h.

Referenced by av_opt_freep_ranges(), and av_opt_query_ranges_default().

nb_ranges

int AVOptionRanges::nb_ranges

Number of ranges per component.

Definition at line 371 of file opt.h.

Referenced by av_opt_freep_ranges(), and av_opt_query_ranges_default().

nb_components

int AVOptionRanges::nb_components

Number of componentes.

Definition at line 375 of file opt.h.

Referenced by av_opt_freep_ranges(), and av_opt_query_ranges_default().


The documentation for this struct was generated from the following file:
AVOptionRanges::nb_components
int nb_components
Number of componentes.
Definition: opt.h:375
AVOptionRanges::nb_ranges
int nb_ranges
Number of ranges per component.
Definition: opt.h:371
key
const char * key
Definition: hwcontext_opencl.c:174
AVOptionRanges::range
AVOptionRange ** range
Array of option ranges.
Definition: opt.h:367
AVOptionRange
A single allowed range of values, or a single allowed value.
Definition: opt.h:313
AV_OPT_MULTI_COMPONENT_RANGE
#define AV_OPT_MULTI_COMPONENT_RANGE
Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than one component for cert...
Definition: opt.h:584
AVOptionRanges
List of AVOptionRange structs.
Definition: opt.h:336
av_opt_query_ranges
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.
Definition: opt.c:1946
av_opt_freep_ranges
void av_opt_freep_ranges(AVOptionRanges **rangesp)
Free an AVOptionRanges struct and set it to NULL.
Definition: opt.c:2040

Generated on Tue Feb 28 2023 21:34:40 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /