Update auxiliary files

This commit is contained in:
Peter Hutterer 2021-10-13 16:07:36 +10:00
parent 9df68b0dd8
commit d2880ed23a
7 changed files with 23 additions and 3098 deletions

View file

@ -1,6 +1,6 @@
## Building
PipeWire uses a build tool called *Meson* as a basis for its build
PipeWire Media Session uses a build tool called *Meson* as a basis for its build
process. It's a tool with some resemblance to Autotools and CMake. Meson
again generates build files for a lower level build tool called *Ninja*,
working in about the same level of abstraction as more familiar GNU Make
@ -17,7 +17,7 @@ $ meson setup builddir
```
For distribution-specific build dependencies, please check our
[CI pipeline](https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/.gitlab-ci.yml)
[CI pipeline](https://gitlab.freedesktop.org/pipewire/pipewire-media-session/-/blob/master/.gitlab-ci.yml)
(search for `FDO_DISTRIBUTION_PACKAGES`). Note that some dependencies are
optional and depend on options passed to meson.
@ -33,7 +33,7 @@ Define the installation prefix:
$ meson configure builddir -Dprefix=/usr # Default: /usr/local
```
PipeWire specific build options are listed in the "Project options"
PipeWire Media Session specific build options are listed in the "Project options"
section. They are defined in `meson_options.txt`.
Finally, invoke the build:
@ -47,29 +47,17 @@ which orchestrates multi-component builds.
## Running
If you want to run PipeWire without installing it on your system, there is a
script that you can run. This puts you in an environment in which PipeWire can
be run from the build directory, and ALSA, PulseAudio and JACK applications
will use the PipeWire emulation libraries automatically
in this environment. You can get into this environment with:
If you want to run PipeWire Media Session without installing it on your system, there is a
script that you can run. This puts you in an environment in which PipeWire Media Session can
be run from the build directory. You can get into this environment with:
```
$ ./pw-uninstalled.sh -b builddir
$ ./media-session-uninstalled.sh
$ pipewire-media-session
```
In most cases you would want to run the default pipewire daemon. Look
below for how to make this daemon start automatically using systemd.
If you want to run pipewire from the build directory, you can do this
by doing:
```
cd builddir/
make run
```
This will use the default config file to configure and start the daemon.
The default config will also start pipewire-media-session, a default
example media session and pipewire-pulse, a PulseAudio compatible server.
This will use the default config file to configure and start PipeWire Media
Session.
You can also enable more debugging with the PIPEWIRE_DEBUG environment
variable like so:
@ -79,21 +67,16 @@ cd builddir/
PIPEWIRE_DEBUG="D" make run
```
You might have to stop the pipewire service/socket that might have been
You might have to stop the pipewire-media-session service that might have been
started already, with:
```
systemctl --user stop pipewire.service \
pipewire.socket \
pipewire-media-session.service \
pipewire-pulse.service \
pipewire-pulse.socket
systemctl --user stop pipewire-media-session.service
```
## Installing
PipeWire comes with quite a bit of libraries and tools, run
inside `builddir`:
Inside `builddir`, run:
```
sudo meson install
@ -102,118 +85,3 @@ sudo meson install
to install everything onto the system into the specified prefix.
Some additional steps will have to be performed to integrate
with the distribution as shown below.
### PipeWire daemon
A correctly installed PipeWire system should have a pipewire
process, a pipewire-media-session (or alternative) and an (optional)
pipewire-pulse process running. PipeWire is usually started as a
systemd unit using socket activation or as a service.
Configuration of the PipeWire daemon can be found in
/usr/share/pipewire/pipewire.conf. Please refer to the comments in the
config file for more information about the configuration options.
The daemon is started with:
```
systemctl --user start pipewire.service pipewire.socket
```
If you did not start the media-session in pipewire.conf, you will
also need to start it like this:
```
systemctl --user start pipewire-media-session.service
```
To make it start on system startup:
```
systemctl --user enable pipewire-media-session.service
```
you can write ```enable --now``` to start service immediately.
### ALSA plugin
The ALSA plugin is usually installed in:
On Fedora:
```
/usr/lib64/alsa-lib/libasound_module_pcm_pipewire.so
```
On Ubuntu:
```
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pipewire.so
```
There is also a config file installed in:
```
/usr/share/alsa/alsa.conf.d/50-pipewire.conf
```
The plugin will be picked up by alsa when the following files
are in /etc/alsa/conf.d/
```
/etc/alsa/conf.d/50-pipewire.conf -> /usr/share/alsa/alsa.conf.d/50-pipewire.conf
/etc/alsa/conf.d/99-pipewire-default.conf
```
With this setup, aplay -l should list a pipewire: device that can be used as
a regular alsa device for playback and record.
### JACK emulation
PipeWire reimplements the 3 libraries that JACK applications use to make
them run on top of PipeWire.
These libraries are found here:
```
/usr/lib64/pipewire-0.3/jack/libjacknet.so -> libjacknet.so.0
/usr/lib64/pipewire-0.3/jack/libjacknet.so.0 -> libjacknet.so.0.304.0
/usr/lib64/pipewire-0.3/jack/libjacknet.so.0.304.0
/usr/lib64/pipewire-0.3/jack/libjackserver.so -> libjackserver.so.0
/usr/lib64/pipewire-0.3/jack/libjackserver.so.0 -> libjackserver.so.0.304.0
/usr/lib64/pipewire-0.3/jack/libjackserver.so.0.304.0
/usr/lib64/pipewire-0.3/jack/libjack.so -> libjack.so.0
/usr/lib64/pipewire-0.3/jack/libjack.so.0 -> libjack.so.0.304.0
/usr/lib64/pipewire-0.3/jack/libjack.so.0.304.0
```
The provided pw-jack script uses LD_LIBRARY_PATH to set the library
search path to these replacement libraries. This allows you to run
jack apps on both the real JACK server or on PipeWire with the script.
It is also possible to completely replace the JACK libraries by adding
a file `pipewire-jack-x86_64.conf` to `/etc/ld.so.conf.d/` with
contents like:
```
/usr/lib64/pipewire-0.3/jack/
```
Note that when JACK is replaced by PipeWire, the SPA JACK plugin (installed
in /usr/lib64/spa-0.2/jack/libspa-jack.so) is not useful anymore and
distributions should make them conflict.
### PulseAudio replacement
PipeWire reimplements the PulseAudio server protocol as a small service
that runs on top of PipeWire.
The binary is normally placed here:
```
/usr/bin/pipewire-pulse
```
The server can be started with provided systemd activation files or
from PipeWire itself. (See `/usr/share/pipewire/pipewire.conf`)
```
systemctl --user start pipewire-pulse.service pipewire-pulse.socket
```
You can also start additional PulseAudio servers listening on other
sockets with the -a option. See `pipewire-pulse -h` for more info.

