History

lavu/opt: document underlying C types for enum AVOptionType

Anton Khirnov committed 2 years ago

Commit efe38281 parent 7e4784e1 file · +75 −3Browse files

Unified · Split

libavutil/opt.h+75−3
@@ -240,26 +240,98 @@ · 239 unmodified lines
240240 * before the file is actually opened.
241241 */
242242
243+/**
244+ * An option type determines:
245+ * - for native access, the underlying C type of the field that an AVOption
246+ * refers to;
247+ * - for foreign access, the semantics of accessing the option through this API,
248+ * e.g. which av_opt_get_*() and av_opt_set_*() functions can be called, or
249+ * what format will av_opt_get()/av_opt_set() expect/produce.
250+ */
243251 enum AVOptionType{
252+ /**
253+ * Underlying C type is unsigned int.
254+ */
244255 AV_OPT_TYPE_FLAGS = 1,
256+ /**
257+ * Underlying C type is int.
258+ */
245259 AV_OPT_TYPE_INT,
260+ /**
261+ * Underlying C type is int64_t.
262+ */
246263 AV_OPT_TYPE_INT64,
264+ /**
265+ * Underlying C type is double.
266+ */
247267 AV_OPT_TYPE_DOUBLE,
268+ /**
269+ * Underlying C type is float.
270+ */
248271 AV_OPT_TYPE_FLOAT,
272+ /**
273+ * Underlying C type is a uint8_t* that is either NULL or points to a C
274+ * string allocated with the av_malloc() family of functions.
275+ */
249276 AV_OPT_TYPE_STRING,
277+ /**
278+ * Underlying C type is AVRational.
279+ */
250280 AV_OPT_TYPE_RATIONAL,
251− AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length
281+ /**
282+ * Underlying C type is a uint8_t* that is either NULL or points to an array
283+ * allocated with the av_malloc() family of functions. The pointer is
284+ * immediately followed by an int containing the array length in bytes.
285+ */
286+ AV_OPT_TYPE_BINARY,
287+ /**
288+ * Underlying C type is AVDictionary*.
289+ */
252290 AV_OPT_TYPE_DICT,
291+ /**
292+ * Underlying C type is uint64_t.
293+ */
253294 AV_OPT_TYPE_UINT64,
295+ /**
296+ * Special option type for declaring named constants. Does not correspond to
297+ * an actual field in the object, offset must be 0.
298+ */
254299 AV_OPT_TYPE_CONST,
255− AV_OPT_TYPE_IMAGE_SIZE, ///< offset must point to two consecutive ints
300+ /**
301+ * Underlying C type is two consecutive integers.
302+ */
303+ AV_OPT_TYPE_IMAGE_SIZE,
304+ /**
305+ * Underlying C type is enum AVPixelFormat.
306+ */
256307 AV_OPT_TYPE_PIXEL_FMT,
308+ /**
309+ * Underlying C type is enum AVSampleFormat.
310+ */
257311 AV_OPT_TYPE_SAMPLE_FMT,
258− AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational
312+ /**
313+ * Underlying C type is AVRational.
314+ */
315+ AV_OPT_TYPE_VIDEO_RATE,
316+ /**
317+ * Underlying C type is int64_t.
318+ */
259319 AV_OPT_TYPE_DURATION,
320+ /**
321+ * Underlying C type is uint8_t[4].
322+ */
260323 AV_OPT_TYPE_COLOR,
324+ /**
325+ * Underlying C type is int.
326+ */
261327 AV_OPT_TYPE_BOOL,
328+ /**
329+ * Underlying C type is AVChannelLayout.
330+ */
262331 AV_OPT_TYPE_CHLAYOUT,
332+ /**
333+ * Underlying C type is unsigned int.
334+ */
263335 AV_OPT_TYPE_UINT,
264336
265337 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t