mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
lavfi/avcodec: deprecate avfilter_fill_frame_from_*_buffer_ref API
Deprecate functions: avfilter_fill_frame_from_buffer_ref avfilter_fill_frame_from_audio_buffer_ref avfilter_fill_frame_from_video_buffer_ref and schedule to drop them at the next API major bump. The function avfilter_copy_buf_props() should be used instead.
This commit is contained in:
parent
972cad77fa
commit
43583fb85c
2
ffmpeg.c
2
ffmpeg.c
@ -1964,7 +1964,7 @@ static int poll_filters(void)
|
|||||||
|
|
||||||
switch (ost->filter->filter->inputs[0]->type) {
|
switch (ost->filter->filter->inputs[0]->type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
avfilter_fill_frame_from_video_buffer_ref(filtered_frame, picref);
|
avfilter_copy_buf_props(filtered_frame, picref);
|
||||||
filtered_frame->pts = frame_pts;
|
filtered_frame->pts = frame_pts;
|
||||||
if (!ost->frame_aspect_ratio)
|
if (!ost->frame_aspect_ratio)
|
||||||
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio;
|
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio;
|
||||||
|
2
ffplay.c
2
ffplay.c
@ -1732,7 +1732,7 @@ static int video_thread(void *arg)
|
|||||||
if (fabs(is->frame_last_filter_delay) > AV_NOSYNC_THRESHOLD / 10.0)
|
if (fabs(is->frame_last_filter_delay) > AV_NOSYNC_THRESHOLD / 10.0)
|
||||||
is->frame_last_filter_delay = 0;
|
is->frame_last_filter_delay = 0;
|
||||||
|
|
||||||
avfilter_fill_frame_from_video_buffer_ref(frame, picref);
|
avfilter_copy_buf_props(frame, picref);
|
||||||
|
|
||||||
pts_int = picref->pts;
|
pts_int = picref->pts;
|
||||||
tb = filt_out->inputs[0]->time_base;
|
tb = filt_out->inputs[0]->time_base;
|
||||||
|
@ -131,6 +131,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FF_API_FILL_FRAME
|
||||||
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
||||||
const AVFilterBufferRef *samplesref)
|
const AVFilterBufferRef *samplesref)
|
||||||
{
|
{
|
||||||
@ -148,3 +149,4 @@ int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
|
|||||||
{
|
{
|
||||||
return avfilter_copy_buf_props(frame, ref);
|
return avfilter_copy_buf_props(frame, ref);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -66,6 +66,7 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
|
|||||||
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
|
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
|
||||||
int perms);
|
int perms);
|
||||||
|
|
||||||
|
#ifdef FF_API_FILL_FRAME
|
||||||
/**
|
/**
|
||||||
* Fill an AVFrame with the information stored in samplesref.
|
* Fill an AVFrame with the information stored in samplesref.
|
||||||
*
|
*
|
||||||
@ -73,7 +74,9 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame
|
|||||||
* @param samplesref an audio buffer reference
|
* @param samplesref an audio buffer reference
|
||||||
* @return 0 in case of success, a negative AVERROR code in case of
|
* @return 0 in case of success, a negative AVERROR code in case of
|
||||||
* failure
|
* failure
|
||||||
|
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||||
*/
|
*/
|
||||||
|
attribute_deprecated
|
||||||
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
||||||
const AVFilterBufferRef *samplesref);
|
const AVFilterBufferRef *samplesref);
|
||||||
|
|
||||||
@ -84,7 +87,9 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
|||||||
* @param picref a video buffer reference
|
* @param picref a video buffer reference
|
||||||
* @return 0 in case of success, a negative AVERROR code in case of
|
* @return 0 in case of success, a negative AVERROR code in case of
|
||||||
* failure
|
* failure
|
||||||
|
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||||
*/
|
*/
|
||||||
|
attribute_deprecated
|
||||||
int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
||||||
const AVFilterBufferRef *picref);
|
const AVFilterBufferRef *picref);
|
||||||
|
|
||||||
@ -95,9 +100,12 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
|||||||
* @param ref a video or audio buffer reference
|
* @param ref a video or audio buffer reference
|
||||||
* @return 0 in case of success, a negative AVERROR code in case of
|
* @return 0 in case of success, a negative AVERROR code in case of
|
||||||
* failure
|
* failure
|
||||||
|
* @deprecated Use avfilter_copy_buf_props() instead.
|
||||||
*/
|
*/
|
||||||
|
attribute_deprecated
|
||||||
int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
|
int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
|
||||||
const AVFilterBufferRef *ref);
|
const AVFilterBufferRef *ref);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add frame data to buffer_src.
|
* Add frame data to buffer_src.
|
||||||
|
@ -74,5 +74,8 @@
|
|||||||
#ifndef FF_API_FOO_COUNT
|
#ifndef FF_API_FOO_COUNT
|
||||||
#define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4)
|
#define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_FILL_FRAME
|
||||||
|
#define FF_API_FILL_FRAME (LIBAVFILTER_VERSION_MAJOR < 4)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // AVFILTER_VERSION_H
|
#endif // AVFILTER_VERSION_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user