]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/libndi_newtek_dec: add extra_ips option to libndi_newtek allowing use remote...
authorAnton Platov <anton@platov.net>
Mon, 29 Oct 2018 12:57:31 +0000 (15:57 +0300)
committerMarton Balint <cus@passwd.hu>
Thu, 1 Nov 2018 17:46:05 +0000 (18:46 +0100)
Signed-off-by: Anton Platov <anton@platov.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
doc/indevs.texi
libavdevice/libndi_newtek_dec.c
libavdevice/version.h

index 9a9cb697d35f8a5c0394946a7a8e15e55745bd6d..e1301ccf9743b8a11a94a416e2c673550d43d672 100644 (file)
@@ -1078,6 +1078,10 @@ Defaults to @option{0.5}.
 When this flag is @option{false}, all video that you receive will be progressive.
 Defaults to @option{true}.
 
+@item extra_ips
+If is set to list of comma separated ip addresses, scan for sources not only
+using mDNS but also use unicast ip addresses specified by this list.
+
 @end table
 
 @subsection Examples
@@ -1090,12 +1094,25 @@ List input devices:
 ffmpeg -f libndi_newtek -find_sources 1 -i dummy
 @end example
 
+@item
+List local and remote input devices:
+@example
+ffmpeg -f libndi_newtek -extra_ips "192.168.10.10" -find_sources 1 -i dummy
+@end example
+
 @item
 Restream to NDI:
 @example
 ffmpeg -f libndi_newtek -i "DEV-5.INTERNAL.M1STEREO.TV (NDI_SOURCE_NAME_1)" -f libndi_newtek -y NDI_SOURCE_NAME_2
 @end example
 
+@item
+Restream remote NDI to local NDI:
+@example
+ffmpeg -f libndi_newtek -extra_ips "192.168.10.10" -i "DEV-5.REMOTE.M1STEREO.TV (NDI_SOURCE_NAME_1)" -f libndi_newtek -y NDI_SOURCE_NAME_2
+@end example
+
+
 @end itemize
 
 @section openal
index 4fb719770e57c8cbc0dcdf29e563d85974c93e41..d2d5648c4bbacc54238a9e681efa4df8516aaa4f 100644 (file)
@@ -33,6 +33,7 @@ struct NDIContext {
     int find_sources;
     int64_t wait_sources;
     int allow_video_fields;
+    char *extra_ips;
 
     /* Runtime */
     NDIlib_recv_create_t *recv;
@@ -99,7 +100,7 @@ static int ndi_find_sources(AVFormatContext *avctx, const char *name, NDIlib_sou
     struct NDIContext *ctx = avctx->priv_data;
     const NDIlib_source_t *ndi_srcs = NULL;
     const NDIlib_find_create_t find_create_desc = { .show_local_sources = true,
-        .p_groups = NULL, .p_extra_ips = NULL };
+        .p_groups = NULL, .p_extra_ips = ctx->extra_ips };
 
     if (!ctx->ndi_find)
         ctx->ndi_find = NDIlib_find_create2(&find_create_desc);
@@ -317,6 +318,7 @@ static const AVOption options[] = {
     { "find_sources", "Find available sources"  , OFFSET(find_sources), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, DEC },
     { "wait_sources", "Time to wait until the number of online sources have changed"  , OFFSET(wait_sources), AV_OPT_TYPE_DURATION, { .i64 = 1000000 }, 100000, 20000000, DEC },
     { "allow_video_fields", "When this flag is FALSE, all video that you receive will be progressive"  , OFFSET(allow_video_fields), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, DEC },
+    { "extra_ips", "List of comma separated ip addresses to scan for remote sources",       OFFSET(extra_ips), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC },
     { NULL },
 };
 
index c35c98aedbf7cc57b70f16fbfcf2dadfc8459ca1..0fe2e6c3e1e418e0d7b446d2d323fb559ff0211d 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVDEVICE_VERSION_MAJOR  58
 #define LIBAVDEVICE_VERSION_MINOR   4
-#define LIBAVDEVICE_VERSION_MICRO 106
+#define LIBAVDEVICE_VERSION_MICRO 107
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
                                                LIBAVDEVICE_VERSION_MINOR, \