Commit graph

7095 commits

Author SHA1 Message Date
Nils Tonnätt dd12910769 Revert "[Meson] Fix all deprecation warnings"
This reverts commit f7e1175ef0.
2021-08-08 19:18:40 +00:00
Barnabás Pőcze 090aaa4fb0 media-session: bluez-autoswitch: simplify logic
When `val` was used, it was always a true-ish since the
address of an array on the stack was assigned to it.
Remove this variable altogether, and use `name` directly.
Only use `name` when it is valid - when `key && value`.
2021-08-08 18:46:53 +02:00
Barnabás Pőcze 3724088c21 media-session: bluez-autoswitch: fix memory leak
`impl->default_sink` is dynamically allocated, but previously
it was not freed when the containing struct was being destroyed.
Fix that by freeing it in `session_destroy()`.
2021-08-08 18:46:53 +02:00
Pauli Virtanen 4840fd3da8 media-session: don't remove default.configured when devices go away
There's no particular problem to have default.configured to point to a
non-existent device, it will be ignored.  This was left over when
default and configured default were made separate things.

default-nodes also doesn't need to track the id of the configured
default, so remove also other stuff that's no longer necessary.  It can
simply load the values to metadata on startup, and save them to a file
when they are changed, without needing to understand what the values
mean.

Also fixes commit 7071562334 causing defaults to be forgotten when
nodes are removed.
2021-08-08 14:28:46 +03:00
Wim Taymans 33d8f14e45 stream: don't call process() in Start in some cases
We only want to call process() from Start when we are not a driver and
not realtime.

When we are a driver, the user will need to call _trigger_process()
to kick things of.

When we are asked to schedule process from the realtime thread, we
need to wait until the RT thread is scheduled.

In all other cases we can call _process() from the mainloop so that
the RT thread has something to collect when it gets scheduled.
2021-08-06 16:15:55 +02:00
Wim Taymans b030a4e7da stream: add a method to check if driving or not
When the node is driving, we need to call trigger_process()
otherwise we don't and we simply need to wait for the process() to
be called, triggered by the driver node.

See #1484
2021-08-06 15:36:52 +02:00
Wim Taymans 3c97090ba0 stream: rename _drive() to _trigger_process()
Should be a bit more intuitive to understand what it will do.
2021-08-06 15:32:21 +02:00
Wim Taymans 47fe5b550d examples: add a pull based video player
It has the DRIVER flag set and sets a PW_KEY_PRIORITY_DRIVER value
to something higher than the source so that it becomes the driver.
Every timeout it does pw_stream_drive() to start the graph, which
will eventually call the process function with a pulled buffer to
display.

The framerate is set to something lower (80ms between frames) to
show the pull effect.

fixes #1484
2021-08-06 14:49:32 +02:00
Wim Taymans 23d3b10be4 examples: update video-src examples
So that hey use pw_stream_drive() to start the graph.
2021-08-06 13:55:43 +02:00
Wim Taymans 9831f62927 stream: add pw_stream_drive()
This method is meant for driver streams when they have data or need
data.

Previously only source (output) streams could drive the graph and
indirectly by doing pw_stream_queue_buffer(). This behaviour is now
deprecated (but will still work) in favour of calling
pw_stream_drive() explicitly.

pw_stream_drive() will call the process function immediately (if
driver) or later (when not a driver) so that the same code paths
can be used when running as a driver or not.

In a similar way, a consumer (input) driver stream can now be
written. It will call pw_stream_drive() when it wants data and the
process function will be called when the data is ready.

See #1484
2021-08-06 13:36:34 +02:00
Wim Taymans 42e0b520aa stream: Detect if we are driving or not
We need to check the position vs the clock to see if we are currently
driving the graph. We can only call the node ready callback when
we are actually driving the graph.
2021-08-06 13:09:39 +02:00
Peter Hutterer 5da2081a4b default-profile: document what this module does in more detail 2021-08-06 08:03:27 +00:00
Peter Hutterer 43a560e25f default-profile: make the job to restore a saved profile easier to read
"restored" describes a state but the only case we actually set this
value if we want to restore our previously saved profile. Rename a
variable to indicate this, makes it easier to understand.
2021-08-06 08:03:27 +00:00
Peter Hutterer cec4699986 default-profile: remove write-only field saved_profile 2021-08-06 08:03:27 +00:00
Nils Tonnätt 2488e87fde [CI] Update Meson 2021-08-06 07:56:16 +00:00
Nils Tonnätt f7e1175ef0 [Meson] Fix all deprecation warnings 2021-08-06 07:56:16 +00:00
Nils Tonnätt a5e3d3f7a7 [Meson] Change jack-devel option to be boolean 2021-08-06 07:56:16 +00:00
Nils Tonnätt 8dc8fb55f2 [Meson] Unescape pkgconf variable 2021-08-06 07:56:16 +00:00
Wim Taymans 8119e5cdb4 0.3.33 2021-08-05 16:19:43 +02:00
Wim Taymans 9229467f20 module-zeroconf: only free impl when not NULL 2021-08-05 15:49:38 +02:00
Wim Taymans 4be14c24f5 stream: improve latency param debug 2021-08-05 15:42:38 +02:00
Wim Taymans 874724877d filter: handle NULL latency param 2021-08-05 15:42:23 +02:00
Wim Taymans a9fecd50ed bluez5: improve debug
Log the errno when something is wrong.
2021-08-05 15:41:50 +02:00
Wim Taymans e3a643bffe bluez5: remove useless pod_frame() call 2021-08-05 15:41:26 +02:00
Wim Taymans 83422ba62d pulse-server: bump version to 15.0.0 2021-08-05 13:32:09 +02:00
Wim Taymans dc6a81520d media-session: always call va_end 2021-08-05 13:32:09 +02:00
Pauli Virtanen 76bae0cac4 media-session: add bluez-autoswitch module
Add module that switches bluez device profile to HFP/HSP if an input
stream (non-monitor, autoconnect) appears, and the current default
output device is bluez one that does not have input route.

