avfilter_(un)ref_pic -> avfilter_(un)ref_buffer avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props AVFilterBufferRef.pic -> AVFilterBufferRef.buffer They have been renamed to allow sharing with audio. Patch by S.N. Hemanth Meenakshisundaram $smeenaks$ucsd$edu$. Originally committed as revision 24731 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.h (1 of 11 files). Show all
Unified · Split
| @@ -25,7 +25,7 @@ · 24 unmodified lines | |||
| 25 | #include "libavutil/avutil.h" | 25 | #include "libavutil/avutil.h" |
| 26 | 26 | ||
| 27 | #define LIBAVFILTER_VERSION_MAJOR 1 | 27 | #define LIBAVFILTER_VERSION_MAJOR 1 |
| 28 | #define LIBAVFILTER_VERSION_MINOR 29 | 28 | #define LIBAVFILTER_VERSION_MINOR 30 |
| 29 | #define LIBAVFILTER_VERSION_MICRO 0 | 29 | #define LIBAVFILTER_VERSION_MICRO 0 |
| 30 | 30 | ||
| 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| @@ -90,7 +90,7 @@ typedef struct AVFilterBuffer · 58 unmodified lines | |||
| 90 | 90 | ||
| 91 | /** | 91 | /** |
| 92 | * A reference to an AVFilterBuffer. Since filters can manipulate the origin of | 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 | * and dimensions are per-reference properties. Linesize is also useful for | 94 | * and dimensions are per-reference properties. Linesize is also useful for |
| 95 | * image flipping, frame to field filters, etc, and so is also per-reference. | 95 | * image flipping, frame to field filters, etc, and so is also per-reference. |
| 96 | * | 96 | * |
| @@ -98,7 +98,7 @@ typedef struct AVFilterBuffer · 1 unmodified line | |||
| 98 | */ | 98 | */ |
| 99 | typedef struct AVFilterBufferRef | 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 | uint8_t *data[4]; ///< picture data for each plane | 102 | uint8_t *data[4]; ///< picture data for each plane |
| 103 | int linesize[4]; ///< number of bytes per line | 103 | int linesize[4]; ///< number of bytes per line |
| 104 | int w; ///< image width | 104 | int w; ///< image width |
| @@ -120,7 +120,7 @@ typedef struct AVFilterBufferRef · 15 unmodified lines | |||
| 120 | * Copy properties of src to dst, without copying the actual video | 120 | * Copy properties of src to dst, without copying the actual video |
| 121 | * data. | 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 | dst->pts = src->pts; | 125 | dst->pts = src->pts; |
| 126 | dst->pos = src->pos; | 126 | dst->pos = src->pos; |
| @@ -132,21 +132,21 @@ static inline void avfilter_copy_picref_props(AVFilterBufferRef *dst, AVFilterBu · 5 unmodified lines | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | /** | 134 | /** |
| 135 | * Add a new reference to a picture. | 135 | * Add a new reference to a buffer. |
| 136 | * @param ref an existing reference to the picture | 136 | * @param ref an existing reference to the buffer |
| 137 | * @param pmask a bitmask containing the allowable permissions in the new | 137 | * @param pmask a bitmask containing the allowable permissions in the new |
| 138 | * reference | 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 | * old, excluding any permissions denied by pmask | 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 | 145 | * Remove a reference to a buffer. If this is the last reference to the |
| 146 | * picture, the picture itself is also automatically freed. | 146 | * buffer, the buffer itself is also automatically freed. |
| 147 | * @param ref reference to the picture | 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 | * A list of supported formats for one end of a filter link. This is used | 152 | * A list of supported formats for one end of a filter link. This is used |
| @@ -442,7 +442,7 @@ typedef struct AVFilter · 289 unmodified lines | |||
| 442 | 442 | ||
| 443 | /** | 443 | /** |
| 444 | * Filter uninitialization function. Should deallocate any memory held | 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 | * to deallocate the AVFilterContext->priv memory itself. | 446 | * to deallocate the AVFilterContext->priv memory itself. |
| 447 | */ | 447 | */ |
| 448 | void (*uninit)(AVFilterContext *ctx); | 448 | void (*uninit)(AVFilterContext *ctx); |
| @@ -524,9 +524,9 @@ struct AVFilterLink · 75 unmodified lines | |||
| 524 | AVFilterFormats *out_formats; | 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 | * filter. This is used internally by the filter system to allow | 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 | * for the destination. This should not be accessed directly by the | 530 | * for the destination. This should not be accessed directly by the |
| 531 | * filters. | 531 | * filters. |
| 532 | */ | 532 | */ |
| @@ -556,13 +556,13 @@ int avfilter_config_links(AVFilterContext *filter); · 23 unmodified lines | |||
| 556 | 556 | ||
| 557 | /** | 557 | /** |
| 558 | * Request a picture buffer with a specific set of permissions. | 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 | * be requested | 560 | * be requested |
| 561 | * @param perms the required access permissions | 561 | * @param perms the required access permissions |
| 562 | * @param w the minimum width of the buffer to allocate | 562 | * @param w the minimum width of the buffer to allocate |
| 563 | * @param h the minimum height of the buffer to allocate | 563 | * @param h the minimum height of the buffer to allocate |
| 564 | * @return A reference to the picture. This must be unreferenced with | 564 | * @return A reference to the buffer. This must be unreferenced with |
| 565 | * avfilter_unref_pic when you are finished with it. | 565 | * avfilter_unref_buffer when you are finished with it. |
| 566 | */ | 566 | */ |
| 567 | AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, | 567 | AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, |
| 568 | int w, int h); | 568 | int w, int h); |