[pulseaudio-commits] Branch 'next' - 5 commits - configure.ac man/Makefile.am man/pacat.1.xml.in man/paplay.1.xml.in man/pulseaudio.1.xml.in src/pulse src/utils
Peter Meerwald
pmeerw at kemper.freedesktop.org
Tue Jan 13 07:05:45 PST 2015
configure.ac | 1
man/Makefile.am | 19 ++++++-
man/pacat.1.xml.in | 10 +++
man/paplay.1.xml.in | 127 ------------------------------------------------
man/pulseaudio.1.xml.in | 4 +
src/pulse/context.c | 5 +
src/utils/pacat.c | 16 ++++--
7 files changed, 44 insertions(+), 138 deletions(-)
New commits:
commit 4bd009a22746d11d5962cf0337b7d85decb0b89a
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Nov 17 11:34:59 2014 +0100
pacat: State purpose of program depending how it was invoked
see https://bugs.freedesktop.org/show_bug.cgi?id=68135
state purpose of paplay/parec/pamon/parecord/pacat when invoked with -h
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index e60dfca..d1f5502 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -52,6 +52,7 @@
#define CLEAR_LINE "\x1B[K"
static enum { RECORD, PLAYBACK } mode = PLAYBACK;
+static const char *purpose = NULL;
static pa_context *context = NULL;
static pa_stream *stream = NULL;
@@ -669,7 +670,8 @@ static void time_event_callback(pa_mainloop_api *m, pa_time_event *e, const stru
static void help(const char *argv0) {
- printf(_("%s [options]\n\n"
+ printf(_("%s [options]\n"
+ "%s\n\n"
" -h, --help Show this help\n"
" --version Show version\n\n"
" -r, --record Create a connection for recording\n"
@@ -705,7 +707,7 @@ static void help(const char *argv0) {
" --file-format[=FFORMAT] Record/play formatted PCM data.\n"
" --list-file-formats List available file formats.\n"
" --monitor-stream=INDEX Record from the sink input with index INDEX.\n")
- , argv0);
+ , argv0, purpose);
}
enum {
@@ -785,15 +787,19 @@ int main(int argc, char *argv[]) {
if (strstr(bn, "play")) {
mode = PLAYBACK;
raw = false;
+ purpose = _("Play back encoded audio files on a PulseAudio sound server.");
} else if (strstr(bn, "record")) {
mode = RECORD;
raw = false;
- } else if (strstr(bn, "cat")) {
- mode = PLAYBACK;
- raw = true;
+ purpose = _("Capture audio data from a PulseAudio sound server and write it to a file.");
} else if (strstr(bn, "rec") || strstr(bn, "mon")) {
mode = RECORD;
raw = true;
+ purpose = _("Capture audio data from a PulseAudio sound server and write it to STDOUT or the specified file.");
+ } else { /* pacat */
+ mode = PLAYBACK;
+ raw = true;
+ purpose = _("Play back audio data from STDIN or the specified file on a PulseAudio sound server.");
}
proplist = pa_proplist_new();
commit 92b5db964e5e146af8d7234324127e1ce98bf78a
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Nov 17 11:02:25 2014 +0100
man: Install man page symlinks to pacat for paplay, parec, parecord, pamon
see https://bugs.freedesktop.org/show_bug.cgi?id=68135
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
diff --git a/man/Makefile.am b/man/Makefile.am
index 2fe477f..413ad3b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -61,6 +61,22 @@ CLEANFILES = \
%: %.xml Makefile
$(AM_V_GEN) perl $(srcdir)/xmltoman $< > $@ || rm -f $@
+if OS_IS_WIN32
+SYMLINK_PROGRAM=cd $(DESTDIR)$(man1dir) && cp
+else
+SYMLINK_PROGRAM=ln -sf
+endif
+install-data-hook:
+ $(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/paplay.1
+ $(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parec.1
+ $(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parecord.1
+ $(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/pamon.1
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(man1dir)/paplay.1
+ rm -f $(DESTDIR)$(man1dir)/parec.1
+ rm -f $(DESTDIR)$(man1dir)/parecord.1
+ rm -f $(DESTDIR)$(man1dir)/pamon.1
endif
EXTRA_DIST = \
commit 8a6de5816e0db0f697d22c61d94c7508646f366b
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date: Mon Nov 17 10:44:31 2014 +0100
man: Drop separate paplay man page, move info to pacat man page
see https://bugs.freedesktop.org/show_bug.cgi?id=68135
pacat and paplay man pages both claim to describe the paplay program
(which is actually a symlink to pacat) -- this is inconsistent and
redundant, so drop the paplay man page
a follow-up patch will add man page symlink for all programs
implemented by pacat, not just paplay
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
diff --git a/configure.ac b/configure.ac
index 6843729..9165bab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1454,7 +1454,6 @@ po/Makefile.in
man/pulseaudio.1.xml
man/esdcompat.1.xml
man/pax11publish.1.xml
-man/paplay.1.xml
man/pacat.1.xml
man/pacmd.1.xml
man/pactl.1.xml
diff --git a/man/Makefile.am b/man/Makefile.am
index d80ba6a..2fe477f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -22,7 +22,6 @@ noinst_DATA = \
pulseaudio.1.xml \
esdcompat.1.xml \
pax11publish.1.xml \
- paplay.1.xml \
pacat.1.xml \
pacmd.1.xml \
pactl.1.xml \
@@ -45,7 +44,6 @@ dist_man_MANS = \
pulseaudio.1 \
esdcompat.1 \
pax11publish.1 \
- paplay.1 \
pacat.1 \
pacmd.1 \
pactl.1 \
@@ -69,7 +67,6 @@ EXTRA_DIST = \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
- paplay.1.xml.in \
pacat.1.xml.in \
pacmd.1.xml.in \
pactl.1.xml.in \
diff --git a/man/pacat.1.xml.in b/man/pacat.1.xml.in
index 1c5a6c0..d510f30 100644
--- a/man/pacat.1.xml.in
+++ b/man/pacat.1.xml.in
@@ -36,7 +36,8 @@ USA.
<description>
<p><file>pacat</file> is a simple tool for playing back or
capturing raw or encoded audio files on a PulseAudio sound
- server.</p>
+ server. It understands all audio file formats supported by
+ <file>libsndfile</file>.</p>
</description>
<options>
@@ -244,6 +245,13 @@ USA.
</options>
+ <section name="Limitations">
+ <p>Due to a limitation in <file>libsndfile</file>
+ <file>paplay</file> currently does not always set the correct channel
+ mapping for playback of multichannel (i.e. surround) audio files, even
+ if the channel mapping information is available in the audio file.</p>
+ </section>
+
<section name="Authors">
<p>The PulseAudio Developers <@PACKAGE_BUGREPORT@>; PulseAudio is available from <url href="@PACKAGE_URL@"/></p>
</section>
diff --git a/man/paplay.1.xml.in b/man/paplay.1.xml.in
deleted file mode 100644
index 843b172..0000000
--- a/man/paplay.1.xml.in
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0"?><!--*-nxml-*-->
-<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
-<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-
-<!--
-This file is part of PulseAudio.
-
-PulseAudio is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of the
-License, or (at your option) any later version.
-
-PulseAudio is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
-Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with PulseAudio; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA.
--->
-
-<manpage name="paplay" section="1" desc="Play back audio files on a PulseAudio sound server">
-
- <synopsis>
- <cmd>paplay [<arg>options</arg>] <arg>FILE</arg></cmd>
- <cmd>paplay <opt>--help</opt></cmd>
- <cmd>paplay <opt>--version</opt></cmd>
- </synopsis>
-
- <description>
- <p><file>paplay</file> is a simple tool for playing back audio
- files on a PulseAudio sound server. It understands all audio file
- formats supported by <file>libsndfile</file>.</p>
- </description>
-
- <options>
-
- <option>
- <p><opt>-h | --help</opt></p>
-
- <optdesc><p>Show help.</p></optdesc>
- </option>
-
- <option>
- <p><opt>--version</opt></p>
-
- <optdesc><p>Show version information.</p></optdesc>
- </option>
-
- <option>
- <p><opt>-v | --verbose</opt></p>
-
- <optdesc><p>Enable verbose operation. Dumps the current playback time to STDERR during playback.</p></optdesc>
- </option>
-
- <option>
- <p><opt>-s | --server</opt><arg>=SERVER</arg></p>
-
- <optdesc><p>Choose the server to connect to.</p></optdesc>
- </option>
-
- <option>
- <p><opt>-d | --device</opt><arg>=SINK</arg></p>
-
- <optdesc><p>Specify the symbolic name of the sink to play this file on.</p></optdesc>
- </option>
-
- <option>
- <p><opt>-n | --client-name</opt><arg>=NAME</arg></p>
-
- <optdesc><p>Specify the client name <file>paplay</file> shall pass to the server when connecting.</p></optdesc>
- </option>
-
- <option>
- <p><opt>--stream-name</opt><arg>=NAME</arg></p>
-
- <optdesc><p>Specify the stream name <file>paplay</file> shall pass to the server when creating the stream.</p></optdesc>
- </option>
-
- <option>
- <p><opt>--volume</opt><arg>=VOLUME</arg></p>
-
- <optdesc><p>Specify the initial playback volume to use. Choose a value between 0 (silent) and 65536 (100% volume).</p></optdesc>
- </option>
-
- <option>
- <p><opt>--channel-map</opt><arg>=CHANNELMAP</arg></p>
-
- <optdesc><p>Explicitly choose a channel map when playing back
- this stream. The argument should be a comma separated list of
- channel names: <arg>front-left</arg>, <arg>front-right</arg>,
- <arg>mono</arg>, <arg>front-center</arg>, <arg>rear-left</arg>,
- <arg>rear-right</arg>, <arg>rear-center</arg>, <arg>lfe</arg>,
- <arg>front-left-of-center</arg>,
- <arg>front-right-of-center</arg>, <arg>side-left</arg>,
- <arg>side-right</arg>, <arg>top-center</arg>,
- <arg>top-front-center</arg>, <arg>top-front-left</arg>,
- <arg>top-front-right</arg>, <arg>top-rear-left</arg>,
- <arg>top-rear-right</arg>, <arg>top-rear-center</arg>, or any of
- the 32 auxiliary channel names <arg>aux0</arg> to
- <arg>aux31</arg>.</p></optdesc>
- </option>
-
- </options>
-
- <section name="Limitations">
-
- <p>Due to a limitation in <file>libsndfile</file>
- <file>paplay</file> currently does not always set the correct channel
- mapping for playback of multichannel (i.e. surround) audio files, even if the channel mapping information is
- available in the audio file.</p>
-
- </section>
-
- <section name="Authors">
- <p>The PulseAudio Developers <@PACKAGE_BUGREPORT@>; PulseAudio is available from <url href="@PACKAGE_URL@"/></p>
- </section>
-
- <section name="See also">
- <p>
- <manref name="pulseaudio" section="1"/>, <manref name="pacat" section="1"/>
- </p>
- </section>
-
-</manpage>
commit 84c7f2c9a042a61dbb63834e71a6ed5b04714980
Author: Peter Meerwald <pmeerw at pmeerw.net>
Date: Sat Nov 15 16:06:22 2014 +0100
man: Describe optional prefix {string} in server address
see https://bugs.freedesktop.org/show_bug.cgi?id=84024
v2: (thanks Tanu Kaskinen)
* fix wording wrt machine id
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
diff --git a/man/pulseaudio.1.xml.in b/man/pulseaudio.1.xml.in
index 7a97379..230d65e 100644
--- a/man/pulseaudio.1.xml.in
+++ b/man/pulseaudio.1.xml.in
@@ -459,7 +459,9 @@ USA.
server addresses separated by whitespace which are tried in turn. A server
address consists of an optional address type specifier (unix:, tcp:, tcp4:,
tcp6:), followed by a path or host address. A host address may include an
- optional port number.</p>
+ optional port number. A server address may be prefixed by a string enclosed
+ in {}. In this case the following server address is ignored unless the prefix
+ string equals the local hostname or the machine id (/etc/machine-id).</p>
<p><arg>$PULSE_SINK</arg>: the symbolic name of the sink to connect to when a client creates a playback stream and doesn't explicitly ask for a specific sink.</p>
commit faa8165f3d2c9e83c709b18cd3e14b81c75774e4
Author: Peter Meerwald <pmeerw at pmeerw.net>
Date: Sat Nov 15 15:24:22 2014 +0100
context: pa_context_connect() with PA_CONTEXT_NOFAIL should return 0 when waiting for PA on D-Dus
see
https://bugs.freedesktop.org/show_bug.cgi?id=85011
in case NOAUTOSPAWN is set and no server has been specified, PA starts listening on DBUS
for a new server, and the state is PA_CONTEXT_CONNECTING, but pa_context_connect()
returns -1; it should return 0.
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
diff --git a/src/pulse/context.c b/src/pulse/context.c
index d5da9b8..374da71 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -816,6 +816,11 @@ static int try_next_connection(pa_context *c) {
track_pulseaudio_on_dbus(c, DBUS_BUS_SESSION, &c->session_bus);
if (!c->system_bus)
track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
+
+ if (c->session_bus || c->system_bus) {
+ pa_log_debug("Waiting for PA on D-Bus...");
+ break;
+ }
} else
#endif
pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
More information about the pulseaudio-commits
mailing list