From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3287B453F2 for ; Sat, 28 Jan 2023 11:37:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6ABBB68AD5C; Sat, 28 Jan 2023 13:37:51 +0200 (EET) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 22751680581 for ; Sat, 28 Jan 2023 13:37:45 +0200 (EET) Received: by mail-ej1-f47.google.com with SMTP id p26so8822136ejx.13 for ; Sat, 28 Jan 2023 03:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VdXDImKZS6sziYxmN3pOBKt7LwbvUFL/NX1wIDDTnJc=; b=jWF0EqDYyf3Z486o/YnH+4EagEOiLyGR9FtGhZdSb+NosRm1oLGX1diFB4rYth020k HhbqQDV1HzPUSBEMbMRBwJpJWnkWGZGs1fGRHROty9nfpYapiLuNhUXmrU4S6LwHmZJN vlZCVY4oAWOw0z0s9SUdrXGauhZNeu6PcHTQFyVTvp3uG+WiZ/aY3shHePrq+DAwXL2Z r3n1vShWmKbJXwaApYqL7Lav9ELSS8iWf3v3f3vFmPxXhapQQLr7ElOIhkeo2kZ2pxIa LxliTc4M5IWQKCE2S9bjmO3uOBenceepba4x5b6Ypl2Qg2H8OTHyhGtBtcHPoBkrn19S 89hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VdXDImKZS6sziYxmN3pOBKt7LwbvUFL/NX1wIDDTnJc=; b=yz2b+NurIbSC7kTMrgd7HwtQX8aSP+aU0u4bAUXPkgIMcyos8DAgnLFBf+tKUFrpb4 gjxpRWKJPq9eMf0BnM6smaV7itYXA/PJN76tJmgPIObV0De4lxwzGGs6G89sgzMbK32q AEnSB6dOp03tl1JsFGX0aQy5J838A54rUeuulhWc071ulbtjW7KE3Ep3Fm1vOaCUcLst ebN61PUu5WJx0u4Kw4/lmizXde+P81Uh5EU3FvUHM7cJRnzPaKzn6gjaNHjumjKYXnlS rpSS/Qm7C/Azfl+V9ZjxqMZmLkm2T7rc++ez9TgDaTxAmtbL+PWNQml8feeY9FLHIDmC 8/zg== X-Gm-Message-State: AO0yUKWK9QEaNsAg0fxbUu8Dz7/7uyMi+0V10SQsmbIAfcuwZJrS+K8o 5j91/pAjpheVawEUHOp95JpCriL588g= X-Google-Smtp-Source: AK7set+k5PjYkCVt9p8XDpV0FY3zU31RYT9CMiP0BseCneHaM5Cq/31QMamWXNYtTOsJBt9rkFp67A== X-Received: by 2002:a17:906:3991:b0:878:46ed:6a29 with SMTP id h17-20020a170906399100b0087846ed6a29mr13158429eje.3.1674905864180; Sat, 28 Jan 2023 03:37:44 -0800 (PST) Received: from [192.168.1.104] (84-112-104-25.cable.dynamic.surfer.at. [84.112.104.25]) by smtp.gmail.com with ESMTPSA id d13-20020a170906344d00b0088385cd6166sm570499ejb.195.2023.01.28.03.37.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jan 2023 03:37:43 -0800 (PST) From: Marvin Scholz To: FFmpeg development discussions and patches Date: Sat, 28 Jan 2023 12:37:42 +0100 X-Mailer: MailMate (1.14r5936) Message-ID: In-Reply-To: <20230125165537.5371-1-anton@khirnov.net> References: <20230125165537.5371-1-anton@khirnov.net> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 01/19] lavc/avcodec: improve enc/dec API doxy X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 25 Jan 2023, at 17:55, Anton Khirnov wrote: > Change return value descriptions into proper lists. > --- > libavcodec/avcodec.h | 81 +++++++++++++++++++++++--------------------- > 1 file changed, 42 insertions(+), 39 deletions(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 0ac581d660..f3ca41f126 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -2605,17 +2605,18 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, > * still has frames buffered, it will return them after sending > * a flush packet. > * > - * @return 0 on success, otherwise negative error code: > - * AVERROR(EAGAIN): input is not accepted in the current state - user > - * must read output with avcodec_receive_frame() (once > - * all output is read, the packet should be resent, and > - * the call will not fail with EAGAIN). > - * AVERROR_EOF: the decoder has been flushed, and no new packets can > - * be sent to it (also returned if more than 1 flush > - * packet is sent) > - * AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush > - * AVERROR(ENOMEM): failed to add packet to internal queue, or similar > - * other errors: legitimate decoding errors > + * @return > + * - 0: success > + * - AVERROR(EAGAIN): input is not accepted in the current state - user must > + * read output with avcodec_receive_frame() (once all > + * output is read, the packet should be resent, and the > + * call will not fail with EAGAIN). > + * - AVERROR_EOF: the decoder has been flushed, and no new packets can be > + * sent to it (also returned if more than 1 flush packet is > + * sent) > + * - AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush > + * - AVERROR(ENOMEM): failed to add packet to internal queue, or similar > + * - other errors: legitimate decoding errors > */ Wouldn't @retval work better for such return value documentation? > int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt); > > @@ -2630,17 +2631,17 @@ int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt); > * av_frame_unref(frame) before doing anything else. > * > * @return > - * 0: success, a frame was returned > - * AVERROR(EAGAIN): output is not available in this state - user must try > - * to send new input > - * AVERROR_EOF: the codec has been fully flushed, and there will be > - * no more output frames > - * AVERROR(EINVAL): codec not opened, or it is an encoder without > - * the AV_CODEC_FLAG_RECON_FRAME flag enabled > - * AVERROR_INPUT_CHANGED: current decoded frame has changed parameters > - * with respect to first decoded frame. Applicable > - * when flag AV_CODEC_FLAG_DROPCHANGED is set. > - * other negative values: legitimate decoding errors > + * - 0: success, a frame was returned > + * - AVERROR(EAGAIN): output is not available in this state - user must > + * try to send new input > + * - AVERROR_EOF: the codec has been fully flushed, and there will be > + * no more output frames > + * - AVERROR(EINVAL): codec not opened, or it is an encoder without the > + * AV_CODEC_FLAG_RECON_FRAME flag enabled > + * - AVERROR_INPUT_CHANGED: current decoded frame has changed parameters with > + * respect to first decoded frame. Applicable when flag > + * AV_CODEC_FLAG_DROPCHANGED is set. > + * - other negative values: legitimate decoding errors > */ > int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); > > @@ -2667,16 +2668,17 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); > * If it is not set, frame->nb_samples must be equal to > * avctx->frame_size for all frames except the last. > * The final frame may be smaller than avctx->frame_size. > - * @return 0 on success, otherwise negative error code: > - * AVERROR(EAGAIN): input is not accepted in the current state - user > - * must read output with avcodec_receive_packet() (once > - * all output is read, the packet should be resent, and > - * the call will not fail with EAGAIN). > - * AVERROR_EOF: the encoder has been flushed, and no new frames can > - * be sent to it > - * AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush > - * AVERROR(ENOMEM): failed to add packet to internal queue, or similar > - * other errors: legitimate encoding errors > + * @return > + * - 0: success > + * - AVERROR(EAGAIN): input is not accepted in the current state - user must > + * read output with avcodec_receive_packet() (once all > + * output is read, the packet should be resent, and the > + * call will not fail with EAGAIN). > + * - AVERROR_EOF: the encoder has been flushed, and no new frames can > + * be sent to it > + * - AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush > + * - AVERROR(ENOMEM): failed to add packet to internal queue, or similar > + * - other errors: legitimate encoding errors > */ > int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame); > > @@ -2687,13 +2689,14 @@ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame); > * @param avpkt This will be set to a reference-counted packet allocated by the > * encoder. Note that the function will always call > * av_packet_unref(avpkt) before doing anything else. > - * @return 0 on success, otherwise negative error code: > - * AVERROR(EAGAIN): output is not available in the current state - user > - * must try to send input > - * AVERROR_EOF: the encoder has been fully flushed, and there will be > - * no more output packets > - * AVERROR(EINVAL): codec not opened, or it is a decoder > - * other errors: legitimate encoding errors > + * @return > + * - 0: success > + * - AVERROR(EAGAIN): output is not available in the current state - user must > + * try to send input > + * - AVERROR_EOF: the encoder has been fully flushed, and there will be no > + * more output packets > + * - AVERROR(EINVAL): codec not opened, or it is a decoder > + * - other errors: legitimate encoding errors > */ > int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); > > -- > 2.35.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".