You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi/buffersink: add accessors for the stream properties.
av_buffersink_get_frame_rate() did already exist; its argument becomes const.
This commit is contained in:
@@ -15,6 +15,9 @@ libavutil: 2015-08-28
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2017-01-12 - xxxxxxx - lavfi 6.69.100- buffersink.h
|
||||||
|
Add av_buffersink_get_*() functions.
|
||||||
|
|
||||||
2017-01-06 - xxxxxxx - lavf 57.62.100- avio.h
|
2017-01-06 - xxxxxxx - lavf 57.62.100- avio.h
|
||||||
Add avio_get_dyn_buf()
|
Add avio_get_dyn_buf()
|
||||||
|
|
||||||
|
@@ -279,14 +279,27 @@ void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size)
|
|||||||
inlink->partial_buf_size = frame_size;
|
inlink->partial_buf_size = frame_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)
|
#define MAKE_AVFILTERLINK_ACCESSOR(type, field) \
|
||||||
{
|
type av_buffersink_get_##field(const AVFilterContext *ctx) { \
|
||||||
av_assert0( !strcmp(ctx->filter->name, "buffersink")
|
av_assert0(ctx->filter->uninit == uninit); \
|
||||||
|| !strcmp(ctx->filter->name, "ffbuffersink"));
|
return ctx->inputs[0]->field; \
|
||||||
|
|
||||||
return ctx->inputs[0]->frame_rate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(enum AVMediaType , type );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(AVRational , time_base );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(int , format );
|
||||||
|
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(AVRational , frame_rate );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(int , w );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(int , h );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(AVRational , sample_aspect_ratio);
|
||||||
|
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(int , channels );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(uint64_t , channel_layout );
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(int , sample_rate );
|
||||||
|
|
||||||
|
MAKE_AVFILTERLINK_ACCESSOR(AVBufferRef * , hw_frames_ctx );
|
||||||
|
|
||||||
static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
|
static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
|
||||||
{
|
{
|
||||||
BufferSinkContext *buf = ctx->priv;
|
BufferSinkContext *buf = ctx->priv;
|
||||||
|
@@ -101,9 +101,27 @@ AVABufferSinkParams *av_abuffersink_params_alloc(void);
|
|||||||
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);
|
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the frame rate of the input.
|
* @defgroup lavfi_buffersink_accessors Buffer sink accessors
|
||||||
|
* Get the properties of the stream
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);
|
|
||||||
|
enum AVMediaType av_buffersink_get_type (const AVFilterContext *ctx);
|
||||||
|
AVRational av_buffersink_get_time_base (const AVFilterContext *ctx);
|
||||||
|
int av_buffersink_get_format (const AVFilterContext *ctx);
|
||||||
|
|
||||||
|
AVRational av_buffersink_get_frame_rate (const AVFilterContext *ctx);
|
||||||
|
int av_buffersink_get_w (const AVFilterContext *ctx);
|
||||||
|
int av_buffersink_get_h (const AVFilterContext *ctx);
|
||||||
|
AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx);
|
||||||
|
|
||||||
|
int av_buffersink_get_channels (const AVFilterContext *ctx);
|
||||||
|
uint64_t av_buffersink_get_channel_layout (const AVFilterContext *ctx);
|
||||||
|
int av_buffersink_get_sample_rate (const AVFilterContext *ctx);
|
||||||
|
|
||||||
|
AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx);
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a frame with filtered data from sink and put it in frame.
|
* Get a frame with filtered data from sink and put it in frame.
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "libavutil/version.h"
|
#include "libavutil/version.h"
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MAJOR 6
|
#define LIBAVFILTER_VERSION_MAJOR 6
|
||||||
#define LIBAVFILTER_VERSION_MINOR 68
|
#define LIBAVFILTER_VERSION_MINOR 69
|
||||||
#define LIBAVFILTER_VERSION_MICRO 100
|
#define LIBAVFILTER_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||||
|
Reference in New Issue
Block a user