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 D3C75410F6 for ; Wed, 16 Mar 2022 11:51:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 698A5689DAB; Wed, 16 Mar 2022 13:51:48 +0200 (EET) Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C80268019F for ; Wed, 16 Mar 2022 13:51:41 +0200 (EET) Received: by mail-oo1-f51.google.com with SMTP id u30-20020a4a6c5e000000b00320d8dc2438so2317465oof.12 for ; Wed, 16 Mar 2022 04:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=etfB2dz5nL+Cy1QxyySARufKs8K7rYzujPs6wHDtocs=; b=ov7I1s/5/4XH7DWq6boqhe27KSWgi9MB/SSoc1TEtFLYj6W8fFBymuhgJiGwlooyIK +6eewlJWqQMf9jaJth/b1u3Dd5ttESIgNS0UUDtKk0YhANseTeMx40VTH+NXyMdCEWMD J7qxa1f3ZTtf6pi2GnJ0T6wHfaeceMM26YEoh455vZsoIlCHidca5Xc/nTuq8c0ALFIh MxTFYDWHAOJTx1v9fViVdteX3p0NwssK9wVyjJ1CPakT6/kM7KtzoSAOCI8XSeaixEpq hiL8S2rAfD+BWI7HEfOmeoGWnYzJ10OnbSff95iTM5oVqeHaZBX46mPwVFE/bBhFQLag om4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=etfB2dz5nL+Cy1QxyySARufKs8K7rYzujPs6wHDtocs=; b=bODdtV48ujVlOB9xRkNV75ZmEPhjfZ31GJJVJbCn9mt5lOfdHTHlDCizpJA6VB2PTc bejLtd0yUjyffv01k9gzoQjExYEDxec+B5LLmJAMk0gxBQjJbzw+PdAPmZ9o72mO8RfD neOp6ReSwjmwvKgl+1XNjG8kQN0q5BL2YTnXgf/V0+11/NiTQsuB1LGynyGsw6hE4Pzp wLhP/CqBxN/EsgW+0b52alPeO8CVI+4RccDYs3fwX8jUb7Fps8p9wgjVLaRScAAZAZER olpzaUaIBJ85u2OJV0a7fUnWjz0MipAVyuq6GUSnNCNrcKtTTVpbFJKTp2gDmk61URYE kaQg== X-Gm-Message-State: AOAM531kpFrPbj+jMIGuc1s5tBUqPgE0gWnRqkNXANnyCLF9dICTZ30f gqaw9oOSmQJ2irG6cShEaw5NqVW9CWKfdA== X-Google-Smtp-Source: ABdhPJzAx4I2v/Kthd7kJMpzahE2/FRIyNecADvt3CJCDtsC0dTZSxJY37vjdO4JfEWoEiXGvY9raw== X-Received: by 2002:a05:6870:4248:b0:dc:c433:8074 with SMTP id v8-20020a056870424800b000dcc4338074mr2565870oac.96.1647431499284; Wed, 16 Mar 2022 04:51:39 -0700 (PDT) Received: from [192.168.0.13] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id q9-20020a4ae649000000b00320d35fc91dsm759350oot.24.2022.03.16.04.51.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Mar 2022 04:51:38 -0700 (PDT) Message-ID: Date: Wed, 16 Mar 2022 08:51:37 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220222062757.20908-1-anton@khirnov.net> <61135415-ad5f-41d4-814e-d0b44488da83@gmail.com> <164743057568.9519.10793087121957786500@lain.red.khirnov.net> From: James Almer In-Reply-To: <164743057568.9519.10793087121957786500@lain.red.khirnov.net> 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 3/16/2022 8:36 AM, Anton Khirnov wrote: > 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. Ok, LGTM then. _______________________________________________ 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".