SPA_PLUGIN_DIR is exported in pkgconfig as 'plugindir'
PIPEWIRE_MODULE_DIR is exported as 'moduledir'
PIPEWIRE_CONFIG_DIR is exported only in uninstalled environments
as 'confdatadir' (not making this public due to the possible upcoming
configuration changes in pipewire)
All variables are also exported on the meson dependency objects,
so that subprojects can find them.
Wireplumber can then find them like this:
pipewire_moduledir = pipewire_dep.get_variable(
pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
... and this works regardless of whether wireplumber is being
configured as a subproject or using the uninstalled pkgconfig files
or using the system installation of pipewire.
This is required in order to run wireplumber tests in the
uninstalled environment with 'meson test'
This allows building wireplumber as part of the pipewire build
and running it in the uninstalled environment instead of media-session.
Building each session manager is individually contolled by the options:
-Dmedia-session=auto/enabled/disabled
-Dwireplumber=auto/enabled/disabled
And controlling which one is used in pipewire.conf is done with:
-Dsession-manager=media-session/wireplumber
Wireplumber's source tree must be in subprojects/wireplumber/
If this is missing, the .wrap file ensures that the latest git
master is downloaded while meson configures the build.
This git tree will not be automatically updated later, you need
to ensure that it is up-to-date on your own.
This allows meson subprojects (or projects using pipewire as a meson
subproject) to be able to use dependency('libpipewire-0.3') and
dependency('libspa-0.2') to find the uninstalled versions of these
libraries directly from the build dir instead of going through pkg-config
pkgconfig.generate() takes a positional argument, which
is the library target for which to generate a pkgconfig file
The previous way of adding the libpipewire target in
the libraries list is deprecated in recent meson
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
This allows having the same directory structure for headers as it
is in $prefix/include when installed, so that we can build other
projects using pipewire uninstalled (via the -uninstalled.pc or
by using meson subprojects). Otherwise, external code that reasonably
includes <pipewire/extensions/foo.h> fails to compile.
Write the profiler data to an allocated buffer instead of the stack
so that we can make it a little larger.
Don't try to process the data when the builder had to truncate it
because it didn't fit.
When we don't have enough files to accept the connection, clear the
_IN flag so that we don't try to accept if over and over again.
When a client disconnects, set the flag again so that we try to
accecpt new connections again.
See #1305
We can't recover from truncated control data so return a fatal error
that should stop the client. Truncated control data can happen when
there are no more fds available, for example.
See #1305
This is not too useful while looking at pipeline graphs, etc. We will
likely want to expand this to also include the module id or something to
distinguish multiple echo-cancel instances (which we can currently do
via the factory ID).
Always set the HAVE_OUTPUT flag because we always consume the
input and produce output, either to a buffer or an error.
This makes sure processing never stalls when something is wrong
on the output side.
See #1305
Make structure with defaults that holds the defaults as they are loaded
from the config file or initialized with default values.
Copy this structure to a settings version that is used at runtime.
Add a force-quantum and force-rate field in the settings that can be
used to force a quantum and samplerate if != 0.
Follow the rate of the _io_position area and adjust the resampler
to match. This ensures that we always process at the DSP samplerate
to the target negotiated fixed rate of the device/stream.
The merger and splitter use the samplerate from the _io_position
for the DSP formats so set the samplerate to 0 to make sure we
don't use it to negotiate a format with the peer.
Move the code to check the position duration for changes to one
new method.
Also check for samplerate changes and adjust the resampler state
accordingly.
Ensure all callbacks are called from the thread_loop and release
the thread lock before calling the callback.
Introduce a new rt_lock that is taken while the callbacks are called.
Only call the process_callback when we can acquire the rt_lock in the
data thread. This ensures the process callback is never called
concurrently with any other callback.
Give a warning when we try to call do_sync from the thread_loop
itself. We would deadlock because the thread that is supposed to do
the sync operation would be blocked in wait().
Fixes#1313
Check if the port id and direction is valid before accessing the
port array.
Handle unknown and invalid ports in many methods.
Free the port item after we removed the item from pipewire because
more methods are being called while removing the port and we don't
want them to fail.
impl_add_listener() could be called more than one time, ensure that we always emit node info
so that session manager(bluez-monitor) can receives it.
Fixes#1308
Previously, the configured test file would be named like the following:
spa-include-test-spa_control_control_h..cpp
fix that by removing one of the dots.
Furthermore, use the already existing `find` object instead of
calling `find_program` one more time.
Retrieve the pointer returned by `calloc()` and free that
instead of freeing the pointer to a member. This has worked
so far because as of yet `api` is the first member of the struct.
Since !737 it is not required of modules to emit the "loaded"
event if they can load immediately, therefore remove the
unnecessary `module_emit_loaded()` call.
Furthermore remove redundant log messages as well.