diff options
author | Devin Heitmueller <dheitmueller@ltnglobal.com> | 2017-10-06 08:55:43 -0400 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2017-10-10 20:07:25 +0200 |
commit | 278588cd0bf788df0194f74e62745f68559616f9 (patch) | |
tree | 6b45e4f085055a103d796dbf7dccf938de348579 /libavdevice/decklink_dec.cpp | |
parent | ff6de6b180fd7c931410f81fb404ab3dbf30d40b (diff) | |
download | ffmpeg-278588cd0bf788df0194f74e62745f68559616f9.tar.gz |
libavdevice/decklink: add support for -sources and -sinks arguments
Add support for enumerating the sources/sinks via the ffmpeg
command line options, as opposed to having to create a real pipeline
and use the "-list_devices" option which does exit() after dumping
out the options.
Note that this patch preserves the existing "-list_devices" option,
but now shares common code for the actual enumeration.
Updated to reflect feedback from Marton Balint <cus@passwd.hu>.
Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_dec.cpp')
-rw-r--r-- | libavdevice/decklink_dec.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 6f796e4941..d9ac01ac91 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -39,6 +39,7 @@ extern "C" { #include "libavutil/time.h" #include "libavutil/mathematics.h" #include "libavutil/reverse.h" +#include "avdevice.h" #if CONFIG_LIBZVBI #include <libzvbi.h> #endif @@ -868,7 +869,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) /* List available devices. */ if (ctx->list_devices) { - ff_decklink_list_devices(avctx); + ff_decklink_list_devices_legacy(avctx, 1, 0); return AVERROR_EXIT; } @@ -1063,4 +1064,9 @@ int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt) return 0; } +int ff_decklink_list_input_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list) +{ + return ff_decklink_list_devices(avctx, device_list, 1, 0); +} + } /* extern "C" */ |