11
LICENSE
View file

@ -1,11 +1,2 @@
All PipeWire source files are licensed under the MIT License.
All PipeWire Media Session source files are licensed under the MIT License.
(see file COPYING for details)
With the exception of:
libspa-alsa.so in spa/plugins/alsa, which contains LGPL code from
Pulseaudio and is thus licensed as LGPL.
libjackserver.so which links against the GPL2 jack/control.h, which
makes it GPL2

View file

@ -1,74 +0,0 @@
VERSION = @VERSION@
TAG = @TAG@
SOURCE_ROOT = @SOURCE_ROOT@
BUILD_ROOT = @BUILD_ROOT@
all:
ninja -C $(BUILD_ROOT)
install:
ninja -C $(BUILD_ROOT) install
uninstall:
ninja -C $(BUILD_ROOT) uninstall
clean:
ninja -C $(BUILD_ROOT) clean
run: all
SPA_PLUGIN_DIR=$(BUILD_ROOT)/spa/plugins \
PIPEWIRE_MODULE_DIR=$(BUILD_ROOT)/src/modules \
PATH=$(BUILD_ROOT)/src/examples:$(PATH) \
PIPEWIRE_CONFIG_DIR=$(BUILD_ROOT)/src/daemon \
ACP_PATHS_DIR=$(SOURCE_ROOT)/spa/plugins/alsa/mixer/paths \
ACP_PROFILES_DIR=$(SOURCE_ROOT)/spa/plugins/alsa/mixer/profile-sets \
$(DBG) $(BUILD_ROOT)/src/daemon/pipewire-uninstalled
run-pulse: all
SPA_PLUGIN_DIR=$(BUILD_ROOT)/spa/plugins \
PIPEWIRE_MODULE_DIR=$(BUILD_ROOT)/src/modules \
PIPEWIRE_CONFIG_DIR=$(BUILD_ROOT)/src/daemon \
ACP_PATHS_DIR=$(SOURCE_ROOT)/spa/plugins/alsa/mixer/paths \
ACP_PROFILES_DIR=$(SOURCE_ROOT)/spa/plugins/alsa/mixer/profile-sets \
$(DBG) $(BUILD_ROOT)/src/daemon/pipewire-pulse
gdb:
$(MAKE) run DBG=gdb
valgrind:
$(MAKE) run DBG="DISABLE_RTKIT=1 valgrind --trace-children=yes"
test: all
ninja -C $(BUILD_ROOT) test
benchmark: all
ninja -C $(BUILD_ROOT) benchmark
monitor: all
SPA_PLUGIN_DIR=$(BUILD_ROOT)/spa/plugins \
PIPEWIRE_MODULE_DIR=$(BUILD_ROOT)/src/modules/ \
$(BUILD_ROOT)/src/tools/pw-mon
cli: all
SPA_PLUGIN_DIR=$(BUILD_ROOT)/spa/plugins \
PIPEWIRE_MODULE_DIR=$(BUILD_ROOT)/src/modules/ \
$(BUILD_ROOT)/src/tools/pw-cli
shell: all
ninja -C $(BUILD_ROOT) pw-uninstalled
dist: all
git archive --prefix=pipewire-$(VERSION)/ -o pipewire-$(VERSION).tar.gz $(TAG)
rpm: dist
rpmbuild -ta pipewire-$(VERSION).tar.gz
publish: all
git branch -D gh-pages 2>/dev/null || true && \
git branch -D draft 2>/dev/null || true && \
git checkout -b draft && \
git add -f $(BUILD_ROOT)/doc/html && \
git commit -anm "Deploy on gh-pages" && \
git subtree split --prefix $(BUILD_ROOT)/doc/html -b gh-pages && \
git push --force origin gh-pages:gh-pages && \
git checkout work 2>/dev/null

