#include "libavutil/pixdesc.h"
#include "libavutil/audioconvert.h"
#include "avfilter.h"
Go to the source code of this file.
Defines | |
#define | MAKE_FORMAT_LIST() |
Functions | |
static void | merge_ref (AVFilterFormats *ret, AVFilterFormats *a) |
Add all refs from a to ret and destroy a. | |
AVFilterFormats * | avfilter_merge_formats (AVFilterFormats *a, AVFilterFormats *b) |
Return a format list which contains the intersection of the formats of a and b. | |
AVFilterFormats * | avfilter_make_format_list (const int *fmts) |
Create a list of supported formats. | |
AVFilterFormats * | avfilter_make_format64_list (const int64_t *fmts) |
int | avfilter_add_format (AVFilterFormats **avff, int64_t fmt) |
Add fmt to the list of media formats contained in *avff. | |
AVFilterFormats * | avfilter_all_formats (enum AVMediaType type) |
Return a list of all formats supported by FFmpeg for the given media type. | |
AVFilterFormats * | avfilter_all_channel_layouts (void) |
Return a list of all channel layouts supported by FFmpeg. | |
void | avfilter_formats_ref (AVFilterFormats *f, AVFilterFormats **ref) |
Add *ref as a new reference to formats. | |
static int | find_ref_index (AVFilterFormats **ref) |
void | avfilter_formats_unref (AVFilterFormats **ref) |
If *ref is non-NULL, remove *ref as a reference to the format list it currently points to, deallocates that list if this was the last reference, and sets *ref to NULL. | |
void | avfilter_formats_changeref (AVFilterFormats **oldref, AVFilterFormats **newref) |
Before After ________ ________ |formats |<---------. |
#define MAKE_FORMAT_LIST | ( | ) |
Value:
AVFilterFormats *formats; \ int count = 0; \ if (fmts) \ for (count = 0; fmts[count] != -1; count++) \ ; \ formats = av_mallocz(sizeof(AVFilterFormats)); \ if (!formats) return NULL; \ formats->format_count = count; \ if (count) { \ formats->formats = av_malloc(sizeof(*formats->formats)*count); \ if (!formats->formats) { \ av_free(formats); \ return NULL; \ } \ }
Definition at line 77 of file formats.c.
Referenced by avfilter_make_format64_list(), and avfilter_make_format_list().
int avfilter_add_format | ( | AVFilterFormats ** | avff, | |
int64_t | fmt | |||
) |
Add fmt to the list of media formats contained in *avff.
If *avff is NULL the function allocates the filter formats struct and puts its pointer in *avff.
Definition at line 112 of file formats.c.
Referenced by avfilter_all_formats(), and query_formats().
AVFilterFormats* avfilter_all_channel_layouts | ( | void | ) |
Return a list of all channel layouts supported by FFmpeg.
Definition at line 144 of file formats.c.
Referenced by avfilter_default_query_formats().
AVFilterFormats* avfilter_all_formats | ( | enum AVMediaType | type | ) |
Return a list of all formats supported by FFmpeg for the given media type.
Definition at line 129 of file formats.c.
Referenced by avfilter_default_query_formats().
void avfilter_formats_changeref | ( | AVFilterFormats ** | oldref, | |
AVFilterFormats ** | newref | |||
) |
Before After ________ ________ |formats |<---------.
|formats |<---------. | ____ | ___|___ | ____ | ___|___ | |refs| | | | | | |refs| | | | | NULL | |* *--------->|*oldref| | |* *--------->|*newref| ^ | |* * | | |_______| | |* * | | |_______| ___|___ | |____| | | |____| | | | | |________| |________| |*oldref| |_______|
Definition at line 202 of file formats.c.
Referenced by avfilter_insert_filter().
void avfilter_formats_ref | ( | AVFilterFormats * | formats, | |
AVFilterFormats ** | ref | |||
) |
Add *ref as a new reference to formats.
That is the pointers will point like in the ascii art below: ________ |formats |<--------. | ____ | ____|___________________ | |refs| | | __|_ | |* * | | | | | | AVFilterLink | |* *--------->|*ref| | |____| | | |____| |________| |________________________
Definition at line 165 of file formats.c.
Referenced by query_formats(), and set_common_formats().
void avfilter_formats_unref | ( | AVFilterFormats ** | ref | ) |
If *ref is non-NULL, remove *ref as a reference to the format list it currently points to, deallocates that list if this was the last reference, and sets *ref to NULL.
Before After ________ ________ NULL |formats |<--------. |formats | ^ | ____ | ____|________________ | ____ | ____|________________ | |refs| | | __|_ | |refs| | | __|_ | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink | |* *--------->|*ref| | |* | | | |*ref| | |____| | | |____| | |____| | | |____| |________| |_____________________ |________| |_____________________
Definition at line 181 of file formats.c.
Referenced by avfilter_free(), pick_format(), and query_formats().
AVFilterFormats* avfilter_make_format64_list | ( | const int64_t * | fmts | ) |
AVFilterFormats* avfilter_make_format_list | ( | const int * | fmts | ) |
Create a list of supported formats.
This is intended for use in AVFilter->query_formats().
fmts | list of media formats, terminated by -1. If NULL an empty list is created. |
Definition at line 94 of file formats.c.
Referenced by query_formats().
AVFilterFormats* avfilter_merge_formats | ( | AVFilterFormats * | a, | |
AVFilterFormats * | b | |||
) |
Return a format list which contains the intersection of the formats of a and b.
Also, all the references of a, all the references of b, and a and b themselves will be deallocated.
If a and b do not share any common formats, neither is modified, and NULL is returned.
Definition at line 43 of file formats.c.
Referenced by query_formats().
static int find_ref_index | ( | AVFilterFormats ** | ref | ) | [static] |
Definition at line 172 of file formats.c.
Referenced by avfilter_formats_changeref(), and avfilter_formats_unref().
static void merge_ref | ( | AVFilterFormats * | ret, | |
AVFilterFormats * | a | |||
) | [static] |
Add all refs from a to ret and destroy a.
Definition at line 29 of file formats.c.
Referenced by avfilter_merge_formats().