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 30820410EE for ; Wed, 16 Mar 2022 11:36:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7B55B68AE56; Wed, 16 Mar 2022 13:36:23 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F78868A7E9 for ; Wed, 16 Mar 2022 13:36:17 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C8CD9240179 for ; Wed, 16 Mar 2022 12:36:16 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id ZtjfIK_n8ytC for ; Wed, 16 Mar 2022 12:36:15 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id B004A2400F5 for ; Wed, 16 Mar 2022 12:36:15 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id ACE361601AD; Wed, 16 Mar 2022 12:36:15 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <61135415-ad5f-41d4-814e-d0b44488da83@gmail.com> References: <20220222062757.20908-1-anton@khirnov.net> <61135415-ad5f-41d4-814e-d0b44488da83@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Wed, 16 Mar 2022 12:36:15 +0100 Message-ID: <164743057568.9519.10793087121957786500@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc/bsf: add general documentation 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: Quoting James Almer (2022-02-22 18:09:59) > > > On 2/22/2022 3:27 AM, Anton Khirnov wrote: > > Also, place the BSF api docs in their own doxygen group. > > --- > > libavcodec/bsf.h | 23 ++++++++++++++++++++++- > > 1 file changed, 22 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h > > index 8c5355d186..ba8b48f222 100644 > > --- a/libavcodec/bsf.h > > +++ b/libavcodec/bsf.h > > @@ -30,7 +30,28 @@ > > #include "packet.h" > > > > /** > > - * @addtogroup lavc_core > > + * @defgroup lavc_bsf Bitstream filters > > + * @ingroup libavc > > + * > > + * Bitstream filters transform encoded media data without decoding it. This > > + * allows e.g. manipulating various header values. Bitstream filters operate on > > + * @ref AVPacket "AVPackets". > > + * > > + * The bitstream filtering API is centered around two structures: > > + * AVBitStreamFilter and AVBSFContext. The former represents a bitstream filter > > Could use @ref here and below, too. That happens automatically when you write a struct name. > > > + * in abstract, the latter a specific filtering process. Obtain an > > + * AVBitStreamFilter using av_bsf_get_by_name() or av_bsf_iterate(), then pass > > + * it to av_bsf_alloc() to create an AVBSFContext. Fill in the user-settable > > + * AVBSFContext fields, as described in its documentation, then call > > + * av_bsf_init() to prepare the filter context for use. > > + * > > + * Submit packets for filtering using av_bsf_send_packet(), obtain filtered > > + * results with av_bsf_receive_packet(). When no more input packets will be > > + * sent, submit a NULL AVPacket to signal the end of the stream to the filter. > > The doxy for av_bsf_send_packet() states the packet must be "empty", > meaning either "NULL, or pkt->data is NULL and pkt->side_data_elems > zero", so probably mention the same here so it's consistent. The idea here is to provide a quick overview of the API rather than be exhaustive. In retrospect I regard allowing both NULL and "empty packet" (for some quite nontrivial definition of empty, given side-data-only packets) as a mistake, allowing only NULL would be cleaner and less confusing. -- Anton Khirnov _______________________________________________ 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".