aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-03-29 08:50:26 +0100
committerAnton Khirnov <anton@khirnov.net>2024-08-27 16:53:16 +0200
commitefe38286d10276ba2f316e10a9a04e062be651fc (patch)
tree7eb82f629401dc26f99b4d72668f59c9f67aa4e1 /libavutil/opt.h
parent7e4784e40c47206c396a320d0270e50d6bb8abb1 (diff)
downloadffmpeg-efe38286d10276ba2f316e10a9a04e062be651fc.tar.gz
lavu/opt: document underlying C types for enum AVOptionType
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h78
1 files changed, 75 insertions, 3 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 07e27a9208..23bc495158 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -240,26 +240,98 @@
* before the file is actually opened.
*/
+/**
+ * An option type determines:
+ * - for native access, the underlying C type of the field that an AVOption
+ * refers to;
+ * - for foreign access, the semantics of accessing the option through this API,
+ * e.g. which av_opt_get_*() and av_opt_set_*() functions can be called, or
+ * what format will av_opt_get()/av_opt_set() expect/produce.
+ */
enum AVOptionType{
+ /**
+ * Underlying C type is unsigned int.
+ */
AV_OPT_TYPE_FLAGS = 1,
+ /**
+ * Underlying C type is int.
+ */
AV_OPT_TYPE_INT,
+ /**
+ * Underlying C type is int64_t.
+ */
AV_OPT_TYPE_INT64,
+ /**
+ * Underlying C type is double.
+ */
AV_OPT_TYPE_DOUBLE,
+ /**
+ * Underlying C type is float.
+ */
AV_OPT_TYPE_FLOAT,
+ /**
+ * Underlying C type is a uint8_t* that is either NULL or points to a C
+ * string allocated with the av_malloc() family of functions.
+ */
AV_OPT_TYPE_STRING,
+ /**
+ * Underlying C type is AVRational.
+ */
AV_OPT_TYPE_RATIONAL,
- AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length
+ /**
+ * Underlying C type is a uint8_t* that is either NULL or points to an array
+ * allocated with the av_malloc() family of functions. The pointer is
+ * immediately followed by an int containing the array length in bytes.
+ */
+ AV_OPT_TYPE_BINARY,
+ /**
+ * Underlying C type is AVDictionary*.
+ */
AV_OPT_TYPE_DICT,
+ /**
+ * Underlying C type is uint64_t.
+ */
AV_OPT_TYPE_UINT64,
+ /**
+ * Special option type for declaring named constants. Does not correspond to
+ * an actual field in the object, offset must be 0.
+ */
AV_OPT_TYPE_CONST,
- AV_OPT_TYPE_IMAGE_SIZE, ///< offset must point to two consecutive ints
+ /**
+ * Underlying C type is two consecutive integers.
+ */
+ AV_OPT_TYPE_IMAGE_SIZE,
+ /**
+ * Underlying C type is enum AVPixelFormat.
+ */
AV_OPT_TYPE_PIXEL_FMT,
+ /**
+ * Underlying C type is enum AVSampleFormat.
+ */
AV_OPT_TYPE_SAMPLE_FMT,
- AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational
+ /**
+ * Underlying C type is AVRational.
+ */
+ AV_OPT_TYPE_VIDEO_RATE,
+ /**
+ * Underlying C type is int64_t.
+ */
AV_OPT_TYPE_DURATION,
+ /**
+ * Underlying C type is uint8_t[4].
+ */
AV_OPT_TYPE_COLOR,
+ /**
+ * Underlying C type is int.
+ */
AV_OPT_TYPE_BOOL,
+ /**
+ * Underlying C type is AVChannelLayout.
+ */
AV_OPT_TYPE_CHLAYOUT,
+ /**
+ * Underlying C type is unsigned int.
+ */
AV_OPT_TYPE_UINT,
/**