When all input streams are gone, switch all changed profiles back.

Pending restore state is saved to session manager state files, in order
to restore it if e.g. devices get disconnected.  This usually is not
currently necessary since the bluez5 plugin prefers to connect to A2DP
over HFP, but might matter in future with backchannel-enabled A2DP
codecs.
2021-08-05 11:27:06 +00:00
Peter Hutterer 127781cfc8 doc: ignore all function attributes in doxygen 2021-08-05 09:51:40 +00:00
Peter Hutterer 5e5bf5f340 doc: don't double up the pw_proxy_new() documentation 2021-08-05 09:51:40 +00:00
Peter Hutterer 5ae528c957 spa: move the log version define so it matches other implementations
Makes it match up with the comment now too
2021-08-05 09:51:40 +00:00
Peter Hutterer 1244229faf spa: document the spa_hook interface with an example 2021-08-05 09:51:40 +00:00
Peter Hutterer d8f6033b9d spa: document the spa_interface and how it works 2021-08-05 09:51:40 +00:00
Peter Hutterer 56acf766a5 doc: split the spa_interfaces out as separate group from the spa_hooks 2021-08-05 09:51:40 +00:00
Peter Hutterer 1be939c672 doc: add a meson example to the tutorial
The vast majority of users will want to build with a build system, so
let's add a minimal example there to avoid guesswork.
2021-08-05 09:51:40 +00:00
Nils Tonnätt 761fa6f59d meson: fix meson test without building pipewire before
This adds project internal dependencies to some tests to let all
tests succeed. It is not adding all dependencies those tests actually
need.
2021-08-04 20:38:30 +02:00
Wim Taymans 4841156b74 doc: clarify JSON usage
Mention that the config format can be pure JSON or with some
simplifications and additions.
2021-08-04 11:47:31 +02:00
Torkel Niklasson 02b4ccd782 src/pipewire/impl-node.c: Change client err/warn logs to infos
xrun, client too slow and that the client missed wakeups is not a
critical issue for us, so we patch them to be infos instead of
warnings and errors.
2021-08-04 09:37:29 +00:00
Peter Hutterer f0baffbc84 doc: ignore SPA_EXPORT and SPA_PRINTF_FUNC
This caused doxygen to include a rather random assortment of variables
and link to them from various pages (e.g. "arg", "res", "buffer", NAME,
etc.)
2021-08-04 07:49:53 +00:00
Peter Hutterer 3ced15ad22 doc: some extra docs for the core objects 2021-08-04 07:49:53 +00:00
Peter Hutterer 5561531751 doc: document the core/implementation API split a bit better
Still missing a proper review of the linked objects, but at least this
now explains why those two are split.
2021-08-04 07:49:53 +00:00
Peter Hutterer 3370a56e3e doc: move the error reporting blurb to the library page
Let's keep the daemon page higher-level and leave API behaviors
elsewhere.
2021-08-04 07:49:53 +00:00
Peter Hutterer 710caf9d75 doc: fix a subsection name 2021-08-04 07:49:53 +00:00
Peter Hutterer 4c760e473d doc: add a nice graph to illustrate how the daemon a bit 2021-08-04 07:49:53 +00:00
Peter Hutterer 13ffc549c9 doc: add basic docs for the session manager 2021-08-04 07:49:53 +00:00
Peter Hutterer d0060fbddd test: move the client and utils tests over here 2021-08-04 07:45:06 +00:00
Peter Hutterer 99a10c1606 protocol: assert if the loop initialization fails on the connection test
This test needs an environment set up to load everything correctly,
running it directly results in a segfault. Let's make sure we assert on
a NULL loop to make this look slightly more planned.
2021-08-04 15:43:10 +10:00
Wim Taymans c6dc7e98fd dbus: protect against NULL data
Make sure we don't accidentally unref a NULL data.
2021-08-03 19:11:15 +02:00
Daniel Stone bf112940d0 spa: Only test __cplusplus value when it's defined
In higher warning levels, clang complains about testing the value of
__cplusplus when it's not defined.
2021-08-03 15:43:59 +00:00
Wim Taymans 99359c3998 jack: use port_set_mix_info
Use the port_set_mix_info event to get the id of the peer port for the
mixer input.

When asked for the buffer of one of those peer ports, we can get it from
the mixer input buffers.

Fixes #1471
2021-08-03 17:39:14 +02:00
Wim Taymans bba8c5daa3 client-node: add port_set_mix_info
Add a new client-node port_set_mix_info event. bump the interface
version to 4 and the event version to 1.

The event is used to send information about the peer object to the
port mixer. This can be used to track what buffers belong to what
peer.
2021-08-03 17:36:11 +02:00