FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
src_buffer.c File Reference

memory buffer source filter More...

#include "avfilter.h"
#include "internal.h"
#include "audio.h"
#include "avcodec.h"
#include "buffersrc.h"
#include "asrc_abuffer.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/fifo.h"
#include "libavutil/imgutils.h"

Go to the source code of this file.

Data Structures

struct  BufferSourceContext
 

Functions

static void buf_free (AVFilterBuffer *ptr)
 
int av_asrc_buffer_add_audio_buffer_ref (AVFilterContext *ctx, AVFilterBufferRef *samplesref, int av_unused flags)
 Queue an audio buffer to the audio buffer source.
 
int av_asrc_buffer_add_samples (AVFilterContext *ctx, uint8_t *data[8], int linesize[8], int nb_samples, int sample_rate, int sample_fmt, int64_t channel_layout, int planar, int64_t pts, int av_unused flags)
 Queue an audio buffer to the audio buffer source.
 
int av_asrc_buffer_add_buffer (AVFilterContext *ctx, uint8_t *buf, int buf_size, int sample_rate, int sample_fmt, int64_t channel_layout, int planar, int64_t pts, int av_unused flags)
 Queue an audio buffer to the audio buffer source.
 

Detailed Description

memory buffer source filter

Definition in file src_buffer.c.

Function Documentation

static void buf_free ( AVFilterBuffer ptr)
static

Definition at line 63 of file src_buffer.c.

Referenced by av_asrc_buffer_add_samples().

int av_asrc_buffer_add_audio_buffer_ref ( AVFilterContext abuffersrc,
AVFilterBufferRef samplesref,
int av_unused  flags 
)

Queue an audio buffer to the audio buffer source.

Parameters
abuffersrcaudio source buffer context
samplesrefbuffer ref to queue
flagsunused
Deprecated:
use av_buffersrc_add_ref() instead.

Definition at line 69 of file src_buffer.c.

Referenced by av_asrc_buffer_add_samples().

int av_asrc_buffer_add_samples ( AVFilterContext abuffersrc,
uint8_t data[8],
int  linesize[8],
int  nb_samples,
int  sample_rate,
int  sample_fmt,
int64_t  ch_layout,
int  planar,
int64_t  pts,
int av_unused  flags 
)

Queue an audio buffer to the audio buffer source.

Parameters
abuffersrcaudio source buffer context
datapointers to the samples planes
linesizelinesizes of each audio buffer plane
nb_samplesnumber of samples per channel
sample_fmtsample format of the audio data
ch_layoutchannel layout of the audio data
planarflag to indicate if audio data is planar or packed
ptspresentation timestamp of the audio buffer
flagsunused
Deprecated:
use av_buffersrc_add_ref() instead.

Definition at line 76 of file src_buffer.c.

Referenced by av_asrc_buffer_add_buffer().

int av_asrc_buffer_add_buffer ( AVFilterContext abuffersrc,
uint8_t buf,
int  buf_size,
int  sample_rate,
int  sample_fmt,
int64_t  ch_layout,
int  planar,
int64_t  pts,
int av_unused  flags 
)

Queue an audio buffer to the audio buffer source.

This is similar to av_asrc_buffer_add_samples(), but the samples are stored in a buffer with known size.

Parameters
abuffersrcaudio source buffer context
bufpointer to the samples data, packed is assumed
sizethe size in bytes of the buffer, it must contain an integer number of samples
sample_fmtsample format of the audio data
ch_layoutchannel layout of the audio data
ptspresentation timestamp of the audio buffer
flagsunused
Deprecated:
use av_buffersrc_add_ref() instead.

Definition at line 102 of file src_buffer.c.