Commit graph

3989 commits

Author SHA1 Message Date
Wim Taymans
197ffe32ba Makefile: set VALGRIND variable in valgrind 2020-06-04 10:09:35 +02:00
Wim Taymans
325280cbda core: run extra step to warn/destroy leaked proxies
Don't set the core to NULL in _remove so that the proxies
will be removed from the map when they are destroyed. Then make
another run over the map to warn about the proxies that were not
destroyed.
2020-06-03 16:54:46 +02:00
Wim Taymans
3060c57ba6 examples: add cleanup 2020-06-03 16:51:17 +02:00
Wim Taymans
6d0fd7b58c remote-node: run _destroy in the _removed handler 2020-06-03 15:42:45 +02:00
Wim Taymans
a7225090c8 core: improve cleanup
When the core is disconnected, first do _remove on all active
proxies and then run the _destroy handles. This makes it easier
to clean up dependent resources.

Remove the modules after removing all objects. It's harder for
 odules to track and remove all objects.
2020-06-03 15:38:13 +02:00
Wim Taymans
4405fe4c14 remote-node: handle deleted client-node 2020-06-03 15:28:28 +02:00
Wim Taymans
6b313de2ae examples: catch signal and clean up 2020-06-03 15:26:54 +02:00
Wim Taymans
702976ab9c context: avoid adding duplicate export types 2020-06-03 13:01:32 +02:00
Wim Taymans
8d0913c9d8 examples: add audio DSP source 2020-06-03 12:06:44 +02:00
Wim Taymans
baf3b0a27e pw-cat: zero out info 2020-06-03 12:06:14 +02:00
Wim Taymans
913ad43432 filter: free ports as well 2020-06-03 12:05:00 +02:00
Wim Taymans
b4b7ba4cbb remote-node: suspend node before cleanup
When the proxy is destroyed, suspend the node before we start
removing the memory or else the node might still be using it from
the data thread and crash.
2020-06-03 12:04:01 +02:00
Wim Taymans
e4e03fa7dd media-session: always activate DSP nodes
They don't need to be activated with a profile.
2020-06-03 12:03:20 +02:00
Wim Taymans
94cbb54517 stream: rename variable 2020-06-03 11:08:35 +02:00
Wim Taymans
203c89daaf pw-cat: cleanup registry proxy 2020-06-02 18:16:58 +02:00
Wim Taymans
3890f06c83 stream: let the node_destroy() destroy the proxy as well 2020-06-02 18:16:58 +02:00
Wim Taymans
3d22baab84 node: suspend before emiting destroy
The suspend makes sure no processing is going to be happening
while the signal could destroy resources.
2020-06-02 18:16:58 +02:00
George Kiagiadakis
17d7cdc80e spa-node-factory: cleanup node when binding the client resource fails 2020-06-02 15:47:06 +00:00
George Kiagiadakis
16c1a7fe33 spa-device-factory: destroy device when the creator resource is destroyed 2020-06-02 15:47:06 +00:00
Wim Taymans
0471ba7fba Add pw_in_valgrind() to check running in valgrind
In valgrind we don't want to unload the plugins because then valgrind
doesn't know the symbol names where things leaked.
Parse the VALGRIND env variable and use this to avoid calling
dlclose for a better valgrind experience.
2020-06-02 17:38:07 +02:00
Wim Taymans
fda9e4d5c8 call _deinit(() in session manager exit 2020-06-02 17:37:45 +02:00
Wim Taymans
00d61d958e add pw_deinit() to cleanup resources
Add and use pw_deinit() to avoid leaking the support plugins and
use this in the main daemon. Makes valgrind output better.
2020-06-02 17:16:46 +02:00
Wim Taymans
09913ca4ab metadata: free when the global is destroyed 2020-06-02 17:16:09 +02:00
Wim Taymans
4dfd60f838 add some more debug 2020-06-02 17:15:47 +02:00
Wim Taymans
c4b87aa5e2 audioadapter: clear convert handle to avoid leaks 2020-06-02 17:14:23 +02:00
Wim Taymans
7d88c37e5b alsa-seq: clear the midi event queue on close to avoid leak 2020-06-02 17:13:53 +02:00
Wim Taymans
d2bd076a97 alsa: close output handler to avoid a leak 2020-06-02 17:13:26 +02:00
Wim Taymans
4060934109 client-node: keep track of the client allocated fd
when we get port_buffers with memory from the client, store this
in the buffer data and make sure we close the fd when the buffers
are removed.
2020-06-02 15:19:39 +02:00
Wim Taymans
c04a9b546d client-node: refuse the wrong amount of client buffers
Make sure we get the same amount of buffers from the client as
we asked to allocate.
2020-06-02 15:18:18 +02:00
Wim Taymans
bb1cb530fc add more debug of fd create and close 2020-06-02 14:06:51 +02:00
Wim Taymans
803c2860ed mem: add flag to suppress notify 2020-06-02 14:05:57 +02:00
George Kiagiadakis
6ecbe00774 session-manager: emit cached info with CHANGE_MASK_ALL on new resources 2020-06-01 16:25:40 +00:00
George Kiagiadakis
1eec6c3588 session-manager: do not copy stream link params if they are NULL
this field is actually unused at the moment, so it's always NULL
2020-06-01 16:25:40 +00:00
Wim Taymans
6aeaebe2b0 mem: Clean up stray mappings
Warn when some mappings were not freed when freeing all the blocks
and memmaps. Clean them anyway to avoid leaks.
2020-06-01 18:18:13 +02:00
Wim Taymans
4796673581 mem: Improve search for existing mapping
When we search for an exaisting mapping, anything that contains
the offset+size range is ok, not just the larger mmapped area.

This fixes a leak where the imported block mapping was not used
and leaked.
2020-06-01 18:16:13 +02:00
Wim Taymans
34dada9c4c media-session: install ctrl-C handler
..so that we can clean up.
2020-06-01 18:14:53 +02:00
Wim Taymans
1246116f06 bluez: free object path 2020-06-01 15:37:57 +02:00
Wim Taymans
fbaa4ddedd stream: allow NULL param and 0 buffers in disconnect
When we are disconnecting, cleanup code might clear the params
and buffers, make sure we allow this to happen and the call the
right callbacks.
2020-06-01 15:36:09 +02:00
Wim Taymans
7f60ebff27 logger: handle file without '/' in it 2020-05-29 20:32:55 +02:00
Wim Taymans
bf483242eb alsa-monitor: don't use NULL device reserve 2020-05-28 18:03:27 +02:00
Wim Taymans
871bb47eb7 gst: handle pause/resume 2020-05-21 12:26:39 +02:00
Wim Taymans
6eba010d38 gst: do a sync before disconnect
This makes sure we first nicely remove the stream from the server
and then close the socket.

If we don't do this, the disconnect might not have flushed out our
disconnect and the server is left with a non-responsive node,
especially if the disconnect on the core was done with a socket from
the portal that is still open.
2020-05-21 12:26:37 +02:00
Wim Taymans
48dea3d5ea gst: handle stream create error 2020-05-21 12:26:32 +02:00
Wim Taymans
c546167ad3 require meson 0.49 2020-05-20 15:26:35 +02:00
Wim Taymans
9fa68f6d46 neon: use regular registers only 2020-05-20 15:24:25 +02:00
Wim Taymans
60742d7542 pw-cli: allocate nodes ids of the right size 2020-05-20 15:24:25 +02:00
Wim Taymans
08ffc507c0 midifile: fix CLAMP range of minor/mayor keys 2020-05-20 15:24:25 +02:00
Wim Taymans
6a689b3c7f client-node: don't ref destroyed resource
Ownership of the node_resource is taken by _new() and freed.
Don't try to use it afterwards to send an error when something
goes wrong but use the original resource.
2020-05-20 15:24:25 +02:00
Wim Taymans
963b00b77b adapter: return an error when we can't find a format 2020-05-20 15:24:25 +02:00
Wim Taymans
d31c057b42 Remove some useless checks 2020-05-20 15:24:25 +02:00