1
Fork 0
Commit Graph

6123 Commits

Author SHA1 Message Date
Barnabás Pőcze e2d3f9140b pw-reserve: fix potential DBusMessage memory leak
Our reference to the message must always be dropped,
even if `dbus_connection_send()` fails.
2024-01-08 10:55:02 +00:00
Barnabás Pőcze 72d5417857 pw-reserve: use `arg0namespace` for dbus match rule
Only names in the `org.freedesktop.ReserveDevice1` namespace
are interesting for the purposes of device reservation, so
use `arg0namespace` in the dbus match rule to filter out others.
2024-01-08 10:55:02 +00:00
Wim Taymans 3da66734bd modules: add reconnect support to module-pulse-tunnel
When the pulse connection is broken, reconnect with the given interval.

Add the reconnect_interval_ms property to the pulse modules.
2024-01-05 13:34:19 +01:00
Wim Taymans b4be094be8 doc: clarify rlimits conf file
Fixes #3760
2024-01-05 10:22:28 +01:00
Wim Taymans 370bf7206b pulse-server: add pipewire-pulse:log-level message
Add a /core message to set the log level of the pulse-server.

An alternative would be to watch the settings metadata and follow the
server settings. This is however less flexible so the custom message
was chosen.
2024-01-04 17:43:53 +01:00
Wim Taymans a3c6b3acae log: add pw_log_topic_custom_enabled()
Add a function to check if a specfic custom log level has been defined
for a topic.

We can use this to dynamically check if we need to do the connection debug
messages.

We can also get rid of the conn.* pattern hack to disable connection
messages by default.
2024-01-04 17:40:57 +01:00
Wim Taymans 5152c98789 log: store log level in topics
When there is no specific level for a topic we store the global log level
in the topic level. Make sure this invariant is preserved when the
the global log level is updated.

We can then simply update the log level after we processed the log level
string to update all topics.

This should also make it possible to just use the level from the topic
in all cases and remove a check.
2024-01-04 17:30:21 +01:00
Demi Marie Obenour 76de766cd8 Draft: Allow calling trigger_done from the RT thread
This allows streams to know when the graph is finished and they can
safely drive it again.

Fixes: #3759
2024-01-04 10:21:16 +00:00
Pauli Virtanen 961d0cfdc1 log: make pw_log_topic_register/unregister threadsafe
Make the topic registration/unregistration threadsafe, as they can be
called from constructors of static objects which don't necessarily run
in the main loop thread.
2024-01-04 10:02:55 +00:00
Pauli Virtanen fb2d05aa61 log: make pw_log_set_level_string public API 2024-01-04 10:02:55 +00:00
Pauli Virtanen dd8d5e1bed log: make PW_LOG_TOPIC / PW_LOG_TOPIC_STATIC magical
Have PW_LOG_TOPIC / PW_LOG_TOPIC_STATIC emit GCC constructor/destructor
functions that register/unregister the log topic as needed.
2024-01-04 10:02:55 +00:00
Pauli Virtanen 3d974d3256 pipewire: register/unregister log topics from SPA plugins
Register enumerated log topics from SPA plugins on plugin load, and
unregister them on plugin unload.
2024-01-04 10:02:55 +00:00
Pauli Virtanen 3cff30c651 log: support dynamic log levels for registered log topics
Handle log level patterns in libpipewire instead of the SPA logger.

This allows dynamically changing the log levels also for log topics,
which we do when log.level metadata changes.

The syntax for PIPEWIRE_DEBUG and log.level in config files and metadata
is now the same.
2024-01-04 10:02:55 +00:00
Wim Taymans 8f66df2f78 pulse-server: call update_object_info in manager_added
get_device_info() requires us to call update_object_info() in the added
and updated events.

Fixes a bug where the properties were invalid in the avahi txt record.
2024-01-04 10:43:03 +01:00
Wim Taymans 0fd0582514 protocol: don't allow NULL event or command
If causes crashes when the handlers try to get the ID.
2024-01-03 14:05:39 +01:00
Barnabás Pőcze 8aaba4fec3 pipewire: module-loopback: fix delay buffer memory leak 2023-12-28 16:47:23 +01:00
Barnabás Pőcze c130ec9de9 pipewire: log: fix concatenation in log topic macros
`__LINE__` was not expanded previously. Fix that.
2023-12-26 16:03:29 +00:00
George Kiagiadakis 5a130ddd73 gstpipewiresrc: break out of wait_started() also on STATE_UNCONNECTED
When the session manager sends an error to the client, it typically
also destroys the node after the error, which causes the stream to go
to STATE_UNCONNECTED via proxy_removed(). In that case, make sure
we exit the loop early, otherwise it will take 30 seconds to unblock
gst_element_set_state()

This is a revised version of the fix that was commited via !1763
and then reverted, as it was problematic. Now the code ensures
that it breaks out only if the state was previously CONNECTING
or higher.
2023-12-26 16:01:44 +00:00
Michael Tretter 03173530da gst/pipewiresink: fix dts_offset
GStreamer uses a time stamp for the decoding time, but PipeWire uses an
offset to the presentation time. Thus, the pipewiresink must not use the
DTS as dts_offset, but has to calculate the offset.

