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 1968745C44 for ; Fri, 28 Apr 2023 10:37:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 28CDC68BF93; Fri, 28 Apr 2023 13:37:20 +0300 (EEST) Received: from icp-osb-irony-out2.external.iinet.net.au (icp-osb-irony-out2.external.iinet.net.au [203.59.1.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 512D268BF7D for ; Fri, 28 Apr 2023 13:37:11 +0300 (EEST) X-SMTP-MATCH: 1 IronPort-Data: A9a23:4Q7LyaCX4jFglhVW/7Dhw5YqxClBgxIJ4kV8jS/XYbTApAqWrYH/e hmroN36Sv2PUtZ4C9h2aL0ClToHvYjX0NRT/GMcrRlFV2hNpdfOGeOXJ0LxOzL6BsDYRSqL1 e1HAjX7BJ1yHy60SiuFaOC79iEgj/HQGtIQNcafUsxPbV48IMseoU878wIJqtYAqcS0BQqLp eTzr6X3ULNy82cpWo68w/vrRCJH5JweihtB1rANTakjUGvlqpUgJMl3yZddjpfPatI88uaSH 44vxZnlpTmBp09F5tmNyt4XeWVSKlLeFVTV0CIOA8BOjzAazhHe3JrXO9JDYFp00wqS2Oov1 ckU8oewaV10EurDzbF1vxlwS0mSPIVD8bzAZ2a87N6P0QvPdmP2hfJ0AynaP6VBoLoxWD0es 6BFbmlSNHhvhMrvqF6/YvNrisIuPY/hNYASoFlhzDfUEbAgTIyFSriiCdpwgGtu250UTaaED yYfQSRAajvHbSQVAFU8Oc0ctqCpiHnOKDIN/Tp5ooJyuQA/1jdZ3rboKNfaP9CHW8hRtkiWo 3rL8CL+GB5yCTCE4WPfrjf12r+KwX6+Ad1IUrGp8LhrgVue2ioVBQFQXEbTTeSFt3NSkul3c yQ8khfCZ4BrnKB3ZrERhyGFnUM= IronPort-HdrOrdr: A9a23:eERd1qxPv+9Tdiy1Hdv4KrPwN71zdoMgy1knxilNoHtuA6+lfq GV/MjzuiWftN98YhwdcLO7WZVoI0myyXcd2+B4VotKNzOJhILHFu1fBPDZsl/dJxE= X-Talos-CUID: =?us-ascii?q?9a23=3A9SIz/mipx6oszLSUrbDIwh34TzJuLXTA7y/vOAi?= =?us-ascii?q?CV3t1EfqOSX/KpY8jnJ87?= X-Talos-MUID: =?us-ascii?q?9a23=3ArP+fPQxQGySbdCPTi6BH/nYoef2aqLqBDm8Kn6x?= =?us-ascii?q?cgcuvBHNSEXCcgjSGGYByfw=3D=3D?= X-IronPort-AV: E=Sophos;i="5.99,234,1677513600"; d="scan'208";a="446552882" Received: from 124-148-45-172.dyn.iinet.net.au (HELO mako.vk5ztv.ampr.org) ([124.148.45.172]) by icp-osb-irony-out2.iinet.net.au with ESMTP; 28 Apr 2023 18:37:06 +0800 From: Rodney Baker To: ffmpeg-devel@ffmpeg.org Date: Fri, 28 Apr 2023 20:07:05 +0930 Message-ID: <2230476.eJ43uMOuf2@mako.vk5ztv.ampr.org> In-Reply-To: <20230428095508.221826-2-george@nsup.org> References: <20230428095508.221826-1-george@nsup.org> <20230428095508.221826-2-george@nsup.org> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 2/8] lavu: new AVWriter API 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: I'm not normally a reviewer, but I noticed a few minor grammatical things that stood out - hope this is OK. Regards, Rodney. On Friday, 28 April 2023 7:25:02 PM ACST Nicolas George wrote: > Signed-off-by: Nicolas George > --- > doc/avwriter_intro.md | 186 ++++++++++++++++ > libavutil/Makefile | 2 +- > libavutil/writer.c | 458 +++++++++++++++++++++++++++++++++++++++ > libavutil/writer.h | 488 ++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 1133 insertions(+), 1 deletion(-) > create mode 100644 doc/avwriter_intro.md > create mode 100644 libavutil/writer.c > create mode 100644 libavutil/writer.h > > diff --git a/doc/avwriter_intro.md b/doc/avwriter_intro.md > new file mode 100644 > index 0000000000..0e092246a2 > --- /dev/null > +++ b/doc/avwriter_intro.md > @@ -0,0 +1,186 @@ > +# Quick start guide for AVWriter > + > +AVWriter is an API to unify functions returning strings and to make > building +strings from parts easier. In this document, you will find an > introduction +on how to *use* AVWriter, mostly in the form of code snippets > compating +mainstream C solutions with their AVWriter counterpart. Nit - s/compating/comparing/ [...] > + > +**Note:** AVWriter is 8-bit clean, the strings it manipulates can be Use a hyphen or a semicolon rather than a comma after "clean". > buffers +of binary data. The documentation is mostly written uing the > vocabulary of +strings for simplicity. > + > +In mainstream C, a function that needs to return a string usually have two > +options: either they accept pointer to a buffer that they fill or they > +allocate the buffer themselves and return it. Both these options have > +drawbacks, which one is best depends on the circumstances of the caller. Semicolon instead of comma after "drawbacks". > + > +AVWriter lets the caller choose the option best suited to the > circumstances, +among a small variety of built-in options or custom Drop comma after "circumstances". > implementations, +including on-the-fly compression or escaping and direct > writing to a file. +The first built-in implementation, where the strings is > stored in a +dynamically-allocated buffer, includes the optimization that > small strings +are kept on the stack. > + > +AVWriter also makes the work of the called function easier by providing > +convenient functions to append to the string that completely wrap error > +checks. Note that it only works for strings created as streams; functions > +that need random access to the string already built still need to manage > +their own buffers; some AVWriter implementations can still help for that. Full stop after "buffers" (instead of semicolon - you've already used one previously in the same sentence). [...] -- ================================================================================================================== Rodney Baker rodney.baker@iinet.net.au ================================================================================================================== _______________________________________________ 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".