[FFmpeg-cvslog] vdpau: deprecate av_vdpau_get_profile()

Rémi Denis-Courmont git at videolan.org
Tue Sep 29 13:45:59 CEST 2015


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 27 13:49:09 2015 +0300| [b10b6ac7a902f28e09e37a29c392e2f0c19e9526] | committer: Anton Khirnov

vdpau: deprecate av_vdpau_get_profile()

This function can intrinsically not deal with codec profile fallback
(for H.264 Constrained Baseline especially), and was made redundant
by av_vdpau_bind_context().

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b10b6ac7a902f28e09e37a29c392e2f0c19e9526
---

 libavcodec/vdpau.h   |    5 +++++
 libavcodec/version.h |    3 +++
 2 files changed, 8 insertions(+)

diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 4e5c351..d25ee1c 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -177,10 +177,13 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
  */
 AVVDPAUContext *av_vdpau_alloc_context(void);
 
+#if FF_API_VDPAU_PROFILE
 /**
  * Get a decoder profile that should be used for initializing a VDPAU decoder.
  * Should be called from the AVCodecContext.get_format() callback.
  *
+ * @deprecated Use av_vdpau_bind_context() instead.
+ *
  * @param avctx the codec context being used for decoding the stream
  * @param profile a pointer into which the result will be written on success.
  *                The contents of profile are undefined if this function returns
@@ -188,7 +191,9 @@ AVVDPAUContext *av_vdpau_alloc_context(void);
  *
  * @return 0 on success (non-negative), a negative AVERROR on failure.
  */
+attribute_deprecated
 int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
+#endif
 
 #if FF_API_CAP_VDPAU
 /** @brief The videoSurface is used for rendering. */
diff --git a/libavcodec/version.h b/libavcodec/version.h
index ecd6e1d..c704d44 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -165,5 +165,8 @@
 #ifndef FF_API_SIDEDATA_ONLY_PKT
 #define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
+#ifndef FF_API_VDPAU_PROFILE
+#define FF_API_VDPAU_PROFILE     (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
 
 #endif /* AVCODEC_VERSION_H */



More information about the ffmpeg-cvslog mailing list