2682
NEWS

File diff suppressed because it is too large Load diff

189
README.md
View file

@ -1,193 +1,20 @@
# PipeWire
# PipeWire Media Session
[PipeWire](https://pipewire.org) is a server and user space API to
deal with multimedia pipelines. This includes:
PipeWire Media Session is an example session manager for
[PipeWire](https://pipewire.org).
- Making available sources of video (such as from a capture devices or
application provided streams) and multiplexing this with
clients.
- Accessing sources of video for consumption.
- Generating graphs for audio and video processing.
Nodes in the graph can be implemented as separate processes,
communicating with sockets and exchanging multimedia content using fd
passing.
Note that we recommend the use of
[WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) instead.
## Building and installation
The preferred way to install PipeWire is to install it with your
distribution package system. This ensures PipeWire is integrated
The preferred way to install PipeWire Media Session is to install it with your
distribution package system. This ensures PipeWire Media Session is integrated
into the rest of your system for the best experience.
If you want to build and install PipeWire yourself, refer to
If you want to build and install PipeWire Media Session yourself, refer to
[install](INSTALL.md) for instructions.
## Usage
The most important purpose of PipeWire is to run your favorite apps.
Some applications use the native PipeWire API, such as most compositors
(gnome-shell, wayland, ...) to implement screen sharing. These apps will
just work automatically.
Most audio applications can use either ALSA, JACK or PulseAudio as a
backend. PipeWire provides support for all 3 backends. Depending on how
your distribution has configured things this should just work automatically
or with the provided scripts shown below.
PipeWire can use environment variables to control the behaviour of
applications:
* `PIPEWIRE_DEBUG=<level>` to increase the debug level (or use one of
`XEWIDT` for none, error, warnings, info,
debug, or trace, respectively).
* `PIPEWIRE_LOG=<filename>` to redirect log to filename
* `PIPEWIRE_LOG_SYSTEMD=false` to disable logging to systemd journal
* `PIPEWIRE_LATENCY=<num/denom>` to configure latency as a fraction. 10/1000
configures a 10ms latency. Usually this is
expressed as a fraction of the samplerate,
like 256/48000, which uses 256 samples at a
samplerate of 48KHz for a latency of 5.33ms.
* `PIPEWIRE_NODE=<id>` to request a link to the specified node
### Using tools
`pw-cat` can be used to play and record audio and midi. Use `pw-cat -h` to get
some more help. There are some aliases like `pw-play` and `pw-record` to make
things easier:
```
$ pw-play /home/wim/data/01.\ Firepower.wav
```
### Running JACK applications
Depending on how the system was configured, you can either run PipeWire and
JACK side-by-side or have PipeWire take over the functionality of JACK
completely.
In dual mode, JACK apps will by default use the JACK server. To direct a JACK
app to PipeWire, you can use the `pw-jack` script like this:
```
$ pw-jack <appname>
```
If you replaced JACK with PipeWire completely, `pw-jack` does not have any
effect and can be omitted.
JACK applications will automatically use the buffer-size chosen by the
server. You can force a maximum buffer size (latency) by setting the
`PIPEWIRE_LATENCY` environment variable like so:
```
PIPEWIRE_LATENCY=128/48000 jack_simple_client
```
Requests the `jack_simple_client` to run with a buffer of 128 or
less samples.
### Running PulseAudio applications
PipeWire can run a PulseAudio compatible replacement server. You can't
use both servers at the same time. Usually your package manager will
make the server conflict so that you can only install one or the
other.
PulseAudio applications still use the regular PulseAudio client
libraries and you don't need to do anything else than change the
server implementation.
A successful swap of the server can be verified by checking the
output of
```
pactl info
```
It should include the string:
```
...
Server Name: PulseAudio (on PipeWire 0.3.x)
...
```
You can use pavucontrol to change profiles and ports, change volumes
or redirect streams, just like with PulseAudio.
### Running ALSA applications
If the PipeWire alsa module is installed, it can be seen with
```
$ aplay -L
```
ALSA applications can then use the `pipewire:` device to use PipeWire
as the audio system.
### Running GStreamer applications
PipeWire includes 2 GStreamer elements called `pipewiresrc` and
`pipewiresink`. They can be used in pipelines such as this:
```
$ gst-launch-1.0 pipewiresrc ! videoconvert ! autovideosink
```
Or to play a beeping sound:
```
$ gst-launch-1.0 audiotestsrc ! pipewiresink
```
PipeWire provides a device monitor as well so that
```
$ gst-device-monitor-1.0
```
shows the PipeWire devices and applications like cheese will
automatically use the PipeWire video source when possible.
### Inspecting the PipeWire state
To inspect and manipulate the PipeWire graph via GUI, you can use [Helvum](https://gitlab.freedesktop.org/ryuukyu/helvum).
Alternatively, you can use use one of the excellent JACK tools, such as `Carla`,
`catia`, `qjackctl`, ...
However, you will not be able to see all features like the video
ports.
`pw-mon` dumps and monitors the state of the PipeWire daemon.
`pw-dot` can dump a graph of the pipeline, check out the help for
how to do this.
`pw-top` monitors the real-time status of the graph. This is handy to
find out what clients are running and how much DSP resources they
use.
`pw-dump` dumps the state of the PipeWire daemon in JSON format. This
can be used to find out the properties and parameters of the objects
in the PipeWire daemon.
There is a more complicated tool to inspect the state of the server
with `pw-cli`. This tool can be used interactively or it can execute
single commands like this to get the server information:
```
$ pw-cli info 0
```
## Documentation
Find tutorials and design documentation [here](doc/index.md).
The (incomplete) autogenerated API docs are [here](https://docs.pipewire.org).
The Wiki can be found [here](https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/home)
## Contributing
PipeWire is Free Software and is developed in the open. It is mostly

View file

@ -7,7 +7,7 @@ if [ -z "$MESON" ]; then
fi
if [ -z "$MESON" ]; then
echo "error: Meson not found."
echo "Install meson to configure and build PipeWire. If meson" \
echo "Install meson to configure and build PipeWire Media Session. If meson" \
"is already installed, set the environment variable MESON" \
"to the binary's path."
exit 1;
@ -15,4 +15,3 @@ fi
mkdir -p builddir
$MESON setup "$@" builddir # use 'autogen.sh --reconfigure' to update
ln -sf builddir/Makefile Makefile

View file

@ -193,10 +193,6 @@ else
makedata.set('TAG', media_session_version)
endif
configure_file(input : 'Makefile.in',
output : 'Makefile',
configuration : makedata)
# Find dependencies
mathlib = cc.find_library('m', required : false)
rt_lib = cc.find_library('rt', required : false) # clock_gettime