]> git.sesse.net Git - ffmpeg/commitdiff
vdpau: deprecate bitstream buffers within the hardware context
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 25 Jul 2013 19:30:21 +0000 (22:30 +0300)
committerAnton Khirnov <anton@khirnov.net>
Mon, 5 Aug 2013 09:21:36 +0000 (11:21 +0200)
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@khirnov.net>
doc/APIchanges
libavcodec/vdpau.h
libavcodec/vdpau_internal.h
libavcodec/version.h

index 2e7239b2129c0526b81767d44e1ee06b87714c68..9402d447dec12537106d69a4929dc5a9d6ec2bb1 100644 (file)
@@ -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.
index 18efcaa6e56202058e0fa6dc757b638ef01e974a..8bedea54ba22505059ac189907c595ffbc8cf4ba 100644 (file)
 #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
index e93c6723d8dcee2b9f3df031fa65f79866a6920b..9e4ab4e3dfa92d9e10e94c75fb5f51ae854f58f5 100644 (file)
@@ -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.
index 41a9d7a05ae62c69d4e1fd0fe3f7bb207e6116dc..7a622f38f997ced88e913948a2b370a11cc3244b 100644 (file)
@@ -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 */