If the buffer's DTS is invalid, assume that dts is pts.
2023-12-21 15:11:56 +01:00
Wim Taymans 92ac9a355f impl-node: handle priority.driver changes
When the driver priority changes, remove and add the node into the
driver list to keep the list sorted. Also trigger a graph recalc.
2023-12-20 12:39:19 +01:00
Dmitry Sharshakov a7410fe1bf module-rtp-sap: refactor channelmap generation 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov aca4d93b31 module-rtp-sap: properly serialize custom channelmaps 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 2e14f3d97a module-rtp-sap: only override NTP value in the timing line
That is indeed 0 for nearly any device. However the NTP value in the session identification part plays a crucial role for distinguishing between streams in some implementations, e.g. Dante.
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 420ab8ed89 module-rtp-sap: add session number to the NTP value
Dante Controller does not recognize next stream having the same NTP value. Work around that by adding current number of sessions to the time and the magic value.

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 57985e5aea module-rtp-sap: set source-filter up
Might enhance support for some devices or otherwise useful.

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov caabc074c8 module-rtp-session: remove outdated FIXME
rtp-sink already handles DSCP and uses profile 41 by default
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 76addb3eaa pipewire-aes67: default to NTP 0
Follow other devices to ensure best compatibility
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov eab90d6029 module-rtp-sap: allow overriding NTP value
It seems like most devices use value 0 there, so for further enhanced compatibility it's preferred to do so as well
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 065e819f18 TODO: module-rtp: buffering for sender
This should be done to match packet size requirements (e.g. 1 ms) while allowing user's software to run at higher buffer size to not stutter.

This will require scheduling multiple rtp_audio_flush_packets calls per one rtp_audio_process_capture call
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 066e8e1c63 module-rtp-sap: add a way to add extra attributes to SDP
Useful for new device bringup without rebuilding PW
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 1fe6feac56 module-rtp: improve logging priorities
Previous state was useless for real debug at the current implementation level
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov c75f6219dc module-rtp-sap: add notices about different channelmap formats used by different hw 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 873e6119b8 module-rtp: handle framecount attribute 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 2525a99b97 module-rtp-sap: parse ptime from incoming streams 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 6a64ec8b8f module-rtp-sap: send out a default channelmap if none specified
RAVENNA devices (at least Lawo) seem to error out on streams without this property

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov c66aad9a7c pipewire-aes67: improve the config 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 533161a766 module-rtp: add framecount to the SDP
Required for RAVENNA hardware.

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 8c4cfa57b6 pipewire-aes67: use interface name as default PHC
If it's wrong the service won't start anyway because of socket bind failure
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov e4a9f800c8 pipewire-aes67: recommend using ifname
It's better for PHC identification in multi-NIC systems. PHC numbering might be dependent on the probe order yet no bugs was observed. Still recommend this for more comfortable configuration.

Also added some guidance on what must be changed
2023-12-20 09:35:22 +00:00
Duncan Overbruck fffda6b6d1 pulse-server: fill in active port for monitors
The monitor sources also list the port of the sink and so the active
port needs to be collected as well so it doesn't fall back to the first
port (which might not be available).
2023-12-20 10:15:06 +01:00
Mark Gallagher bd87902da6 Add a build option to specify whether pulse gsettings schema should be installed 2023-12-16 21:10:00 +01:00
Mark Gallagher ee42a6868d Add pulseaudio gsettings schema 2023-12-16 21:09:17 +01:00
Wim Taymans ecf4b071e5 gst: keep track of node ports
Keep a list of ports for the node. When the node goes away, clear the
port links to the node. Handle the case where the port no longer has a
node.

This avoids a crash when, for example, the node permission is removed
and the port points to the now freed node_data.

Fixes #3708
2023-12-14 13:00:00 +01:00
Wim Taymans 5eb1f35997 gst: remove unused pending list 2023-12-14 12:59:04 +01:00
Wim Taymans 06d6551cc1 pulse-server: handle errors in echo-cancel geometry
Check for errors when loading the geometry instead of silently failing.
The points need to be given in the user locale and so might fail to
parse when given in JSON format.

Format the geometry nicely when loading the module.
2023-12-14 12:16:29 +01:00
Wim Taymans 5e750f6fb8 modules: place floats in properties in JSON format
Using %f will result in a locale dependent format and might not parse
with JSON parsers or even our own spa_atof() function.
2023-12-14 11:50:30 +01:00
Christian Glombek c386c96ff0 module-raop-discover: Skip tunnel creation for link-local addresses
Some Apple devices will advertise their link-local address via mDNS.
Ignore these mDNS entries.
2023-12-14 10:14:33 +00:00
Christian Glombek c0f018e0f4 module-raop-sink: Destroy module on RTSP error
Avoid continuation of the stream on error more rigorously.
2023-12-14 10:14:33 +00:00
Christian Glombek dc82bc5086 module-raop-discover: Remove unused raop.ip.version prop
Some AirPlay devices will announce their IPv4 addresses
over IPv6 mDNS if both are available, so the determined
IP version was not reliable.

The prop is not used by module-raop-sink, so its
removal should be safe.
2023-12-14 10:14:33 +00:00
Wim Taymans 6045ce87b1 module-pipe-tunnel: avoid bitfield data race
Move the have_sync bitfield away from the other bitfields because they
are written from different threads and might cause a data race.

Fixes #3706
2023-12-13 12:48:51 +01:00