This is a wrapper around the ff_decklink_list_devices() which dumps the output to av_log() and exits (for backward compatibility with the "-list_devices" argument). */
| 579 | output to av_log() and exits (for backward compatibility with the |
| 580 | "-list_devices" argument). */ |
| 581 | void ff_decklink_list_devices_legacy(AVFormatContext *avctx, |
| 582 | int show_inputs, int show_outputs) |
| 583 | { |
| 584 | struct AVDeviceInfoList *device_list = NULL; |
| 585 | int ret; |
| 586 | |
| 587 | device_list = (struct AVDeviceInfoList *) av_mallocz(sizeof(AVDeviceInfoList)); |
| 588 | if (!device_list) |
| 589 | return; |
| 590 | |
| 591 | ret = ff_decklink_list_devices(avctx, device_list, show_inputs, show_outputs); |
| 592 | if (ret == 0) { |
| 593 | av_log(avctx, AV_LOG_INFO, "Blackmagic DeckLink %s devices:\n", |
| 594 | show_inputs ? "input" : "output"); |
| 595 | for (int i = 0; i < device_list->nb_devices; i++) { |
| 596 | av_log(avctx, AV_LOG_INFO, "\t'%s'\n", device_list->devices[i]->device_description); |
| 597 | } |
| 598 | } |
| 599 | avdevice_free_list_devices(&device_list); |
| 600 | } |
| 601 | |
| 602 | int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction) |
| 603 | { |
no test coverage detected