diff options
author | Sebastien Zwickert <dilaroga@gmail.com> | 2012-08-12 17:03:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-14 03:39:23 +0200 |
commit | 7f3dfd2010c6f92447e34ccbbb303b0fd18997ff (patch) | |
tree | 1d2c8bc2601c0706a81db69bf6e27b7307a1b526 /libavcodec/vda.h | |
parent | 47682ddc227742e9f401d3f33c4c07789381798a (diff) | |
download | ffmpeg-7f3dfd2010c6f92447e34ccbbb303b0fd18997ff.tar.gz |
vda: support synchronous decoding.
Note that the symbols used to run the hardware decoder in asynchronous mode
has been marked as deprecated and will be dropped at a future version dump.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vda.h')
-rw-r--r-- | libavcodec/vda.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/libavcodec/vda.h b/libavcodec/vda.h index 4ea0e9f3b2..8c5ed66306 100644 --- a/libavcodec/vda.h +++ b/libavcodec/vda.h @@ -29,7 +29,11 @@ * 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 +51,12 @@ * @{ */ +#if FF_API_VDA_ASYNC /** - * This structure is used to store a decoded frame information and data. + * This structure is used to store a decoded frame information and data. + * + * @deprecated Use synchronous decoding mode. + * */ typedef struct { /** @@ -75,6 +83,7 @@ typedef struct { */ 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; + + /** + * An integer value that indicates whether 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. @@ -172,11 +203,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 /** * @} |