FFmpeg
|
af_aformat.c File Reference
format audio filter More...
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
Include dependency graph for af_aformat.c:
Go to the source code of this file.
Data Structures | |
struct | AFormatContext |
Macros | |
#define | OFFSET(x) offsetof(AFormatContext, x) |
#define | A AV_OPT_FLAG_AUDIO_PARAM |
#define | F AV_OPT_FLAG_FILTERING_PARAM |
#define | PARSE_FORMATS(str, type, list, add_to_list, get_fmt, none, desc) |
Typedefs | |
typedef struct AFormatContext | AFormatContext |
Functions | |
AVFILTER_DEFINE_CLASS (aformat) | |
static int | get_sample_rate (const char *samplerate) |
static av_cold int | init (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
Variables | |
static const AVOption | aformat_options [] |
static const AVFilterPad | avfilter_af_aformat_inputs [] |
static const AVFilterPad | avfilter_af_aformat_outputs [] |
AVFilter | avfilter_af_aformat |
Detailed Description
format audio filter
Definition in file af_aformat.c.
Macro Definition Documentation
#define A AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 49 of file af_aformat.c.
#define F AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 50 of file af_aformat.c.
Referenced by idct().
#define OFFSET | ( | x | ) | offsetof(AFormatContext, x) |
Definition at line 48 of file af_aformat.c.
Value:
do { \
char *next, *cur = str, sep; \
"separate %s.\n", desc); \
sep = ','; \
} else \
sep = '|'; \
next = strchr(cur, sep); \
if (next) \
*next++ = 0; \
} \
add_to_list(&list, fmt); \
\
cur = next; \
} \
} while (0)
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 list
Definition: filter_design.txt:23
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
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
#define type
Synth Windw Norm while(pin< pend)%Until the end...%---Analysis x_w
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
Definition: filter_design.txt:216
Definition at line 60 of file af_aformat.c.
Referenced by init().
Typedef Documentation
typedef struct AFormatContext AFormatContext |
Function Documentation
AVFILTER_DEFINE_CLASS | ( | aformat | ) |
|
static |
Definition at line 87 of file af_aformat.c.
Referenced by init().
|
static |
Definition at line 93 of file af_aformat.c.
|
static |
Definition at line 108 of file af_aformat.c.
Variable Documentation
|
static |
Initial value:
= {
{ "sample_fmts", "A comma-separated list of sample formats.", OFFSET(formats_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ "sample_rates", "A comma-separated list of sample rates.", OFFSET(sample_rates_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ "channel_layouts", "A comma-separated list of channel layouts.", OFFSET(channel_layouts_str), AV_OPT_TYPE_STRING, .flags = A|F },
{ NULL },
}
Definition: opt.h:226
Definition at line 51 of file af_aformat.c.
AVFilter avfilter_af_aformat |
Initial value:
= {
.name = "aformat",
.description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
.init = init,
.query_formats = query_formats,
.priv_size = sizeof(AFormatContext),
.priv_class = &aformat_class,
}
static const AVFilterPad avfilter_af_aformat_inputs[]
Definition: af_aformat.c:122
struct AFormatContext AFormatContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
static const AVFilterPad avfilter_af_aformat_outputs[]
Definition: af_aformat.c:130
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:216
Definition at line 138 of file af_aformat.c.
|
static |
Initial value:
Definition at line 122 of file af_aformat.c.
|
static |
Initial value:
Definition at line 130 of file af_aformat.c.
Generated on Fri Dec 20 2024 06:56:10 for FFmpeg by 1.8.11