summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-22 11:56:55 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-06-25 13:42:47 +0200
commit43583fb85c75ce66f57a6654ca65b55c1c026aae (patch)
treed906c1fb92c24673a2e4e973920afd20196a2f57 /libavfilter
parent972cad77fa13ae312650dd0b7b99e484ffcb7949 (diff)
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.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avcodec.c2
-rw-r--r--libavfilter/avcodec.h8
-rw-r--r--libavfilter/version.h3
3 files changed, 13 insertions, 0 deletions
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index ce53ed9118..c50cd18f0b 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -131,6 +131,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
return 0;
}
+#ifdef FF_API_FILL_FRAME
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *samplesref)
{
@@ -148,3 +149,4 @@ int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
{
return avfilter_copy_buf_props(frame, ref);
}
+#endif
diff --git a/libavfilter/avcodec.h b/libavfilter/avcodec.h
index 9636cfd1bc..b7965da102 100644
--- a/libavfilter/avcodec.h
+++ b/libavfilter/avcodec.h
@@ -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,
int perms);
+#ifdef FF_API_FILL_FRAME
/**
* 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
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *samplesref);
@@ -84,7 +87,9 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
* @param picref a video buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
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
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *ref);
+#endif
/**
* Add frame data to buffer_src.
diff --git a/libavfilter/version.h b/libavfilter/version.h
index a5aa29ce07..a3f6816ec2 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -74,5 +74,8 @@
#ifndef FF_API_FOO_COUNT
#define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
+#ifndef FF_API_FILL_FRAME
+#define FF_API_FILL_FRAME (LIBAVFILTER_VERSION_MAJOR < 4)
+#endif
#endif // AVFILTER_VERSION_H