summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-01-04 11:51:11 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-01-04 11:51:11 +0000
commit4b5c66af76e74cfb75a0faa3c51b09bc1da1c4b4 (patch)
tree20cc271b67eb47e45470ef2672cfa28fbb0b52ad /libao2
parenta4a6c32f2d658a02308cc79d63c17ac5eef54672 (diff)
downloadmpv-4b5c66af76e74cfb75a0faa3c51b09bc1da1c4b4.tar.bz2
mpv-4b5c66af76e74cfb75a0faa3c51b09bc1da1c4b4.tar.xz
Replace deprecated jack_client_new with jack_client_open.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28241 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_jack.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libao2/ao_jack.c b/libao2/ao_jack.c
index e4ac6910b2..d7f2092a43 100644
--- a/libao2/ao_jack.c
+++ b/libao2/ao_jack.c
@@ -227,19 +227,25 @@ static void print_help (void)
" name=<client name>\n"
" Client name to pass to JACK\n"
" estimate\n"
- " Estimates the amount of data in buffers (experimental)\n");
+ " Estimates the amount of data in buffers (experimental)\n"
+ " autostart\n"
+ " Automatically start JACK server if necessary\n"
+ );
}
static int init(int rate, int channels, int format, int flags) {
const char **matching_ports = NULL;
char *port_name = NULL;
char *client_name = NULL;
+ int autostart = 0;
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},
{NULL}
};
+ jack_options_t open_options = JackUseExactName;
int port_flags = JackPortIsInput;
int i;
estimate = 1;
@@ -255,7 +261,9 @@ static int init(int rate, int channels, int format, int flags) {
client_name = malloc(40);
sprintf(client_name, "MPlayer [%d]", getpid());
}
- client = jack_client_new(client_name);
+ if (!autostart)
+ open_options |= JackNoStartServer;
+ client = jack_client_open(client_name, open_options, NULL);
if (!client) {
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n");
goto err_out;