From ff8fdb5af5f2761443498caa338700e64b4e781b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 30 Nov 2013 13:06:08 -0500 Subject: [PATCH] change UUID implementation to use integers and serial counters; remove -L option from jack_lsp because "total latency" is deprecated --- lsp.c | 21 ++++----------------- property.c | 6 +++--- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/lsp.c b/lsp.c index 0812ecc..23016df 100644 --- a/lsp.c +++ b/lsp.c @@ -8,6 +8,7 @@ #include #include +#include char * my_name; @@ -47,7 +48,6 @@ show_usage (void) fprintf (stderr, " -A, --aliases List aliases for each port\n"); fprintf (stderr, " -c, --connections List connections to/from each port\n"); fprintf (stderr, " -l, --latency Display per-port latency in frames at each port\n"); - fprintf (stderr, " -L, --latency Display total latency in frames at each port\n"); fprintf (stderr, " -p, --properties Display port properties. Output may include:\n" " input|output, can-monitor, physical, terminal\n\n"); fprintf (stderr, " -t, --type Display port type\n"); @@ -70,7 +70,6 @@ main (int argc, char *argv[]) int show_aliases = 0; int show_con = 0; int show_port_latency = 0; - int show_total_latency = 0; int show_properties = 0; int show_type = 0; int show_uuid = 0; @@ -86,7 +85,6 @@ main (int argc, char *argv[]) { "aliases", 0, 0, 'A' }, { "connections", 0, 0, 'c' }, { "port-latency", 0, 0, 'l' }, - { "total-latency", 0, 0, 'L' }, { "properties", 0, 0, 'p' }, { "type", 0, 0, 't' }, { "uuid", 0, 0, 'u' }, @@ -121,9 +119,6 @@ main (int argc, char *argv[]) case 'l': show_port_latency = 1; break; - case 'L': - show_total_latency = 1; - break; case 'p': show_properties = 1; break; @@ -187,9 +182,8 @@ main (int argc, char *argv[]) if (show_port_uuid) { char buf[64]; - jack_uuid_t uuid; - jack_port_uuid (port, uuid); - uuid_unparse (uuid, buf); + jack_uuid_t uuid = jack_port_uuid (port); + jack_uuid_unparse (uuid, buf); printf (" uuid: %s\n", buf); } @@ -220,8 +214,6 @@ main (int argc, char *argv[]) if (show_port_latency) { if (port) { jack_latency_range_t range; - printf (" port latency = %" PRIu32 " frames\n", - jack_port_get_latency (port)); jack_port_get_latency_range (port, JackPlaybackLatency, &range); printf (" port playback latency = [ %" PRIu32 " %" PRIu32 " ] frames\n", @@ -232,12 +224,7 @@ main (int argc, char *argv[]) range.min, range.max); } } - if (show_total_latency) { - if (port) { - printf (" total latency = %" PRIu32 " frames\n", - jack_port_get_total_latency (client, port)); - } - } + if (show_properties) { if (port) { int flags = jack_port_flags (port); diff --git a/property.c b/property.c index 8982dae..82bb0ad 100644 --- a/property.c +++ b/property.c @@ -45,7 +45,7 @@ get_subject (jack_client_t* client, char* argv[], int* optind) return -1; } - if (jack_uuid_parse (ustr, uuid)) { + if (jack_uuid_parse (ustr, &uuid)) { fprintf (stderr, "cannot parse client UUID as UUID\n"); return -1; } @@ -62,13 +62,13 @@ get_subject (jack_client_t* client, char* argv[], int* optind) return -1; } - jack_port_uuid (port, uuid); + uuid = jack_port_uuid (port); subject = pstr; } else { char* str = argv[(*optind)++]; - if (jack_uuid_parse (str, uuid)) { + if (jack_uuid_parse (str, &uuid)) { fprintf (stderr, "cannot parse subject as UUID\n"); return -1; }