summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-02-21 21:44:38 +0100
committerAnton Khirnov <anton@khirnov.net>2022-03-19 15:59:07 +0100
commit5e7643eff795609bd3878c99277859a56e884135 (patch)
treef86fdd8d61d612d19153ffebff9968e98148c2ed
parent6ccc3989d15ed1ea8f25f3bef062183c5036eb43 (diff)
lavc/bsf: add general documentation
Also, place the BSF api docs in their own doxygen group.
-rw-r--r--libavcodec/bsf.h23
1 files changed, 22 insertions, 1 deletions
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().
* @{
*/