# HG changeset patch # User reimar # Date 1370281084 0 # Node ID fe3993b4209142e9e2bbf1651d306df664e6f71c # Parent a86d2ecfc4ee8a6680f5649dd81ee8a22bf9ba09 Add (no)connect option to ao_jack. Patch by Markus Appel [masolomaster3000 googlemail com]. diff -r a86d2ecfc4ee -r fe3993b42091 DOCS/man/de/mplayer.1 --- a/DOCS/man/de/mplayer.1 Mon Jun 03 11:20:28 2013 +0000 +++ b/DOCS/man/de/mplayer.1 Mon Jun 03 17:38:04 2013 +0000 @@ -3027,6 +3027,11 @@ Audioausgabe über JACK (Jack Audio Connection Kit) .PD 0 .RSs +.IPs (no)connect +Erzeugt automatisch Verbindungen zu den Ausgabeports +(Standard: eingeschaltet). +Falls eingeschaltet wird die Anzahl der Audiokanäle durch die Anzahl der +gefundenen Ausgabeports nach oben begrenzt. .IPs port= Verbindet zu den Ports mit dem angegebenen Namen (Standard: physikalische Ports). diff -r a86d2ecfc4ee -r fe3993b42091 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Mon Jun 03 11:20:28 2013 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Jun 03 17:38:04 2013 +0000 @@ -3118,6 +3118,10 @@ audio output through JACK (Jack Audio Connection Kit) .PD 0 .RSs +.IPs (no)connect +Automatically create connections to output ports (default: enabled). +When enabled, the maximum number of output channels will be limited to +the number of available output ports. .IPs port= Connects to the ports with the given name (default: physical ports). .IPs name= diff -r a86d2ecfc4ee -r fe3993b42091 libao2/ao_jack.c --- a/libao2/ao_jack.c Mon Jun 03 11:20:28 2013 +0000 +++ b/libao2/ao_jack.c Mon Jun 03 17:38:04 2013 +0000 @@ -192,6 +192,8 @@ "Example: mplayer -ao jack:port=myout\n" " connects MPlayer to the jack ports named myout\n" "\nOptions:\n" + " connect\n" + " Automatically connect to output ports\n" " port=\n" " Connects to the given ports instead of the default physical ones\n" " name=\n" @@ -208,11 +210,13 @@ char *port_name = NULL; char *client_name = NULL; int autostart = 0; + int connect = 1; const opt_t subopts[] = { {"port", OPT_ARG_MSTRZ, &port_name, NULL}, {"name", OPT_ARG_MSTRZ, &client_name, NULL}, {"estimate", OPT_ARG_BOOL, &estimate, NULL}, {"autostart", OPT_ARG_BOOL, &autostart, NULL}, + {"connect", OPT_ARG_BOOL, &connect, NULL}, {NULL} }; jack_options_t open_options = JackUseExactName; @@ -241,7 +245,8 @@ buffer = av_fifo_alloc(BUFFSIZE); jack_set_process_callback(client, outputaudio, 0); - // list matching ports + // list matching ports if connections should be made + if (connect) { if (!port_name) port_flags |= JackPortIsPhysical; matching_ports = jack_get_ports(client, port_name, NULL, port_flags); @@ -252,6 +257,7 @@ goto err_out; } if (channels > i) channels = i; + } num_ports = channels; // create out_* output ports