summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-09-26 19:24:06 -0300
committerJames Almer <jamrial@gmail.com>2023-10-06 10:04:02 -0300
commite500eb5a95afefb4a012814b7f8af2dd6869a641 (patch)
tree0767ca0601f44a639bdfaffd9e2675e8c33b9b46
parent5432d2aacad5fa7420fe2d9369ed061d521e92d6 (diff)
avcodec/packet: add some documentation for AVPacketSideData
Explaining what or who may use it, and in what scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/packet.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index 96fc0084d6..b19409b719 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -312,6 +312,33 @@ enum AVPacketSideDataType {
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
+/**
+ * This structure stores auxiliary information for decoding, presenting, or
+ * otherwise processing the coded stream. It is typically exported by demuxers
+ * and encoders and can be fed to decoders and muxers either in a per packet
+ * basis, or as global side data (applying to the entire coded stream).
+ *
+ * Global side data is handled as follows:
+ * - During demuxing, it may be exported through
+ * @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
+ * then be passed as input to decoders through the
+ * @ref AVCodecContext.coded_side_data "decoder context's side data", for
+ * initialization.
+ * - For muxing, it can be fed through @ref AVStream.codecpar.side_data
+ * "AVStream's codec parameters", typically the output of encoders through
+ * the @ref AVCodecContext.coded_side_data "encoder context's side data", for
+ * initialization.
+ *
+ * Packet specific side data is handled as follows:
+ * - During demuxing, it may be exported through @ref AVPacket.side_data
+ * "AVPacket's side data", which can then be passed as input to decoders.
+ * - For muxing, it can be fed through @ref AVPacket.side_data "AVPacket's
+ * side data", typically the output of encoders.
+ *
+ * Different modules may accept or export different types of side data
+ * depending on media type and codec. Refer to @ref AVPacketSideDataType for a
+ * list of defined types and where they may be found or used.
+ */
typedef struct AVPacketSideData {
uint8_t *data;
size_t size;