On Mon, Aug 13, 2012 at 08:35:48PM +0200, Sebastien Zwickert wrote:
> 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.
> ---
> libavcodec/vda.c | 105 +++++++++++++++++++++++++++-----------------
> libavcodec/vda.h | 48 +++++++++++++++++++--
> libavcodec/vda_h264.c | 11 +++-
> libavcodec/vda_internal.h | 4 ++
> libavcodec/version.h | 3 +
> 5 files changed, 123 insertions(+), 48 deletions(-)
>
> --- a/libavcodec/vda.c
> +++ b/libavcodec/vda.c
> @@ -95,35 +95,42 @@ static void vda_decoder_callback(void *vda_hw_ctx,
>
> + if (!(new_frame = av_mallocz(sizeof(vda_frame))))
av_mallocz(sizeof(*new_frame)) would be better.
But you are just moving that line, so this likely belongs in
a separate patch.
> --- a/libavcodec/vda.h
> +++ b/libavcodec/vda.h
> @@ -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 a decoded frame information and data.
Drop the "a", there is no such thing as "an information", information has
no singular.
> @@ -92,8 +101,27 @@ struct vda_context {
>
> /**
> + * 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.
whether to use
Also, that line is long.
> @@ -102,11 +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.
Looks like stray empty line removal.
> @@ -163,11 +193,21 @@ int ff_vda_create_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
End sentences in a period.
> --- a/libavcodec/vda_h264.c
> +++ b/libavcodec/vda_h264.c
> @@ -73,9 +73,14 @@ static int end_frame(AVCodecContext *avctx)
>
> + if (vda_ctx->use_sync_decoding) {
> + status = ff_vda_sync_decode(vda_ctx);
> + frame->data[3] = (void*)vda_ctx->cv_buffer;
Gah, void* cast.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel