52 #define AFLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
53 #define VFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
54 #define OFFSET(x) offsetof(LoopContext, x)
56 #if CONFIG_ALOOP_FILTER
86 while (s->
loop != 0 && i < nb_samples) {
177 if (s->
loop == 0 && nb_samples > 0) {
185 s->
pts += nb_samples;
202 static const AVOption aloop_options[] = {
215 .filter_frame = afilter_frame,
216 .config_props = aconfig_input,
225 .request_frame = arequest_frame,
234 .priv_class = &aloop_class,
241 #if CONFIG_LOOP_FILTER
345 static const AVOption loop_options[] = {
376 .priv_class = &loop_class,
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
Allocate an AVAudioFifo.
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
Read data from an AVAudioFifo.
This structure describes decoded (raw) audio or video data.
Main libavfilter public API header.
static av_cold int init(AVCodecContext *avctx)
void av_audio_fifo_free(AVAudioFifo *af)
Free an AVAudioFifo.
void * av_calloc(size_t nmemb, size_t size)
Non-inlined equivalent of av_mallocz_array().
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static av_cold int uninit(AVCodecContext *avctx)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
static int push_frame(AVFilterContext *ctx, unsigned in_no, AVFrame *buf)
#define AVERROR_EOF
End of file.
A filter pad used for either input or output.
A link between two filters.
int sample_rate
samples per second
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
simple assert() macros that are a bit more flexible than ISO C assert().
Context for an Audio FIFO Buffer.
common internal API header
int av_audio_fifo_size(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for reading.
static int request_frame(AVFilterLink *outlink)
AVFilterContext * src
source filter
static const AVFilterPad outputs[]
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int format
agreed upon media format
static const AVFilterPad inputs[]
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
a very simple circular buffer FIFO implementation
Describe the class of an AVClass context structure.
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
static int64_t pts
Global timestamp for the audio frames.
static int filter_frame(DBEContext *s, AVFrame *frame)
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
Write data to an AVAudioFifo.
int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples)
Drain data from an AVAudioFifo.
static int push_samples(AVFilterLink *outlink)
int channels
Number of channels.
AVFilterContext * dst
dest filter
#define AVFILTER_DEFINE_CLASS(fname)
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
uint8_t ** extended_data
pointers to the data planes/channels.
int nb_samples
number of audio samples (per channel) described by this frame
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset)
Peek data from an AVAudioFifo.