| 307 | OPT_MATCH_PER_STREAM_GROUP(dbl, double, OPT_TYPE_DOUBLE, dbl); |
| 308 | |
| 309 | int view_specifier_parse(const char **pspec, ViewSpecifier *vs) |
| 310 | { |
| 311 | const char *spec = *pspec; |
| 312 | char *endptr; |
| 313 | |
| 314 | vs->type = VIEW_SPECIFIER_TYPE_NONE; |
| 315 | |
| 316 | if (!strncmp(spec, "view:", 5)) { |
| 317 | spec += 5; |
| 318 | |
| 319 | if (!strncmp(spec, "all", 3)) { |
| 320 | spec += 3; |
| 321 | vs->type = VIEW_SPECIFIER_TYPE_ALL; |
| 322 | } else { |
| 323 | vs->type = VIEW_SPECIFIER_TYPE_ID; |
| 324 | vs->val = strtoul(spec, &endptr, 0); |
| 325 | if (endptr == spec) { |
| 326 | av_log(NULL, AV_LOG_ERROR, "Invalid view ID: %s\n", spec); |
| 327 | return AVERROR(EINVAL); |
| 328 | } |
| 329 | spec = endptr; |
| 330 | } |
| 331 | } else if (!strncmp(spec, "vidx:", 5)) { |
| 332 | spec += 5; |
| 333 | vs->type = VIEW_SPECIFIER_TYPE_IDX; |
| 334 | vs->val = strtoul(spec, &endptr, 0); |
| 335 | if (endptr == spec) { |
| 336 | av_log(NULL, AV_LOG_ERROR, "Invalid view index: %s\n", spec); |
| 337 | return AVERROR(EINVAL); |
| 338 | } |
| 339 | spec = endptr; |
| 340 | } else if (!strncmp(spec, "vpos:", 5)) { |
| 341 | spec += 5; |
| 342 | vs->type = VIEW_SPECIFIER_TYPE_POS; |
| 343 | |
| 344 | if (!strncmp(spec, "left", 4) && !cmdutils_isalnum(spec[4])) { |
| 345 | spec += 4; |
| 346 | vs->val = AV_STEREO3D_VIEW_LEFT; |
| 347 | } else if (!strncmp(spec, "right", 5) && !cmdutils_isalnum(spec[5])) { |
| 348 | spec += 5; |
| 349 | vs->val = AV_STEREO3D_VIEW_RIGHT; |
| 350 | } else { |
| 351 | av_log(NULL, AV_LOG_ERROR, "Invalid view position: %s\n", spec); |
| 352 | return AVERROR(EINVAL); |
| 353 | } |
| 354 | } else |
| 355 | return 0; |
| 356 | |
| 357 | *pspec = spec; |
| 358 | |
| 359 | return 0; |
| 360 | } |
| 361 | |
| 362 | int parse_and_set_vsync(const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx, int is_global) |
| 363 | { |
no test coverage detected