FFmpeg
Data Fields
AVFilterBufferRef Struct Reference

A reference to an AVFilterBuffer. More...

#include <avfilter.h>

Data Fields

AVFilterBufferbuf
 the buffer that this is a reference to
 
uint8_tdata [8]
 picture/audio data for each plane
 
uint8_t ** extended_data
 pointers to the data planes/channels.
 
int linesize [8]
 number of bytes per line
 
AVFilterBufferRefVideoPropsvideo
 video buffer specific properties
 
AVFilterBufferRefAudioPropsaudio
 audio buffer specific properties
 
int64_t pts
 presentation timestamp.
 
int64_t pos
 byte position in stream, -1 if unknown
 
int format
 media format
 
int perms
 permissions, see the AV_PERM_* flags
 
enum AVMediaType type
 media type of buffer data
 
AVDictionarymetadata
 dictionary containing metadata key=value tags
 

Detailed Description

A reference to an AVFilterBuffer.

Since filters can manipulate the origin of a buffer to, for example, crop image without any memcpy, the buffer origin and dimensions are per-reference properties. Linesize is also useful for image flipping, frame to field filters, etc, and so is also per-reference.

TODO: add anything necessary for frame reordering

Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 160 of file avfilter.h.

Field Documentation

AVFilterBufferRefAudioProps* AVFilterBufferRef::audio
AVFilterBuffer* AVFilterBufferRef::buf
uint8_t* AVFilterBufferRef::data[8]
uint8_t** AVFilterBufferRef::extended_data

pointers to the data planes/channels.

For video, this should simply point to data[].

For planar audio, each channel has a separate data pointer, and linesize[0] contains the size of each channel buffer. For packed audio, there is just one data pointer, and linesize[0] contains the total size of the buffer for all channels.

Note: Both data and extended_data will always be set, but for planar audio with more channels that can fit in data, extended_data must be used in order to access all channels.

Definition at line 177 of file avfilter.h.

Referenced by av_buffersink_read_samples(), avfilter_copy_buf_props(), avfilter_get_audio_buffer_ref_from_arrays_channels(), avfilter_get_video_buffer_ref_from_arrays(), avfilter_ref_buffer(), avfilter_unref_buffer(), buffer_offset(), calc_ptr_alignment(), channelmap_filter_frame(), ff_copy_buffer_ref(), ff_filter_frame_framed(), ff_filter_frame_needs_framing(), filter_frame(), join_request_frame(), output_frame(), plot_spectrum_column(), push_samples(), read_from_fifo(), request_frame(), return_audio_frame(), send_silence(), and write_to_fifo().

int AVFilterBufferRef::format
int AVFilterBufferRef::linesize[8]
AVDictionary* AVFilterBufferRef::metadata
int AVFilterBufferRef::perms
int64_t AVFilterBufferRef::pos
int64_t AVFilterBufferRef::pts
enum AVMediaType AVFilterBufferRef::type
AVFilterBufferRefVideoProps* AVFilterBufferRef::video

The documentation for this struct was generated from the following file: