| 1366 | } |
| 1367 | |
| 1368 | static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts) |
| 1369 | { |
| 1370 | int ret; |
| 1371 | AVDeviceInfoList *device_list = NULL; |
| 1372 | |
| 1373 | if (!fmt || !fmt->priv_class || !AV_IS_INPUT_DEVICE(fmt->priv_class->category)) |
| 1374 | return AVERROR(EINVAL); |
| 1375 | |
| 1376 | printf("Auto-detected sources for %s:\n", fmt->name); |
| 1377 | if ((ret = avdevice_list_input_sources(fmt, NULL, opts, &device_list)) < 0) { |
| 1378 | printf("Cannot list sources: %s\n", av_err2str(ret)); |
| 1379 | goto fail; |
| 1380 | } |
| 1381 | |
| 1382 | print_device_list(device_list); |
| 1383 | |
| 1384 | fail: |
| 1385 | avdevice_free_list_devices(&device_list); |
| 1386 | return ret; |
| 1387 | } |
| 1388 | |
| 1389 | static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts) |
| 1390 | { |
no test coverage detected