diff mbox series

[FFmpeg-devel] avcodec: add a mention about get_encode_buffer in the old encode API doxy

Message ID 20210312231537.5300-1-jamrial@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec: add a mention about get_encode_buffer in the old encode API doxy | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer March 12, 2021, 11:15 p.m. UTC
Direct users to the callback that should be used to keep supporting user
provided buffers with the new encode API.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Anton Khirnov March 13, 2021, 7:01 a.m. UTC | #1
Quoting James Almer (2021-03-13 00:15:37)
> Direct users to the callback that should be used to keep supporting user
> provided buffers with the new encode API.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/avcodec.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index fbd4804160..76911baea2 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3680,7 +3680,9 @@ void av_parser_close(AVCodecParserContext *s);
>   *                            not be used.
>   * @return          0 on success, negative error code on failure
>   *
> - * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead
> + * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead, and
> + *             if allowed and required, set AVCodecContext.get_encode_buffer to
> + *             a custom function to pass user supplied output buffers.

This sentence would be easier to read if it was split in two IMO.
diff mbox series

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index fbd4804160..76911baea2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3680,7 +3680,9 @@  void av_parser_close(AVCodecParserContext *s);
  *                            not be used.
  * @return          0 on success, negative error code on failure
  *
- * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead
+ * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead, and
+ *             if allowed and required, set AVCodecContext.get_encode_buffer to
+ *             a custom function to pass user supplied output buffers.
  */
 attribute_deprecated
 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
@@ -3719,7 +3721,9 @@  int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
  *                            not be used.
  * @return          0 on success, negative error code on failure
  *
- * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead
+ * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead, and
+ *             if allowed and required, set AVCodecContext.get_encode_buffer to
+ *             a custom function to pass user supplied output buffers.
  */
 attribute_deprecated
 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,