[FFmpeg-cvslog] vdpau: deprecate bitstream buffers within the hardware context

Rémi Denis-Courmont git at videolan.org
Tue Aug 6 14:50:11 CEST 2013


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 25 22:30:21 2013 +0300| [f824535a4a79c260b59d3178b8d958217caffd78] | committer: Anton Khirnov

vdpau: deprecate bitstream buffers within the hardware context

The bitstream buffers are now private and freed by libavcodec. For
backward compatibility, the hold bitstream buffer pointer is left NULL
(applications were supposed to av_freep() it).

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

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

 doc/APIchanges              |    4 ++++
 libavcodec/vdpau.h          |    8 ++++++++
 libavcodec/vdpau_internal.h |    9 +++++++++
 libavcodec/version.h        |    5 ++++-
 4 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 2e7239b..9402d44 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,10 @@ libavutil:     2012-10-22
 
 API changes, most recent first:
 
+2013-08-xx - xxxxxxx - lavc 55.13.0 - avcodec.h
+  Deprecate the bitstream-related members from struct AVVDPAUContext.
+  The bistream buffers no longer need to be explicitly freed.
+
 2013-08-xx - xxxxxxx - lavc 55.12.0 - avcodec.h
   Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL
   and select the AV_PIX_FMT_VDPAU format with get_format() instead.
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 18efcaa..8bedea5 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -52,12 +52,14 @@
 #include <vdpau/vdpau.h>
 #include <vdpau/vdpau_x11.h>
 
+#if FF_API_BUFS_VDPAU
 union AVVDPAUPictureInfo {
     VdpPictureInfoH264        h264;
     VdpPictureInfoMPEG1Or2    mpeg;
     VdpPictureInfoVC1          vc1;
     VdpPictureInfoMPEG4Part2 mpeg4;
 };
+#endif
 
 /**
  * This structure is used to share data between the libavcodec library and
@@ -83,11 +85,13 @@ typedef struct AVVDPAUContext {
      */
     VdpDecoderRender *render;
 
+#if FF_API_BUFS_VDPAU
     /**
      * VDPAU picture information
      *
      * Set by libavcodec.
      */
+    attribute_deprecated
     union AVVDPAUPictureInfo info;
 
     /**
@@ -95,6 +99,7 @@ typedef struct AVVDPAUContext {
      *
      * Set by libavcodec.
      */
+    attribute_deprecated
     int bitstream_buffers_allocated;
 
     /**
@@ -102,6 +107,7 @@ typedef struct AVVDPAUContext {
      *
      * Set by libavcodec.
      */
+    attribute_deprecated
     int bitstream_buffers_used;
 
    /**
@@ -110,7 +116,9 @@ typedef struct AVVDPAUContext {
      *
      * Set by libavcodec.
      */
+    attribute_deprecated
     VdpBitstreamBuffer *bitstream_buffers;
+#endif
 } AVVDPAUContext;
 
 #if FF_API_CAP_VDPAU
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index e93c672..9e4ab4e 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -35,6 +35,15 @@ static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
     return (uintptr_t)pic->f.data[3];
 }
 
+#if !FF_API_BUFS_VDPAU
+union AVVDPAUPictureInfo {
+    VdpPictureInfoH264        h264;
+    VdpPictureInfoMPEG1Or2    mpeg;
+    VdpPictureInfoVC1          vc1;
+    VdpPictureInfoMPEG4Part2 mpeg4;
+};
+#endif
+
 struct vdpau_picture_context {
     /**
      * VDPAU picture information.
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 41a9d7a..7a622f3 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
  */
 
 #define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 12
+#define LIBAVCODEC_VERSION_MINOR 13
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -67,5 +67,8 @@
 #ifndef FF_API_CAP_VDPAU
 #define FF_API_CAP_VDPAU         (LIBAVCODEC_VERSION_MAJOR < 56)
 #endif
+#ifndef FF_API_BUFS_VDPAU
+#define FF_API_BUFS_VDPAU        (LIBAVCODEC_VERSION_MAJOR < 56)
+#endif
 
 #endif /* AVCODEC_VERSION_H */



More information about the ffmpeg-cvslog mailing list