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