mirror of
http://www.pogo.org.uk/~mark/trx.git
synced 2024-11-21 18:05:06 +01:00
Help message
This commit is contained in:
parent
b5ce1fcc9d
commit
44f8e51c10
2
notice.h
2
notice.h
@ -1,6 +1,6 @@
|
|||||||
#ifndef NOTICE_H
|
#ifndef NOTICE_H
|
||||||
#define NOTICE_H
|
#define NOTICE_H
|
||||||
|
|
||||||
#define COPYRIGHT "(C) Copyright 2012 Mark Hills <mark@xwax.org>"
|
#define COPYRIGHT "trx (C) Copyright 2012 Mark Hills <mark@xwax.org>"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
12
rx.c
12
rx.c
@ -105,12 +105,13 @@ static int run_rx(RtpSession *session,
|
|||||||
|
|
||||||
static void usage(FILE *fd)
|
static void usage(FILE *fd)
|
||||||
{
|
{
|
||||||
fprintf(fd, "Usage: rx [<parameters>]\n");
|
fprintf(fd, "Usage: rx [<parameters>]\n"
|
||||||
|
"Real-time audio receiver over IP\n");
|
||||||
|
|
||||||
fprintf(fd, "\nAudio device (ALSA) parameters:\n");
|
fprintf(fd, "\nAudio device (ALSA) parameters:\n");
|
||||||
fprintf(fd, " -d <dev> Device name (default '%s')\n",
|
fprintf(fd, " -d <dev> Device name (default '%s')\n",
|
||||||
DEFAULT_DEVICE);
|
DEFAULT_DEVICE);
|
||||||
fprintf(fd, " -m <ms> Buffer time (milliseconds, default %d)\n",
|
fprintf(fd, " -m <ms> Buffer time (default %d milliseconds)\n",
|
||||||
DEFAULT_BUFFER);
|
DEFAULT_BUFFER);
|
||||||
|
|
||||||
fprintf(fd, "\nNetwork parameters:\n");
|
fprintf(fd, "\nNetwork parameters:\n");
|
||||||
@ -118,11 +119,11 @@ static void usage(FILE *fd)
|
|||||||
DEFAULT_ADDR);
|
DEFAULT_ADDR);
|
||||||
fprintf(fd, " -p <port> UDP port number (default %d)\n",
|
fprintf(fd, " -p <port> UDP port number (default %d)\n",
|
||||||
DEFAULT_PORT);
|
DEFAULT_PORT);
|
||||||
fprintf(fd, " -j <ms> Jitter buffer (milliseconds, default %d)\n",
|
fprintf(fd, " -j <ms> Jitter buffer (default %d milliseconds)\n",
|
||||||
DEFAULT_JITTER);
|
DEFAULT_JITTER);
|
||||||
|
|
||||||
fprintf(fd, "\nEncoding parameters (must match sender):\n");
|
fprintf(fd, "\nEncoding parameters (must match sender):\n");
|
||||||
fprintf(fd, " -r <rate> Sample rate (default %d)\n",
|
fprintf(fd, " -r <rate> Sample rate (default %dHz)\n",
|
||||||
DEFAULT_RATE);
|
DEFAULT_RATE);
|
||||||
fprintf(fd, " -c <n> Number of channels (default %d)\n",
|
fprintf(fd, " -c <n> Number of channels (default %d)\n",
|
||||||
DEFAULT_CHANNELS);
|
DEFAULT_CHANNELS);
|
||||||
@ -148,7 +149,7 @@ int main(int argc, char *argv[])
|
|||||||
channels = DEFAULT_CHANNELS,
|
channels = DEFAULT_CHANNELS,
|
||||||
port = DEFAULT_PORT;
|
port = DEFAULT_PORT;
|
||||||
|
|
||||||
fputs("rx " COPYRIGHT "\n", stderr);
|
fputs(COPYRIGHT "\n", stderr);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int c;
|
int c;
|
||||||
@ -156,7 +157,6 @@ int main(int argc, char *argv[])
|
|||||||
c = getopt(argc, argv, "c:d:h:j:m:p:v:");
|
c = getopt(argc, argv, "c:d:h:j:m:p:v:");
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
channels = atoi(optarg);
|
channels = atoi(optarg);
|
||||||
|
14
tx.c
14
tx.c
@ -92,12 +92,13 @@ static int run_tx(snd_pcm_t *snd,
|
|||||||
|
|
||||||
static void usage(FILE *fd)
|
static void usage(FILE *fd)
|
||||||
{
|
{
|
||||||
fprintf(fd, "Usage: tx [<parameters>]\n");
|
fprintf(fd, "Usage: tx [<parameters>]\n"
|
||||||
|
"Real-time audio transmitter over IP\n");
|
||||||
|
|
||||||
fprintf(fd, "\nAudio device (ALSA) parameters:\n");
|
fprintf(fd, "\nAudio device (ALSA) parameters:\n");
|
||||||
fprintf(fd, " -d <dev> Device name (default '%s')\n",
|
fprintf(fd, " -d <dev> Device name (default '%s')\n",
|
||||||
DEFAULT_DEVICE);
|
DEFAULT_DEVICE);
|
||||||
fprintf(fd, " -m <ms> Buffer time (milliseconds, default %d)\n",
|
fprintf(fd, " -m <ms> Buffer time (default %d milliseconds)\n",
|
||||||
DEFAULT_BUFFER);
|
DEFAULT_BUFFER);
|
||||||
|
|
||||||
fprintf(fd, "\nNetwork parameters:\n");
|
fprintf(fd, "\nNetwork parameters:\n");
|
||||||
@ -107,11 +108,11 @@ static void usage(FILE *fd)
|
|||||||
DEFAULT_PORT);
|
DEFAULT_PORT);
|
||||||
|
|
||||||
fprintf(fd, "\nEncoding parameters:\n");
|
fprintf(fd, "\nEncoding parameters:\n");
|
||||||
fprintf(fd, " -r <rate> Sample rate (default %d)\n",
|
fprintf(fd, " -r <rate> Sample rate (default %dHz)\n",
|
||||||
DEFAULT_RATE);
|
DEFAULT_RATE);
|
||||||
fprintf(fd, " -c <n> Number of channels (default %d)\n",
|
fprintf(fd, " -c <n> Number of channels (default %d)\n",
|
||||||
DEFAULT_CHANNELS);
|
DEFAULT_CHANNELS);
|
||||||
fprintf(fd, " -f <bytes> Frame size (default %d)\n",
|
fprintf(fd, " -f <n> Frame size (default %d samples, see below)\n",
|
||||||
DEFAULT_FRAME);
|
DEFAULT_FRAME);
|
||||||
fprintf(fd, " -b <kbps> Bitrate (approx., default %d)\n",
|
fprintf(fd, " -b <kbps> Bitrate (approx., default %d)\n",
|
||||||
DEFAULT_BITRATE);
|
DEFAULT_BITRATE);
|
||||||
@ -119,6 +120,9 @@ static void usage(FILE *fd)
|
|||||||
fprintf(fd, "\nDisplay parameters:\n");
|
fprintf(fd, "\nDisplay parameters:\n");
|
||||||
fprintf(fd, " -v <n> Verbosity level (default %d)\n",
|
fprintf(fd, " -v <n> Verbosity level (default %d)\n",
|
||||||
DEFAULT_VERBOSE);
|
DEFAULT_VERBOSE);
|
||||||
|
|
||||||
|
fprintf(fd, "\nAllowed frame sizes (-f) are defined by the Opus codec. For example,\n"
|
||||||
|
"at 48000Hz the permitted values are 120, 240, 480 or 960.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -139,7 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
kbps = DEFAULT_BITRATE,
|
kbps = DEFAULT_BITRATE,
|
||||||
port = DEFAULT_PORT;
|
port = DEFAULT_PORT;
|
||||||
|
|
||||||
fputs("tx " COPYRIGHT "\n", stderr);
|
fputs(COPYRIGHT "\n", stderr);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int c;
|
int c;
|
||||||
|
Loading…
Reference in New Issue
Block a user