av_buffersink_get_frame_rate() did already exist; its argument becomes const.
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2015-08-28 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2017-01-12 - xxxxxxx - lavfi 6.69.100- buffersink.h | |
| 19 | + Add av_buffersink_get_*() functions. | |
| 20 | + | |
| 18 | 21 | 2017-01-06 - xxxxxxx - lavf 57.62.100- avio.h |
| 19 | 22 | Add avio_get_dyn_buf() |
| 20 | 23 | |
| @@ -279,14 +279,27 @@ void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size) · 278 unmodified lines | ||
| 279 | 279 | inlink->partial_buf_size = frame_size; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | −AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx) | |
| 283 | −{ | |
| 284 | − av_assert0( !strcmp(ctx->filter->name, "buffersink") | |
| 285 | − || !strcmp(ctx->filter->name, "ffbuffersink")); | |
| 286 | − | |
| 287 | − return ctx->inputs[0]->frame_rate; | |
| 282 | +#define MAKE_AVFILTERLINK_ACCESSOR(type, field) \ | |
| 283 | +type av_buffersink_get_##field(const AVFilterContext *ctx) { \ | |
| 284 | + av_assert0(ctx->filter->uninit == uninit); \ | |
| 285 | + return ctx->inputs[0]->field; \ | |
| 288 | 286 | } |
| 289 | 287 | |
| 288 | +MAKE_AVFILTERLINK_ACCESSOR(enum AVMediaType , type ); | |
| 289 | +MAKE_AVFILTERLINK_ACCESSOR(AVRational , time_base ); | |
| 290 | +MAKE_AVFILTERLINK_ACCESSOR(int , format ); | |
| 291 | + | |
| 292 | +MAKE_AVFILTERLINK_ACCESSOR(AVRational , frame_rate ); | |
| 293 | +MAKE_AVFILTERLINK_ACCESSOR(int , w ); | |
| 294 | +MAKE_AVFILTERLINK_ACCESSOR(int , h ); | |
| 295 | +MAKE_AVFILTERLINK_ACCESSOR(AVRational , sample_aspect_ratio); | |
| 296 | + | |
| 297 | +MAKE_AVFILTERLINK_ACCESSOR(int , channels ); | |
| 298 | +MAKE_AVFILTERLINK_ACCESSOR(uint64_t , channel_layout ); | |
| 299 | +MAKE_AVFILTERLINK_ACCESSOR(int , sample_rate ); | |
| 300 | + | |
| 301 | +MAKE_AVFILTERLINK_ACCESSOR(AVBufferRef * , hw_frames_ctx ); | |
| 302 | + | |
| 290 | 303 | static av_cold int vsink_init(AVFilterContext *ctx, void *opaque) |
| 291 | 304 | { |
| 292 | 305 | BufferSinkContext *buf = ctx->priv; |
| @@ -101,9 +101,27 @@ AVABufferSinkParams *av_abuffersink_params_alloc(void); · 100 unmodified lines | ||
| 101 | 101 | void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size); |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | − * Get the frame rate of the input. | |
| 104 | + * @defgroup lavfi_buffersink_accessors Buffer sink accessors | |
| 105 | + * Get the properties of the stream | |
| 106 | + * @{ | |
| 105 | 107 | */ |
| 106 | −AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx); | |
| 108 | + | |
| 109 | +enum AVMediaType av_buffersink_get_type (const AVFilterContext *ctx); | |
| 110 | +AVRational av_buffersink_get_time_base (const AVFilterContext *ctx); | |
| 111 | +int av_buffersink_get_format (const AVFilterContext *ctx); | |
| 112 | + | |
| 113 | +AVRational av_buffersink_get_frame_rate (const AVFilterContext *ctx); | |
| 114 | +int av_buffersink_get_w (const AVFilterContext *ctx); | |
| 115 | +int av_buffersink_get_h (const AVFilterContext *ctx); | |
| 116 | +AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx); | |
| 117 | + | |
| 118 | +int av_buffersink_get_channels (const AVFilterContext *ctx); | |
| 119 | +uint64_t av_buffersink_get_channel_layout (const AVFilterContext *ctx); | |
| 120 | +int av_buffersink_get_sample_rate (const AVFilterContext *ctx); | |
| 121 | + | |
| 122 | +AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx); | |
| 123 | + | |
| 124 | +/** @} */ | |
| 107 | 125 | |
| 108 | 126 | /** |
| 109 | 127 | * Get a frame with filtered data from sink and put it in frame. |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "libavutil/version.h" |
| 31 | 31 | |
| 32 | 32 | #define LIBAVFILTER_VERSION_MAJOR 6 |
| 33 | −#define LIBAVFILTER_VERSION_MINOR 68 | |
| 33 | +#define LIBAVFILTER_VERSION_MINOR 69 | |
| 34 | 34 | #define LIBAVFILTER_VERSION_MICRO 100 |
| 35 | 35 | |
| 36 | 36 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |