summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-04-16 14:01:26 +0200
committerAnton Khirnov <anton@khirnov.net>2012-05-09 17:47:53 +0200
commit9453c9e1dec6ba44a6bedbfc02b72433e89c03dd (patch)
treeec931deb2f998808fdfab72c9c8bebf82ea91fbb /libavfilter/avfilter.h
parentc22953b8a3abc1ddd02e2f468845dc2bf0e45253 (diff)
lavfi: add extended_data to AVFilterBuffer.
This is similar to what has previously been done in AVFrame to allow dealing with more than 8 channels.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index ef61a5da6a..8965094b19 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -76,6 +76,22 @@ typedef struct AVFilterBuffer {
int format; ///< media format
int w, h; ///< width and height of the allocated buffer
+
+ /**
+ * 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.
+ */
+ uint8_t **extended_data;
} AVFilterBuffer;
#define AV_PERM_READ 0x01 ///< can read from the buffer
@@ -140,6 +156,22 @@ typedef struct AVFilterBufferRef {
enum AVMediaType type; ///< media type of buffer data
AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
+
+ /**
+ * 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.
+ */
+ uint8_t **extended_data;
} AVFilterBufferRef;
/**