Revision 7fce481a libavfilter/avfilter.h
libavfilter/avfilter.h | ||
---|---|---|
25 | 25 |
#include "libavutil/avutil.h" |
26 | 26 |
|
27 | 27 |
#define LIBAVFILTER_VERSION_MAJOR 1 |
28 |
#define LIBAVFILTER_VERSION_MINOR 29
|
|
28 |
#define LIBAVFILTER_VERSION_MINOR 30
|
|
29 | 29 |
#define LIBAVFILTER_VERSION_MICRO 0 |
30 | 30 |
|
31 | 31 |
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
... | ... | |
90 | 90 |
|
91 | 91 |
/** |
92 | 92 |
* A reference to an AVFilterBuffer. Since filters can manipulate the origin of |
93 |
* a picture to, for example, crop image without any memcpy, the picture origin
|
|
93 |
* a buffer to, for example, crop image without any memcpy, the buffer origin
|
|
94 | 94 |
* and dimensions are per-reference properties. Linesize is also useful for |
95 | 95 |
* image flipping, frame to field filters, etc, and so is also per-reference. |
96 | 96 |
* |
... | ... | |
98 | 98 |
*/ |
99 | 99 |
typedef struct AVFilterBufferRef |
100 | 100 |
{ |
101 |
AVFilterBuffer *pic; ///< the picture that this is a reference to
|
|
101 |
AVFilterBuffer *buf; ///< the buffer that this is a reference to
|
|
102 | 102 |
uint8_t *data[4]; ///< picture data for each plane |
103 | 103 |
int linesize[4]; ///< number of bytes per line |
104 | 104 |
int w; ///< image width |
... | ... | |
120 | 120 |
* Copy properties of src to dst, without copying the actual video |
121 | 121 |
* data. |
122 | 122 |
*/ |
123 |
static inline void avfilter_copy_picref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
|
|
123 |
static inline void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
|
|
124 | 124 |
{ |
125 | 125 |
dst->pts = src->pts; |
126 | 126 |
dst->pos = src->pos; |
... | ... | |
132 | 132 |
} |
133 | 133 |
|
134 | 134 |
/** |
135 |
* Add a new reference to a picture.
|
|
136 |
* @param ref an existing reference to the picture
|
|
135 |
* Add a new reference to a buffer.
|
|
136 |
* @param ref an existing reference to the buffer
|
|
137 | 137 |
* @param pmask a bitmask containing the allowable permissions in the new |
138 | 138 |
* reference |
139 |
* @return a new reference to the picture with the same properties as the
|
|
139 |
* @return a new reference to the buffer with the same properties as the
|
|
140 | 140 |
* old, excluding any permissions denied by pmask |
141 | 141 |
*/ |
142 |
AVFilterBufferRef *avfilter_ref_pic(AVFilterBufferRef *ref, int pmask);
|
|
142 |
AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
|
|
143 | 143 |
|
144 | 144 |
/** |
145 |
* Remove a reference to a picture. If this is the last reference to the
|
|
146 |
* picture, the picture itself is also automatically freed.
|
|
147 |
* @param ref reference to the picture
|
|
145 |
* Remove a reference to a buffer. If this is the last reference to the
|
|
146 |
* buffer, the buffer itself is also automatically freed.
|
|
147 |
* @param ref reference to the buffer
|
|
148 | 148 |
*/ |
149 |
void avfilter_unref_pic(AVFilterBufferRef *ref);
|
|
149 |
void avfilter_unref_buffer(AVFilterBufferRef *ref);
|
|
150 | 150 |
|
151 | 151 |
/** |
152 | 152 |
* A list of supported formats for one end of a filter link. This is used |
... | ... | |
442 | 442 |
|
443 | 443 |
/** |
444 | 444 |
* Filter uninitialization function. Should deallocate any memory held |
445 |
* by the filter, release any picture references, etc. This does not need
|
|
445 |
* by the filter, release any buffer references, etc. This does not need
|
|
446 | 446 |
* to deallocate the AVFilterContext->priv memory itself. |
447 | 447 |
*/ |
448 | 448 |
void (*uninit)(AVFilterContext *ctx); |
... | ... | |
524 | 524 |
AVFilterFormats *out_formats; |
525 | 525 |
|
526 | 526 |
/** |
527 |
* The picture reference currently being sent across the link by the source
|
|
527 |
* The buffer reference currently being sent across the link by the source
|
|
528 | 528 |
* filter. This is used internally by the filter system to allow |
529 |
* automatic copying of pictures which do not have sufficient permissions
|
|
529 |
* automatic copying of buffers which do not have sufficient permissions
|
|
530 | 530 |
* for the destination. This should not be accessed directly by the |
531 | 531 |
* filters. |
532 | 532 |
*/ |
... | ... | |
556 | 556 |
|
557 | 557 |
/** |
558 | 558 |
* Request a picture buffer with a specific set of permissions. |
559 |
* @param link the output link to the filter from which the picture will
|
|
559 |
* @param link the output link to the filter from which the buffer will
|
|
560 | 560 |
* be requested |
561 | 561 |
* @param perms the required access permissions |
562 | 562 |
* @param w the minimum width of the buffer to allocate |
563 | 563 |
* @param h the minimum height of the buffer to allocate |
564 |
* @return A reference to the picture. This must be unreferenced with
|
|
565 |
* avfilter_unref_pic when you are finished with it.
|
|
564 |
* @return A reference to the buffer. This must be unreferenced with
|
|
565 |
* avfilter_unref_buffer when you are finished with it.
|
|
566 | 566 |
*/ |
567 | 567 |
AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, |
568 | 568 |
int w, int h); |
Also available in: Unified diff