30#define SRC "=sample_fmt=flt:sample_rate=48000:channel_layout=mono:time_base=1/48000"
40 frame->sample_rate = 48000;
42 frame->nb_samples = 1024;
76 "[a][b]amix=duration=longest,abuffersink@out",
static int drain(AVFilterContext *sink, AVFrame *frame)
static int send_frame(AVFilterContext *src, int64_t pts)
Main libavfilter public API header.
memory buffer sink API for audio and video
Memory buffer source API.
Public libavutil channel layout APIs header.
__device__ int printf(const char *,...)
reference-counted frame API
int attribute_align_arg av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
Get a frame with filtered data from sink and put it in frame.
int attribute_align_arg av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
Add a frame to the buffer source.
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
Check validity and configure all the links and formats in the graph.
int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)
Add a graph described by a string to a graph.
AVFilterContext * avfilter_graph_get_filter(AVFilterGraph *graph, const char *name)
Get a filter instance identified by instance name from graph.
void avfilter_graph_free(AVFilterGraph **graph)
Free a graph, destroy its links, and set *graph to NULL.
AVFilterGraph * avfilter_graph_alloc(void)
Allocate a filter graph.
#define AV_CHANNEL_LAYOUT_MONO
#define AVERROR_EOF
End of file.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int av_samples_set_silence(uint8_t *const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
An AVChannelLayout holds information about the channel layout of audio data.
int nb_threads
Maximum number of threads used by filters in this graph.
This structure describes decoded (raw) audio or video data.
timestamp utils, mostly useful for debugging/logging purposes
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...