[MPlayer-cvslog] r28241 - in trunk: DOCS/man/en/mplayer.1 libao2/ao_jack.c

reimar subversion at mplayerhq.hu
Sun Jan 4 12:51:11 CET 2009


Author: reimar
Date: Sun Jan  4 12:51:11 2009
New Revision: 28241

Log:
Replace deprecated jack_client_new with jack_client_open.

Modified:
   trunk/libao2/ao_jack.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/libao2/ao_jack.c
==============================================================================
--- trunk/libao2/ao_jack.c	Sun Jan  4 10:49:58 2009	(r28240)
+++ trunk/libao2/ao_jack.c	Sun Jan  4 12:51:11 2009	(r28241)
@@ -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, 
     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;



More information about the MPlayer-cvslog mailing list