aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vda.h
diff options
context:
space:
mode:
authorSebastien Zwickert <dilaroga@gmail.com>2012-08-14 11:45:29 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-14 12:47:27 +0200
commit3c37970637c0e3f1576cae58feed05497e383fc4 (patch)
tree2c75c5b770d105d5f1f1e487292171b8924e2fcd /libavcodec/vda.h
parentcfc680ab3982f5c9e4240a9bb69859a49f420113 (diff)
downloadffmpeg-3c37970637c0e3f1576cae58feed05497e383fc4.tar.gz
vda: support synchronous decoding
Note that the symbols used to run the hardware decoder in asynchronous mode have been marked deprecated and will be dropped at a future version bump. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/vda.h')
-rw-r--r--libavcodec/vda.h47
1 files changed, 44 insertions, 3 deletions
diff --git a/libavcodec/vda.h b/libavcodec/vda.h
index ec7d2f75b6..4daaa1463a 100644
--- a/libavcodec/vda.h
+++ b/libavcodec/vda.h
@@ -29,7 +29,12 @@
* Public libavcodec VDA header.
*/
+#include "libavcodec/version.h"
+
+#if FF_API_VDA_ASYNC
#include <pthread.h>
+#endif
+
#include <stdint.h>
// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
@@ -47,8 +52,11 @@
* @{
*/
+#if FF_API_VDA_ASYNC
/**
- * This structure is used to store a decoded frame information and data.
+ * This structure is used to store decoded frame information and data.
+ *
+ * @deprecated Use synchronous decoding mode.
*/
typedef struct vda_frame {
/**
@@ -75,6 +83,7 @@ typedef struct vda_frame {
*/
struct vda_frame *next_frame;
} vda_frame;
+#endif
/**
* This structure is used to provide the necessary configurations and data
@@ -92,8 +101,27 @@ struct vda_context {
VDADecoder decoder;
/**
+ * The Core Video pixel buffer that contains the current image data.
+ *
+ * encoding: unused
+ * decoding: Set by libavcodec. Unset by user.
+ */
+ CVPixelBufferRef cv_buffer;
+
+ /**
+ * Use the hardware decoder in synchronous mode.
+ *
+ * encoding: unused
+ * decoding: Set by user.
+ */
+ int use_sync_decoding;
+
+#if FF_API_VDA_ASYNC
+ /**
* VDA frames queue ordered by presentation timestamp.
*
+ * @deprecated Use synchronous decoding mode.
+ *
* - encoding: unused
* - decoding: Set/Unset by libavcodec.
*/
@@ -102,10 +130,13 @@ struct vda_context {
/**
* Mutex for locking queue operations.
*
+ * @deprecated Use synchronous decoding mode.
+ *
* - encoding: unused
* - decoding: Set/Unset by libavcodec.
*/
pthread_mutex_t queue_mutex;
+#endif
/**
* The frame width.
@@ -163,11 +194,21 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
/** Destroy the video decoder. */
int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
-/** Return the top frame of the queue. */
+#if FF_API_VDA_ASYNC
+/**
+* Return the top frame of the queue.
+*
+* @deprecated Use synchronous decoding mode.
+*/
vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
-/** Release the given frame. */
+/**
+* Release the given frame.
+*
+* @deprecated Use synchronous decoding mode.
+*/
void ff_vda_release_vda_frame(vda_frame *frame);
+#endif
/**
* @}