Unified · Split
| @@ -240,26 +240,98 @@ · 239 unmodified lines | ||
| 240 | 240 | * before the file is actually opened. |
| 241 | 241 | */ |
| 242 | 242 | |
| 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 | + */ | |
| 243 | 251 | enum AVOptionType{ |
| 252 | + /** | |
| 253 | + * Underlying C type is unsigned int. | |
| 254 | + */ | |
| 244 | 255 | AV_OPT_TYPE_FLAGS = 1, |
| 256 | + /** | |
| 257 | + * Underlying C type is int. | |
| 258 | + */ | |
| 245 | 259 | AV_OPT_TYPE_INT, |
| 260 | + /** | |
| 261 | + * Underlying C type is int64_t. | |
| 262 | + */ | |
| 246 | 263 | AV_OPT_TYPE_INT64, |
| 264 | + /** | |
| 265 | + * Underlying C type is double. | |
| 266 | + */ | |
| 247 | 267 | AV_OPT_TYPE_DOUBLE, |
| 268 | + /** | |
| 269 | + * Underlying C type is float. | |
| 270 | + */ | |
| 248 | 271 | 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 | + */ | |
| 249 | 276 | AV_OPT_TYPE_STRING, |
| 277 | + /** | |
| 278 | + * Underlying C type is AVRational. | |
| 279 | + */ | |
| 250 | 280 | 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 | + */ | |
| 252 | 290 | AV_OPT_TYPE_DICT, |
| 291 | + /** | |
| 292 | + * Underlying C type is uint64_t. | |
| 293 | + */ | |
| 253 | 294 | 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 | + */ | |
| 254 | 299 | 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 | + */ | |
| 256 | 307 | AV_OPT_TYPE_PIXEL_FMT, |
| 308 | + /** | |
| 309 | + * Underlying C type is enum AVSampleFormat. | |
| 310 | + */ | |
| 257 | 311 | 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 | + */ | |
| 259 | 319 | AV_OPT_TYPE_DURATION, |
| 320 | + /** | |
| 321 | + * Underlying C type is uint8_t[4]. | |
| 322 | + */ | |
| 260 | 323 | AV_OPT_TYPE_COLOR, |
| 324 | + /** | |
| 325 | + * Underlying C type is int. | |
| 326 | + */ | |
| 261 | 327 | AV_OPT_TYPE_BOOL, |
| 328 | + /** | |
| 329 | + * Underlying C type is AVChannelLayout. | |
| 330 | + */ | |
| 262 | 331 | AV_OPT_TYPE_CHLAYOUT, |
| 332 | + /** | |
| 333 | + * Underlying C type is unsigned int. | |
| 334 | + */ | |
| 263 | 335 | AV_OPT_TYPE_UINT, |
| 264 | 336 | |
| 265 | 337 | /** |