History

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>.

Devin Heitmueller committed 9 years ago

Commit 278588c1 parent ff6de6b8 files · +104 −10Browse files

Showing the changes to libavdevice/decklink_dec.cpp (1 of 8 files). Show all

Unified · Split

libavdevice/decklink_dec.cpp+7−1
@@ -39,6 +39,7 @@ extern "C" { · 38 unmodified lines
39#include "libavutil/time.h"39#include "libavutil/time.h"
40#include "libavutil/mathematics.h"40#include "libavutil/mathematics.h"
41#include "libavutil/reverse.h"41#include "libavutil/reverse.h"
42#include "avdevice.h"
42#if CONFIG_LIBZVBI43#if CONFIG_LIBZVBI
43#include <libzvbi.h>44#include <libzvbi.h>
44#endif45#endif
@@ -868,7 +869,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 823 unmodified lines
868 869
869 /* List available devices. */870 /* List available devices. */
870 if (ctx->list_devices) {871 if (ctx->list_devices) {
871 ff_decklink_list_devices(avctx);872 ff_decklink_list_devices_legacy(avctx, 1, 0);
872 return AVERROR_EXIT;873 return AVERROR_EXIT;
873 }874 }
874 875
@@ -1063,4 +1064,9 @@ int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt) · 188 unmodified lines
1063 return 0;1064 return 0;
1064}1065}
1065 1066
1067int ff_decklink_list_input_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list)
1068{
1069 return ff_decklink_list_devices(avctx, device_list, 1, 0);
1070}
1071
1066} /* extern "C" */1072} /* extern "C" */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t