[vlc-commits] jack: add new ports and channels safe variables

Alexandre Janniaux git at videolan.org
Thu Nov 21 15:36:22 CET 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Oct 22 00:15:10 2019 +0200| [ab288d0e0199a385acc563f4a0a5a5655d09e710] | committer: Thomas Guillem

jack: add new ports and channels safe variables

Those variables are the one from the MRL given to jack access. It adds
documentation for these variables and allow them to be defined outside
of the modules. It will also allow to correctly implement the
enumeration callbacks for the ports variables, to ease the user
experience when selecting the input.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab288d0e0199a385acc563f4a0a5a5655d09e710
---

 modules/access/jack.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/modules/access/jack.c b/modules/access/jack.c
index d77178c490..735d8193d5 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -61,6 +61,13 @@ static void Close( vlc_object_t * );
 #define AUTO_CONNECT_TEXT N_( "Auto connection" )
 #define AUTO_CONNECT_LONGTEXT N_( \
     "Automatically connect VLC input ports to available output ports." )
+#define CHANNELS_TEXT N_( "Channels" )
+#define CHANNELS_LONGTEXT N_( \
+    "Number of input channels VLC should expose to the jack server." )
+#define PORTS_TEXT N_( "Ports" )
+#define PORTS_LONGTEXT N_( \
+    "Output ports in jack that VLC should read from, URI-encoded and " \
+    "separated with a comma." )
 
 vlc_module_begin ()
      set_description( N_("JACK audio input") )
@@ -74,6 +81,16 @@ vlc_module_begin ()
      add_bool( "jack-input-auto-connect", false,
          AUTO_CONNECT_TEXT, AUTO_CONNECT_LONGTEXT, false )
 
+     /* Channels, potentially from MRL. */
+     add_integer( "jack-input-channels", 0,
+         CHANNELS_TEXT, CHANNELS_LONGTEXT, false )
+        change_safe()
+
+    /* Ports, potentially from MRL. */
+     add_string( "jack-input-ports", NULL,
+         PORTS_TEXT, PORTS_LONGTEXT, false )
+        change_safe()
+
      add_shortcut( "jack" )
      set_callbacks( Open, Close )
 vlc_module_end ()



More information about the vlc-commits mailing list