22 #ifndef AVFILTER_AVFILTER_H
23 #define AVFILTER_AVFILTER_H
97 #define AV_PERM_READ 0x01
98 #define AV_PERM_WRITE 0x02
99 #define AV_PERM_PRESERVE 0x04
100 #define AV_PERM_REUSE 0x08
101 #define AV_PERM_REUSE2 0x10
102 #define AV_PERM_NEG_LINESIZES 0x20
213 #if FF_API_AVFILTERPAD_PUBLIC
428 unsigned input_count;
435 unsigned output_count;
569 uint64_t channel_layout);
646 unsigned filt_srcpad_idx,
unsigned filt_dstpad_idx);
uint8_t * data[8]
buffer data for each plane/channel
uint8_t ** extended_data
pointers to the data planes/channels.
int(* poll_frame)(AVFilterLink *link)
Frame poll callback.
enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx)
Get the type of an AVFilterPad.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples
AVFilterBufferRefAudioProps * audio
audio buffer specific properties
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
int h
agreed upon image height
int(* init)(AVFilterContext *ctx, const char *args)
Filter initialization function.
Libavfilter version macros.
int request_samples
Audio only, the destination filter sets this to a non-zero value to request that buffers with the giv...
void * priv
private data to be used by a custom free function
enum AVMediaType type
media type of buffer data
int(* filter_frame)(AVFilterLink *link, AVFilterBufferRef *frame)
Filtering callback.
Audio specific properties in a reference to an AVFilterBuffer.
A reference-counted buffer data type used by the filter system.
enum AVMediaType type
AVFilterPad type.
struct AVFilterBufferRefVideoProps AVFilterBufferRefVideoProps
Video specific properties in a reference to an AVFilterBuffer.
int(* query_formats)(AVFilterContext *)
Queries formats supported by the filter and its pads, and sets the in_formats for links connected to ...
AVFilterPad * dstpad
input pad on the dest filter
struct AVFilterChannelLayouts * in_channel_layouts
int h
width and height of the allocated buffer
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
const char * name
Pad name.
int priv_size
size of private data to allocate for the filter
AVFilterLink ** inputs
array of pointers to input links
char * name
name of this filter instance
AVFilterPad * output_pads
array of output pads
int linesize[8]
number of bytes per line
int(* request_frame)(AVFilterLink *link)
Frame request callback.
int top_field_first
field order
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
const char * avfilter_pad_get_name(AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
int key_frame
1 -> keyframe, 0-> not
void(* uninit)(AVFilterContext *ctx)
Filter uninitialization function.
AVRational pixel_aspect
pixel aspect ratio
int64_t pts
presentation timestamp.
A filter pad used for either input or output.
A link between two filters.
AVFilterPad * input_pads
array of input pads
int sample_rate
samples per second
enum AVFilterLink::@70 init_state
stage of the initialization of the link properties (dimensions, etc)
void avfilter_register_all(void)
Initialize the filter system.
AVFilterBuffer * buf
the buffer that this is a reference to
unsigned nb_outputs
number of output pads
void * priv
private data for use by the filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
Video specific properties in a reference to an AVFilterBuffer.
struct AVFilterChannelLayouts * out_channel_layouts
AVFilterFormats * in_formats
Lists of formats supported by the input and output filters respectively.
unsigned avfilter_version(void)
Return the LIBAVFILTER_VERSION_INT constant.
int w
agreed upon image width
AVFilterBufferRef * avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
Add a new reference to a buffer.
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
void avfilter_free(AVFilterContext *filter)
Free a filter context.
unsigned nb_inputs
number of input pads
int avfilter_config_links(AVFilterContext *filter)
Negotiate the media format, dimensions, etc of all inputs to a filter.
struct AVFilterBufferRef AVFilterBufferRef
A reference to an AVFilterBuffer.
unsigned refcount
number of references to this buffer
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx)
Insert a filter in the middle of an existing link.
AVFilterContext * src
source filter
AVFilterFormats * out_samplerates
int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
Copy the frame properties of src to dst, without copying the actual image data.
const char * avfilter_configuration(void)
Return the libavfilter build-time configuration.
int format
agreed upon media format
const AVFilterPad * inputs
NULL terminated list of inputs. NULL if none.
void(* free)(struct AVFilterBuffer *buf)
A pointer to the function to deallocate this buffer if the default function is not sufficient...
A reference to an AVFilterBuffer.
struct AVFilter AVFilter
Filter definition.
AVFilterFormats * in_samplerates
Lists of channel layouts and sample rates used for automatic negotiation.
int perms
permissions, see the AV_PERM_* flags
int sample_rate
audio buffer sample rate
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
static int start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
void avfilter_uninit(void)
Uninitialize the filter system.
enum AVPictureType pict_type
picture type of the frame
Describe the class of an AVClass context structure.
rational number numerator/denominator
const char * name
filter name
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
uint8_t ** extended_data
pointers to the data planes/channels.
uint64_t channel_layout
channel layout of audio buffer
AVFilterLink ** outputs
array of pointers to output links
int planar
audio buffer - planar or packed
enum AVMediaType type
filter media type
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name)
Create a filter instance.
int rej_perms
Permissions which are not accepted on incoming buffers.
int interlaced
is frame interlaced
int avfilter_register(AVFilter *filter)
Register a filter.
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
Copy properties of src to dst, without copying the actual data.
AVSampleFormat
Audio Sample Formats.
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, int w, int h, enum AVPixelFormat format)
Create a buffer reference wrapped around an already allocated image buffer.
AVFilterBufferRef * avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, int linesize, int perms, int nb_samples, enum AVSampleFormat sample_fmt, uint64_t channel_layout)
Create an audio buffer reference wrapped around an already allocated samples buffer.
const char * description
A description for the filter.
int64_t pos
byte position in stream, -1 if unknown
AVFilterContext * dst
dest filter
AVFilter * filter
the AVFilter of which this is an instance
const AVClass * av_class
needed for av_log()
uint8_t * data[8]
picture/audio data for each plane
struct AVFilterBuffer AVFilterBuffer
A reference-counted buffer data type used by the filter system.
AVFilterPad * srcpad
output pad on the source filter
const AVFilterPad * outputs
NULL terminated list of outputs. NULL if none.
int(* config_props)(AVFilterLink *link)
Link configuration callback.
struct AVFilterBufferRefAudioProps AVFilterBufferRefAudioProps
Audio specific properties in a reference to an AVFilterBuffer.
const char * avfilter_license(void)
Return the libavfilter license.
int needs_fifo
The filter expects a fifo to be inserted on its input link, typically because it has a delay...
static void draw_slice(HYuvContext *s, int y)
int min_perms
Minimum required permissions on incoming buffers.
AVPixelFormat
Pixel format.
int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
Initialize a filter.
AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
AVFilter ** av_filter_next(AVFilter **filter)
If filter is NULL, returns a pointer to the first registered filter pointer, if filter is non-NULL...
AVFilterFormats * out_formats
int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
Copy the frame properties and data pointers of src to dst, without copying the actual data...
static int end_frame(AVCodecContext *avctx)
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
Link two filters together.