Treat s24 format as s32 and let sndfile convert for us. This is
needed because using the raw read bypasses decoding in some cases.
This makes 24 bits flac work.
Use the pw- prefix for all pipewire tools. This makes the
commands shorter but also avoids conflicts with password
and patchwork tools (pwcli is taken, pwconv is maybe we someday
can make).
pipewire-monitor -> pw-mon
pipewire-cli -> pw-cli
pipewire-dot -> pw-dot
pwcat -> pw-cat
The --list-targets option will report on the available
targets for the --target command (and some info about it).
Example:
$ pwplay --list-targets
Available targets ("*" denotes default):
30: name="alsa_card.pci-0000:00:03.0.playback.3.0" description="Built-in Audio (HDMI 0)" prio=696
31: name="alsa_card.pci-0000:00:03.0.playback.7.0" description="Built-in Audio (HDMI 1)" prio=632
32: name="alsa_card.pci-0000:00:03.0.playback.8.0" description="Built-in Audio (HDMI 2)" prio=616
33: name="alsa_card.pci-0000:00:03.0.playback.9.0" description="Built-in Audio (HDMI 3)" prio=600
* 34: name="alsa_card.pci-0000:00:1b.0.playback.0.0" description="Built-in Audio" prio=936
Getting this working required abandoning the simple stream API, and
the resultant increase in code size.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
The target option was not working properly. Now you can use
arbitrary nodes as targets.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
pwcat is analogous to pacat of PulseAudio which implements
both playback and recording capability.
Only wav files are supported for now, and you can use the
handy pwplay and pwrecord aliases for easy use.
Playback a wav file
$ pwplay foo.wav
Record a wav file
$ pwrecord -r 44100 -c 1 -f s16 foo.wav
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
Add an option to allow the user to disable examples, this will allow to
build pipewire without alsa. Without this option, build with
-Dpipewire-alsa=false -Dalsa=false fails on:
src/examples/meson.build:47:0: ERROR: Unknown variable "alsa_dep".
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
The upcoming PW version has been already released as 0.2.9x, while using 0.2.9 means we
still use a bugfix release of PW 0.2 version. Without the proper version bump, one cannot
use ifdefs and support both PW 0.2 and PW 0.3
We don't pause our clock ticks in the corked state which confuses
the timing code. As a workaround for now, don't set the node to
inactive when corked, this still keeps calling into the process
function and keep things moving. VLC seems to recover better.
If we can't access the root filesystem, grant access to the app.
This should not happen but for now it is a workaround for selinux
where we can't access the gnome-shell root when it connects for
screen sharing.
Check the type of the pod in the message instead. Old versions
should not have 0 there, new versions keep the number of file
descriptors, which should be 0 for the first message.
While we are creating objects on the monitor connection, pause the
policy connection until we have completed a roundtrip and the global
id is bound to the new object.
This way, when we resume the policy connection, we can always find the
newly created and bound object. Without the pause, it's possible that
we receive the new global on the policy connection before we got the
bind reply on the monitor connection and then we would end up with 2
proxies that are not linked together correctly.
Fixes#204
Make it possible to pause emision of events from the core object.
This is interesting if we need to wait for completion of some operations
on another connection before resuming processing.
See #204
This allows the upstream node to put buffers back to its pool in case
they were left around in the ready list locally when the alsa-pcm-sink
was last paused.
Fixes#203
Make the default permissions only apply to other objects than the
client. Otherwise when hiding all objects, we would also hide the
client and be disconnected.
Install the example media-session
Load the media session according to the PATH
Include the example directory in the PATH so we can run the media
session.
Don't just remove the buffer from the queue when it was only
partially written. To do this, return the error code from add_buffer
and only remove the buffer when there is a real error.
Use the DSP media subtype to describe DSP formats. DSP formats
don't include the rate, channels and channel position in the
format and must use the rate and duration from the position io. This
makes it possible to later change the samplerate dynamically without
having to renegotiate the graph.
The same goes for the video DSP format, which uses the io_video_size
from the io_position to get the size/stride. Set this up in the node
based on the defaults from the context.
Make it possible to define defaults in the daemon config file, such
as samplerate, quantum, video size and framerate. This is stored in
the context and used for the DSP formats.