Commit graph

29 commits

Author SHA1 Message Date
Dimitrios Katsaros
e84184f28f Jack: Added missing lock to jack API call 2024-02-08 10:20:12 +01:00
Dimitrios Katsaros
44b8a03c40 Jack: Fix jack_remove_property(ies) to use proxy id
These functions were using the object serial as the object id
2024-02-07 14:46:48 +01:00
Wim Taymans
4568d90565 jack: sync after setting metadata
Do a do_sync after setting the metadata to ensure the messages are
flushed to the server and processed. Fixes an issue where jack_property
would exit before the messages are flushed and so nothing happens.
2023-09-19 12:44:59 +02:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
aaeafa49c1 fix some printf arguments 2022-07-18 15:39:06 +02:00
Fabrice Fontaine
85ca67b927 fix detection of reallocarray
Fix detection of reallocarray (e.g. on glibc) raised since commit
0708a39b43

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-05-30 09:33:27 +02:00
Wim Taymans
c0cf2d802b jack: handle allocation errors better 2022-04-27 09:26:40 +02:00
Wim Taymans
f0cc49766f jack: use serial for uuid
We must use the serial for generating the uuid.

We use the serial for the port_id and jack_port_uuid_generate() can
be used to turn that into a uuid. So all mappings to and from
uuid need to be with serials.
2022-01-26 17:47:03 +01:00
Wim Taymans
4c0bba953a jack: avoid metadata updates to monitor nodes
Because there is no difference in the node id of the monitor and
the sink carla has problems.

See #1945
2021-12-24 11:30:56 +01:00
George Kiagiadakis
59407d2f08 includes: update all references to extensions to point to pipewire/extensions
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Peter Hutterer
da339c286f meson.build: drop HAVE_CONFIG_H
This is an autotools leftover, with meson we're always guaranteed to have
the config.h file.
2021-06-10 09:04:16 +10:00
Peter Hutterer
5596e350ea pipewire-jack: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
4e70799922 treewide: drop strzcmp implementations in favor of spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
2405f0942b spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Wim Taymans
c2fc8423eb jack: move metadata to exports file
So that we don't have to depend on the header file.

Fixes #306
2020-09-25 17:39:26 +02:00
Wim Taymans
36c10046da metadata: fix string compare 2020-08-12 18:58:48 +02:00
Wim Taymans
2e95f7dd85 jack: improve metadata callbacks
Only emit callbacks when something changed.

When setting a value, first update the local store. This triggers
the emit from the calling thread (as expected by jack clients) and
when the update arrives from the server, it will not emit the callback
anymore because the value didn't change.
2020-07-30 12:11:24 +02:00
Wim Taymans
e6ccc72feb fix compiler warnings 2020-05-08 20:40:02 +02:00
Wim Taymans
30d5a247e1 jack: improve locking
Protect the global metadata with a lock because we update this from
multiple clients. Avoid updating the metadata if it didn't change.

Add a simple lock to protect the session objects, they could be
accessed from the main thread or data thread. Use the simple lock
in methods that just read.

Use the new data loop invoke to make sure we sync the data update
with the data thread.

Stop the data loop when our position io is removed.
2020-04-30 12:57:56 +02:00
Wim Taymans
730c85e5b0 metadata: fix order of type/value 2020-04-27 12:54:14 +02:00
Wim Taymans
90e1eb1b22 jack: add more metadata keys 2020-04-27 12:22:32 +02:00
Wim Taymans
aafd1e7298 improve debug
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
539296069d jack: implement more metadata API
Rework the metadata implementation without pw_properties to make
it easier to delete all subjects and implement the metadata API.
Remove metadata from all objects when they are destroyed.
2020-04-20 15:19:06 +02:00
Wim Taymans
16ca53e592 jack: implement get_property 2020-04-20 11:51:20 +02:00
Wim Taymans
9e44b957f0 jack: check arguments
Guard against some evil jack clients
2020-02-24 11:25:31 +01:00
Wim Taymans
936c290cc1 plugins: fix the licence of alsa and jack libraries
It's all MIT
2020-02-07 15:43:13 +01:00
Wim Taymans
cd1ec41253 jack: use metadata when available 2019-11-05 10:03:35 +01:00
Arun Raghavan
863a642e08 Merge pipewire-jack subtree 2019-11-03 15:20:56 +01:00