Wim Taymans
21fc163c49
stream: fix some more leaks in error paths
2020-07-02 16:22:49 +02:00
Wim Taymans
f353042460
client: send an error to all bound resources
...
When we need to send an error to a global, send the error to
all resources bound to that global. This can also be resources
that implement the global (like client-node)
2020-07-02 15:39:23 +02:00
Wim Taymans
d3ab5bc3b8
stream: only unconnect when core unconnects
...
Ignore all other core errors, only make the stream unconnected
when the core is unconnected.
2020-07-02 15:39:15 +02:00
Wim Taymans
82a83afd6b
policy: activate Unknown stream media type
...
And try to link them using the media.type property
2020-07-02 15:39:11 +02:00
Wim Taymans
9eb9fe4fbe
stream: handle missing EnumFormat params
...
When we don't have an EnumFormat param, don't fail but fall back to
the MEDIA_TYPE property to calculate the media class.
Fixes things like:
gst-launch-1.0 -v pipewiresrc stream-properties="props,media.type=Video" ! fakesink
2020-07-02 12:56:26 +02:00
Wim Taymans
fc49c1697a
context: improve negotiation
...
When a port doesn't implement the EnumFormat param, use NULL as
the filter or the filter as the result.
2020-07-02 12:55:39 +02:00
Wim Taymans
591244c53e
module-device: remove useless assign
2020-07-02 10:58:35 +02:00
Wim Taymans
3df8139f4e
spa-node: unload handle in failure case
2020-07-02 10:57:10 +02:00
Wim Taymans
d871adbd4d
spa-device: fix leak of properties in error case
2020-07-02 10:52:15 +02:00
Wim Taymans
dfd3bd84b4
buffers: increase max datas and metadata in buffers
2020-07-01 11:43:18 +02:00
Wim Taymans
f678f4371d
state: always update state variables
...
Or else we might leak the error string.
2020-06-29 10:03:58 +02:00
Wim Taymans
65f961fca0
impl-device: don't warn for unknown node id
...
Just debug the node id and remove it when known. It's possible that
no node was created for the id because it did not have a factory.
2020-06-24 12:52:50 +02:00
Wim Taymans
cb1a2ed769
midifile: check return of write and fail on error
2020-06-23 15:26:23 +02:00
Wim Taymans
29282b8d50
module-device: remove impossible case
2020-06-23 15:26:04 +02:00
Wim Taymans
f08c35259c
avoid uninitialized variables
2020-06-23 15:25:27 +02:00
Wim Taymans
95192b21f1
mem: reset the map in clear
...
Or else the free list is not cleared.
2020-06-19 16:58:22 +02:00
Wim Taymans
f78e44c28a
impl-core: clear the mempool
...
When a client sends hello, clear the mempool again to make sure
it get's the new memory.
2020-06-19 15:20:50 +02:00
Wim Taymans
93e04aebce
example: add example of renegotiation
...
Add an example of renegotiating a producer and consumer format.
2020-06-19 12:17:47 +02:00
Wim Taymans
0dad6c5852
impl-link: start of renegotiation
...
Handle an EnumFormat param change on the link ports and start
the renegotiation process.
2020-06-19 12:14:46 +02:00
Wim Taymans
ebede91239
impl-link: reset state before starting allocation
...
Reset our state before checking the state of the ports or else
we might still think a port has buffers while they are being
allocated.
2020-06-19 12:12:48 +02:00
Wim Taymans
ecead2b7e4
buffer: add more debug
2020-06-18 18:28:13 +02:00
Wim Taymans
8f8083b963
examples: add signal handlers to quit nicely
2020-06-18 15:47:50 +02:00
Wim Taymans
8e366a17ee
port: add param_changed event
2020-06-18 15:47:29 +02:00
Wim Taymans
4c8f8671d7
client-node: improve error reporting
2020-06-18 15:40:53 +02:00
Wim Taymans
108bf82a10
context: improve param debug
...
Make it possible to log more info in the param debug functions
2020-06-18 15:29:21 +02:00
Wim Taymans
6495199a7a
pw-mon: debug param id names
2020-06-18 12:54:17 +02:00
Wim Taymans
6160711723
stream: change serial when the param changed
...
Observers check the flags to see if there is a change. The serial
can be used to toggle a change when no other flags change.
2020-06-18 12:53:23 +02:00
Wim Taymans
8ee91bd738
examples: don't hardcode dimensions for crop info
2020-06-18 11:43:34 +02:00
Wim Taymans
389b4a72f8
context: keep passive links negotiated
...
Always make sure passive links are prepared so we can follow them
and use them to activate nodes.
2020-06-17 14:09:42 +02:00
Wim Taymans
741a2b3dcc
link: variables are already set in update_state
2020-06-17 13:18:52 +02:00
Wim Taymans
16d61e98e8
link: implement passive links again
...
Check if a driver is only connected to other nodes with passive
links, if that's the case, set the driver and all followers in
IDLE.
2020-06-17 12:22:58 +02:00
Wim Taymans
2a11e66417
client-node: clear array fields
2020-06-16 21:22:06 +02:00
Simon McVittie
b852b58f82
Optionally install examples and tests
...
This makes it easier to test PipeWire in its "as-installed" state,
for example in an OS distribution.
The .test metadata files in ${datadir}/installed-tests/${package} are
a convention taken from GNOME's installed-tests initiative, allowing a
generic test-runner like gnome-desktop-testing to discover and run tests
in an automatic way.
The installation path ${libexecdir}/installed-tests/${package} is also
a convention borrowed from GNOME's installed-tests initiative.
In addition to the automated tests, I've installed example executables
in the same place, for manual testing. They could be separated into
a different directory if desired, but they seem like they have more
similarities with the automated tests than differences: both are there
to test that PipeWire works correctly, and neither should be relied on
for production use. Some examples are installed in deeper subdirectories
to avoid name clashes.
Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-16 17:58:02 +00:00
Wim Taymans
3859b14adf
client-node: dynamically allocate the mix structs
2020-06-16 18:21:58 +02:00
Wim Taymans
eac046a86b
client-node: place invalid mix at begin instead of end
...
..so that we can resize the array later.
2020-06-16 17:52:39 +02:00
Wim Taymans
fb1ea646f5
client-node: remove unused field, add some debug
2020-06-16 17:41:54 +02:00
Wim Taymans
cd7a56a71c
gst: fix proxy leaks
2020-06-16 11:02:16 +02:00
Wim Taymans
61c1fe546e
client-node: fix buffer size calculation
...
Calculate the size of the buffer as the difference between the first
byte and the last byte. This takes into account the alignment.
2020-06-15 20:44:08 +02:00
Wim Taymans
fd0ebdd74a
stream: only set MAPPED flag when mmaped
2020-06-15 17:54:37 +02:00
Wim Taymans
4743a423e8
stream: only remove buffer when added
2020-06-15 17:40:29 +02:00
Wim Taymans
8ecae0785b
stream: don't reset flags
...
Or else we lose the MAPPED flag and we don't unmap (not that it's
a problem because it gets unmapped when we close the fd).
2020-06-15 17:39:33 +02:00
Wim Taymans
d3f29f048f
meson: use join_paths to join paths
2020-06-10 13:28:15 +02:00
Wim Taymans
baf11b22d4
meson: use the right config file
2020-06-10 13:24:21 +02:00
Florian Klink
d1162f28ef
pipewire.conf.in: use absolute path to pipewire-media-session
...
So pipewire daemon is able to find pipewire-media-session from the
location it's installed to, even when it's not in $PATH.
For the `pw-ininstalled.sh` and `make run` invocations, provide a
`src/daemon/pipewire-uninstalled.conf` that still uses the relative
path, but isn't installed.
2020-06-10 13:20:25 +02:00
Wim Taymans
014e48c1f1
protocol: add workaround for bad v0 clients
...
Fix up clients that say they have fixed properties while in fact
they are not. Assume that when there are alternatives, the property
was in fact not fixed.
2020-06-09 13:22:07 +02:00
Wim Taymans
62dd58a604
client: remove busy state from client in resource destroy
...
When a resource is doing an operation that sets the client in the busy
state, make sure we unblock the client again when the resource is
destroyed before we could complete the operation or else the client
is stuck forever.
2020-06-09 10:59:58 +02:00
Wim Taymans
f278ded975
example: use thread loop in example
2020-06-08 17:14:36 +02:00
Wim Taymans
180f2b0f20
client-node0: clean up resource
2020-06-08 17:14:36 +02:00
Wim Taymans
d566c8858c
port: don't send reuse_buffer on node again
...
When we get a reuse_buffer on the input mixer we should find the
linked mixer and send the reuse_buffer to that one, not the node
itself.
2020-06-08 14:19:13 +02:00
Wim Taymans
dac60d4e5b
avoid some leaks and NULL pointer derefs
2020-06-08 11:15:53 +02:00