Commit graph

2223 commits

Author SHA1 Message Date
Wim Taymans
8e6b276d51 alsa-monitor: parse device events
Parse the device events and set the Props from the ObjectConfig
as the Props param on the node.
This propagates the software volume from the device to the
node.
2020-07-06 17:26:01 +02:00
Wim Taymans
4db6e0e2b3 client-device: fix event marshall 2020-07-06 17:13:50 +02:00
Wim Taymans
0bbc25e3e2 media-session: add option to enable acp device 2020-07-06 12:51:38 +02:00
Wim Taymans
1612f5e4d2 alsa-acp: Add libacp based card device
libacp is a port and wrapper around the pulseaudio card profile code.
It uses a set of templates for construct a card profile and mixer port
settings. It also has support for UCM when available for the hardware.
2020-07-06 12:20:09 +02:00
Wim Taymans
c28ca320d1 Fix bluez node destroy
We create a ClientNode but monitor the resulting Node.
Destroy the object when removing a node.
2020-07-03 16:28:10 +02:00
Wim Taymans
471c1a071c policy: improve debug 2020-07-03 16:25:28 +02:00
Wim Taymans
a607174033 node: Pause when Suspend is not implemented 2020-07-03 16:24:55 +02:00
Wim Taymans
1e2ad41d94 remote-node: fix user_data
Pass the node_data around instead of the proxy. Get the proxy from
the node data.
Allocate user_data before the node_data so that the caller can
use the proxy user_data without overwriting the node_data.
2020-07-03 15:19:40 +02:00
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