This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l2-ctl: add --disable-v4l2-ctl-stream-to configure option
Author:  Hans Verkuil <[email protected]>
Date:    Mon Apr 10 10:35:15 2017 +0200

The --stream-to and --stream-to-host options allow the user to
save the video to a file or stream it to a remote host. There are
situations where this is not something you want to support.

Add a new --disable-v4l2-ctl-stream-to configure option that disables
that --stream-to and --stream-to-host options. You can still test
streaming, just not save the video anywhere.

Signed-off-by: Hans Verkuil <[email protected]>

 configure.ac                          | 10 ++++++++++
 utils/v4l2-ctl/Makefile.am            |  4 ++++
 utils/v4l2-ctl/v4l2-ctl-streaming.cpp |  7 ++++++-
 utils/v4l2-ctl/v4l2-ctl.cpp           |  2 ++
 4 files changed, 22 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=8356ccd427061e09e49d24bdcf74fa9c9b43080c
diff --git a/configure.ac b/configure.ac
index ae58da377319..dd29eda02283 100644
--- a/configure.ac
+++ b/configure.ac
@@ -404,6 +404,14 @@ AC_ARG_ENABLE(v4l2-ctl-libv4l,
    esac]
 )
 
+AC_ARG_ENABLE(v4l2-ctl-stream-to,
+  AS_HELP_STRING([--disable-v4l2-ctl-stream-to], [disable use of --stream-to 
in v4l2-ctl]),
+  [case "${enableval}" in
+     yes | no ) ;;
+     *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2-ctl-stream-to) 
;;
+   esac]
+)
+
 AC_ARG_ENABLE(qv4l2,
   AS_HELP_STRING([--disable-qv4l2], [disable qv4l2 compilation]),
   [case "${enableval}" in
@@ -436,6 +444,7 @@ AM_CONDITIONAL([WITH_V4L_WRAPPERS], [test x$enable_libv4l 
!= xno -a x$enable_sha
 AM_CONDITIONAL([WITH_QTGL],        [test x${qt_pkgconfig_gl} = xtrue])
 AM_CONDITIONAL([WITH_GCONV],        [test x${enable_gconv} = xyes])
 AM_CONDITIONAL([WITH_V4L2_CTL_LIBV4L], [test x${enable_v4l2_ctl_libv4l} != 
xno])
+AM_CONDITIONAL([WITH_V4L2_CTL_STREAM_TO], [test x${enable_v4l2_ctl_stream_to} 
!= xno])
 AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test 
x${enable_v4l2_compliance_libv4l} != xno])
 
 # append -static to libtool compile and link command to enforce static libs
@@ -463,6 +472,7 @@ AM_COND_IF([WITH_V4L_PLUGINS], [USE_V4L_PLUGINS="yes"], 
[USE_V4L_PLUGINS="no"])
 AM_COND_IF([WITH_V4L_WRAPPERS], [USE_V4L_WRAPPERS="yes"], 
[USE_V4L_WRAPPERS="no"])
 AM_COND_IF([WITH_GCONV], [USE_GCONV="yes"], [USE_GCONV="no"])
 AM_COND_IF([WITH_V4L2_CTL_LIBV4L], [USE_V4L2_CTL="yes"], [USE_V4L2_CTL="no"])
+AM_COND_IF([WITH_V4L2_CTL_STREAM_TO], [USE_V4L2_CTL="yes"], 
[USE_V4L2_CTL="no"])
 AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE="yes"], 
[USE_V4L2_COMPLIANCE="no"])
 AS_IF([test "x$alsa_pkgconfig" = "xtrue"], [USE_ALSA="yes"], [USE_ALSA="no"])
 
diff --git a/utils/v4l2-ctl/Makefile.am b/utils/v4l2-ctl/Makefile.am
index 825e53f77a7f..cc193d0873e3 100644
--- a/utils/v4l2-ctl/Makefile.am
+++ b/utils/v4l2-ctl/Makefile.am
@@ -15,4 +15,8 @@ else
 DEFS += -DNO_LIBV4L2
 endif
 
+if !WITH_V4L2_CTL_STREAM_TO
+DEFS += -DNO_STREAM_TO
+endif
+
 EXTRA_DIST = Android.mk v4l2-ctl.1
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp 
b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index b898bcb97bf6..1d6ac52c6371 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -88,10 +88,12 @@ void streaming_usage(void)
               "                     sleep for 1 second every <count> buffers. 
If <count> is 0,\n"
               "                     then sleep forever right after streaming 
starts. The default\n"
               "                     is -1 (never sleep).\n"
+#ifndef NO_STREAM_TO
               "  --stream-to=<file> stream to this file. The default is to 
discard the\n"
               "                     data. If <file> is '-', then the data is 
written to stdout\n"
               "                     and the --silent option is turned on 
automatically.\n"
               "  --stream-to-host=<hostname[:port]> stream to this host. The 
default port is %d.\n"
+#endif
               "  --stream-poll      use non-blocking mode and select() to 
stream.\n"
               "  --stream-mmap=<count>\n"
               "                     capture video using mmap() 
[VIDIOC_(D)QBUF]\n"
@@ -159,7 +161,10 @@ void streaming_usage(void)
               "                     list all SDR RX buffers 
[VIDIOC_QUERYBUF]\n"
               "  --list-buffers-sdr-out\n"
               "                     list all SDR TX buffers 
[VIDIOC_QUERYBUF]\n",
-               V4L_STREAM_PORT, V4L_STREAM_PORT);
+#ifndef NO_STREAM_TO
+               V4L_STREAM_PORT,
+#endif
+               V4L_STREAM_PORT);
 }
 
 static void setTimeStamp(struct v4l2_buffer &buf)
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 7cfaf6491277..12854699d5e2 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -219,8 +219,10 @@ static struct option long_options[] = {
        {"stream-sleep", required_argument, 0, OptStreamSleep},
        {"stream-poll", no_argument, 0, OptStreamPoll},
        {"stream-no-query", no_argument, 0, OptStreamNoQuery},
+#ifndef NO_STREAM_TO
        {"stream-to", required_argument, 0, OptStreamTo},
        {"stream-to-host", required_argument, 0, OptStreamToHost},
+#endif
        {"stream-mmap", optional_argument, 0, OptStreamMmap},
        {"stream-user", optional_argument, 0, OptStreamUser},
        {"stream-dmabuf", no_argument, 0, OptStreamDmaBuf},

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to