From patchwork Tue Feb 22 06:27:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 34437 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:d078:0:0:0:0 with SMTP id x24csp4069223nkx; Mon, 21 Feb 2022 22:28:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJypGY0H3ZayLx+rHRqA33U+XfZd8axXpdmjSjtOUwcLNZlUNVTV99esgYvPXsKdB953w+lH X-Received: by 2002:a17:906:be1:b0:6ce:c3c8:b4b6 with SMTP id z1-20020a1709060be100b006cec3c8b4b6mr17722161ejg.617.1645511307786; Mon, 21 Feb 2022 22:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645511307; cv=none; d=google.com; s=arc-20160816; b=Xw3ONyTpXibDZOUyqWwGvYTntTDnCn0f4xHIlbyyTGzFc/DiZIfOaabIBW9i5CIN0F 4Px+zTaF9p7YKP17cmYX3QMiLFLW2/UZwDswII89RYsB58aqeMXNS4OYHx6CDzfNy+io YN+c8zGnB1RlGqiBE/1XatQ/tfnfYX4JWXJFdRuZa2DyfSCmotdVQ7hCvQARufg7BNZz XvJHdT7m2LgQ+I+i+F5nYm9HLgN+GhKF1PoI8NIzyzkzcqpvHRzD+Ph7AhC6yMpxzjw4 D2eAIhbRNflfo6wazpNAKFfKSS3PY+YKlAg5Ymo9AWNTinXNkpRcA+8hnwj62ciLgAT/ O9bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=I8f0Zmr4UrdCFsNbGBQlMKBjWgYpL407AnnumPzaP8I=; b=XCpCleASJ71xMRrFgxNMU0KC57+6nYRH9GGxUSoqCYX07+cMBOKhPVUmJeT11ztTlW GW9H2rslbXN9xfBND74vyJYuK8wmOEu7XpTpOiesPVfQI9OhCPXHsWrEGz7jiyNeS8Ck Rgjt8e3AlTZynuvHWqWvS86Mwd+Z9T0zPVPh5MMj6282LAYoyOArg/9DOVg1TO8TH5tH QjKQJtXU+y/8eTbcGbypmKzK2r/3oO6pVUbo06v4s+fc9F2GYQAza9UZaH0I9dx1QfVZ kDJkN0MvrYT9scTwz0M79gj/qu20pEug/7lFompszr0SzMHarVjgSCtuCLkpzEqM6XHi OjjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d5si13034088edm.342.2022.02.21.22.28.27; Mon, 21 Feb 2022 22:28:27 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 86E6B68A628; Tue, 22 Feb 2022 08:28:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1673468A2BF for ; Tue, 22 Feb 2022 08:28:06 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 559A524017C for ; Tue, 22 Feb 2022 07:28:05 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id FOjP6G5lCidf for ; Tue, 22 Feb 2022 07:28:03 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (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 "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id C74B2240175 for ; Tue, 22 Feb 2022 07:28:03 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id E66AE3A0406; Tue, 22 Feb 2022 07:28:01 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Feb 2022 07:27:56 +0100 Message-Id: <20220222062757.20908-1-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: iq8TeL96aNhQ 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 + * 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. + * av_bsf_receive_packet() will then return trailing packets, if any are + * produced by the filter. + * + * Finally, free the filter context with av_bsf_free(). * @{ */