Julian Bouzas
85820f7aef
tests: examples: print error if buffer is not valid in wpipc-client
...
If we lose connection with the server while a request was pending, the request
callback is still triggered but with NULL buffer.
2021-06-28 11:38:38 -04:00
Julian Bouzas
9fd76570c4
tests: wpipc: check if new connection to new receiver is valid after losing connection
2021-06-28 11:38:37 -04:00
Julian Bouzas
6b8ea83404
wpipc: sender: disconnect and clear all pending tasks if connection was lost
...
If we don't remove the socket from epoll when the connection is lost, we risk
having the lost callback triggered more than once by epoll, creating race
condition in the unit test because more than 1 event happened. The epoll thread
and socket will be re-created again when re-connecting.
Note that we cannot destroy the epoll thread before triggering the lost
connection callback because we are running the callback in the epoll thread,
which is why removing the socket from epoll is the only way to make sure the
lost connection callback is only triggered once.
2021-06-28 11:38:37 -04:00
Julian Bouzas
313f872570
wpipc: receiver: also emit sender disconnected when failed to read
2021-06-28 11:38:37 -04:00
Julian Bouzas
f4a4f8bcc7
wpipc: protocol: make sure buffer is initialized to 0 before building reply/request
...
Fixes valgrind errors
2021-06-28 11:38:37 -04:00
Julian Bouzas
8a5a8fc015
wpipc: change epoll thread func type name to be more consistent
2021-06-28 11:38:37 -04:00
Julian Bouzas
ac4d5bd22a
tests: wpipc: use GCond instead of while loop to wait for events
...
Fixes hanging issues when running test with valgrind.
2021-06-28 11:38:37 -04:00
Julian Bouzas
d0b26fd70f
tests: wpipc: fix typo in sender-receiver unit test
2021-06-28 11:38:37 -04:00
George Kiagiadakis
9dabe3d991
ci: add ubuntu 20.04 builds and test some more option combinations
...
- on fedora: with and without docs
- on ubuntu: with and without introspection
- on fedora: with lua 5.4 from the submodule
- on ubuntu: with lua 5.3 from the system
2021-06-28 17:54:38 +03:00
George Kiagiadakis
2bd0c1b687
docs: relax doxygen version requirement
...
1.8.x also works just fine
2021-06-28 17:36:47 +03:00
George Kiagiadakis
096337f7a5
meson: bump lua dependency to 5.4 and update the subproject
2021-06-27 07:57:06 +00:00
George Kiagiadakis
c41d042dd0
wplua: remove handling of LUA_ERRGCMM, which is removed in lua 5.4
2021-06-27 07:57:06 +00:00
Julian Bouzas
014ef05308
m-reserve-device: use a weak ref instead of raw pointer for transition
...
This always guarantees the transition is valid when g_weak_ref_get() does not
return NULL.
2021-06-25 11:04:30 -04:00
Julian Bouzas
f7483ebd3d
tests: transition: make sure transition is still valid after advancing
...
Advancing a transition might free it, so we ref before advancing it, and unref
after checking its completion.
2021-06-25 11:04:15 -04:00
Julian Bouzas
70197f498c
tests: fix coverity scan side effect in assertion issues
2021-06-25 08:50:08 -04:00
Julian Bouzas
5b4b360b1c
wp: log warning if PIPEWIRE_DEBUG env variable could not be set
2021-06-25 08:50:08 -04:00
Julian Bouzas
a65f3bb44e
m-default-nodes: properly parse args
2021-06-25 08:50:08 -04:00
Julian Bouzas
f0830e5a7d
m-lua-scripting: check return values of lua_getstack and lua_getinfo
2021-06-25 08:50:08 -04:00
Julian Bouzas
51128f0521
m-mixer-api: only add 'mute' if correctly parsed
2021-06-25 08:50:08 -04:00
Julian Bouzas
412fae485a
m-lua-scripting: make sure pod is successfully parsed
...
Otherwise show a warning
2021-06-25 08:50:08 -04:00
Julian Bouzas
671b8110d9
m-lua-scripting: make sure lua type is valid
2021-06-25 08:50:08 -04:00
Julian Bouzas
c423012238
m-lua-scripting: fix conversion from SPA_TYPE_Bytes to LUA_TNUMBER
2021-06-25 08:50:08 -04:00
Julian Bouzas
02fd0a554a
m-si-standard-link: make link_all a parameter
...
Otherwise its value will always be false, making it useless
2021-06-25 08:50:08 -04:00
George Kiagiadakis
c6d104a66b
access-portal: fix granting access to camera device nodes
...
The constraint for nodes wasn't supposed to have a client.id
Also make the nodes_om global, to avoid leaking it in potential ref loops
2021-06-25 11:47:13 +03:00
Julian Bouzas
892b0dada6
lib: Use #define instead of 'static const' for constants
...
Fixes build errors when using GCC older than v8.1
2021-06-24 09:24:16 -04:00
Arun Raghavan
e1c40a567c
scripts: Add an intended-roles policy script
...
This routes streams of a given media.role to devices which specify that
role in device.intended-roles.
2021-06-20 18:45:28 -04:00
George Kiagiadakis
c24db9f353
tests: add pipewire env variables when running tests, tidy up common_env
...
Related to pipewire!767
2021-06-18 19:34:25 +03:00
George Kiagiadakis
b222411356
tests/metadata: also fix failing metadata unit test
...
latest pipewire exports settings metadata too, so we need to filter
2021-06-18 15:30:55 +03:00
George Kiagiadakis
8e5448fd0c
si-audio-adapter/endpoint: do not sync() in loops, use ports-changed instead
...
Calling sync() in loops may end up looping forever if the operating
system's scheduling allows pipewire to reply to this sync() before
wireplumber's event loop has a chance to become idle.
In order for the new ports to appear, the object manager that monitors
them needs to emit "objects-changed", which only ever happens in an
idle callback. If the reply to sync() arrives before the idle callback,
it gets prioritized and processed, which causes another sync(), and so on...
Since setting PortFormat in the adapter always changes the ports,
watching for "ports-changed" feels like a better solution. Still,
there is more room for improvement.
2021-06-18 15:14:03 +03:00
George Kiagiadakis
87741e39ec
s/metadatas/metadata/g
...
data is already plural
2021-06-18 10:44:24 +03:00
George Kiagiadakis
a57647769a
metadata: filter for the "default" metadata object in all places where we use it
...
there can be more metadata objects around...
2021-06-18 10:39:47 +03:00
George Kiagiadakis
b8979e7434
wp-uninstalled.sh: don't shift after -b, there's a generic shift below
2021-06-16 19:45:36 +03:00
George Kiagiadakis
48ef823318
meson: avoid source_root(), as it fails when wireplumber is a subproject
2021-06-16 19:44:43 +03:00
George Kiagiadakis
1075d23fab
lib: fix some issues found by coverity
2021-06-15 17:43:22 +03:00
George Kiagiadakis
63282707ba
README: add coverity badge
2021-06-15 15:48:13 +03:00
George Kiagiadakis
b0f35427a9
coverity: use gzip instead of lzma to compress the coverity data
...
lzma is not available in the fedora image that we use... what was I thinking?
2021-06-15 15:26:43 +03:00
George Kiagiadakis
b7294e0695
coverity: use a regexp that nukes all the glib enumerator deprecation macros
...
coverity can't cope with enum declarations like:
G_ENUM_FOO GLIB_DEPRECATED_ENUMERATOR_IN_2_26 = N,
... so make sure all these are removed
2021-06-15 15:03:09 +03:00
George Kiagiadakis
41d8610a40
ci: disable more things from the pipewire build
2021-06-15 13:29:24 +03:00
George Kiagiadakis
95c8f0ec48
ci: add support for coverity, based on pipewire's gitlab-ci.yml
2021-06-15 12:30:21 +03:00
George Kiagiadakis
863c2d496a
meson: bump glib requirement to 2.62 as we are already using 2.62 API
2021-06-15 12:04:08 +03:00
George Kiagiadakis
6c592f3322
meson: add glib version required/allowed checks
2021-06-15 12:00:43 +03:00
George Kiagiadakis
4af7e2bd68
release 0.4.0
2021-06-10 19:42:04 +03:00
George Kiagiadakis
950c358180
create-item: handle all kinds of Audio/Video & Stream nodes
...
And be careful not to handle nodes created by si-audio-endpoint,
by using a specific property for that.
Also, use Audio/{Source,Sink}/Virtual as the media class of null sinks
created by si-audio-endpoint, it sounds more appropriate.
Fixes #34
2021-06-10 16:41:01 +03:00
George Kiagiadakis
558ab50367
si-standard-link: treat endpoints as devices when linking stream<->endpoint
...
This avoids reconfiguring endpoint nodes when re-linking streams
to their endpoint after having been corked by the policy.
This is not ideal, the logic here needs some refinement.
2021-06-10 14:53:09 +03:00
George Kiagiadakis
cead4dffb8
config: document the duck.level policy property
2021-06-10 14:53:09 +03:00
George Kiagiadakis
4cdfeb9c32
scripts: change debug level for some messages
2021-06-10 14:53:08 +03:00
George Kiagiadakis
2668900e18
lua: improve the object:activate() callback to report errors
...
There is now a second param to the callback that is an error string,
if any error happened
2021-06-10 14:53:08 +03:00
George Kiagiadakis
801ac7aa1a
wplua: add a wplua_checkclosure() helper function
2021-06-10 14:53:08 +03:00
George Kiagiadakis
b6a5750595
Revert "tests: enable G_SLICE=debug-blocks in all tests"
...
This breaks the valgrind test setup, as this G_SLICE overrides
G_SLICE=always-malloc from valgrind_env
This reverts commit a0d0069f18 .
2021-06-10 14:52:30 +03:00
George Kiagiadakis
606a9765d6
meson: add '--keep-debuginfo=yes' to the valgrind command line
...
ensures that we get debug symbols from modules printed correctly
2021-06-09 15:43:08 +03:00