Commit graph

3628 commits

Author SHA1 Message Date
Wim Taymans
2a3bf485e7 pw-dot: rename lightgreen to palegreen
lightgreen does not seem to exist for me as a color, dot complains.
2020-02-20 13:28:34 +01:00
Wim Taymans
d3634aca7e media-session: rework device reservation
Monitor the device reservation objects and mark the device available.
Don't select nodes from devices that are not available.
Acquire the device reservation when a device starts.
Release the device reservation when we suspend the device again.
2020-02-19 18:15:57 +01:00
Wim Taymans
11086f23ea pod: add and use reserve_bytes helper 2020-02-19 11:02:00 +01:00
Wim Taymans
cc1ed84f9f midi: simplify some things 2020-02-19 10:48:16 +01:00
Wim Taymans
7df66cd6ad pw-cat: keep our own time
Don't try to use the time from the io_position, it is updated in
the RT thread and might be slightly wrong for our purposes.
2020-02-19 10:19:59 +01:00
Wim Taymans
ea911f2e3f tweak buffers a little
JACK can handle 2 buffers at most, make the default buffer allocator
allocate 2 buffers when no params are given.
Prefer 2 buffers, it allows some form of async fill/consume
2020-02-19 10:17:00 +01:00
Wim Taymans
ddcb08a98a pw-cat: read midi file from memory
mmap the midi file and read from memory. Simplifies some things and
allows us to potentially parse from the RT thread later.
2020-02-19 09:58:47 +01:00
Wim Taymans
463b9e4e29 buffers: handle -ENOENT
enum_param should return -ENOENT when the param is not known.
When negotiating buffers handle -ENOENT. This means the port does
not know about the property and we should assume anything is fine
so just use the filter from the first port.
2020-02-18 17:34:41 +01:00
Wim Taymans
b6a6d1f0bb pw-cat: fix tempo changes
Use time in seconds as event timestamp.
Apply tempo from the new events, keep track of elapsed time and
time since tempo change to get the right time.
Skip metadata midi in pw-cat.
2020-02-18 16:13:35 +01:00
Wim Taymans
fe616e38d8 pw-cat: add midi support 2020-02-18 13:38:26 +01:00
Wim Taymans
427a6316d3 stream: also call process when queue is empty
When we just picked a buffer from the queue and it is now empty,
call the process method to fill up the queue again or else we
won't have a buffer for the next wakeup.
2020-02-18 13:38:25 +01:00
Wim Taymans
1239009d30 stream: add port properties
Set the port DSP property when dealing with midi.
2020-02-18 10:50:53 +01:00
Wim Taymans
319df9fce9 pw-cat: add option to set resampler quality 2020-02-14 20:34:08 +01:00
Wim Taymans
0a26c478f7 pw-cat: small cleaups
Set endianness correctly
Move setup of output file format outside of sample format function.
2020-02-13 09:51:25 +01:00
Wim Taymans
5e71a01e8d pw-cat: fix setup of defaults
In record mode, setup the parameters before we open.
2020-02-13 08:59:41 +01:00
Wim Taymans
dfdbec1303 node: improve debug of params
List the param id and the name
2020-02-12 17:58:22 +01:00
Wim Taymans
fe85a3b817 pw-cat: refactor a bit
Try to keep the sndfile code in one place
2020-02-12 17:57:42 +01:00
Wim Taymans
e5bdb04b3a pass data around instead of resource
Avoids method calls to get the userdata from a resource
2020-02-12 16:32:55 +01:00
Wim Taymans
b79e63cded device: fix call to enum_params, we need to pass data 2020-02-12 16:29:22 +01:00
Wim Taymans
e72129b9ca device: fix data pointer for subscribe_params 2020-02-12 16:24:31 +01:00
Wim Taymans
495dc7c3af device: implement subscribe_params
Also add subscribe params for the device, like for Node and Port.
2020-02-12 16:07:10 +01:00
Wim Taymans
df65e0bcd3 pw-cat: fix remote name option 2020-02-12 13:39:47 +01:00
Wim Taymans
f726a77385 filter: expose pw_filter_get_name() 2020-02-12 08:57:09 +01:00
Georges Basile Stavracas Neto
4778b5911e pipewire/filter: Remove duplicated function declaration
pw_stream_get_name() is already declared at steam.h, and including
filter.h breaks the build with more strict build flags.
2020-02-11 17:43:45 -03:00
Wim Taymans
c82e38ad35 conf: limit buffers to 16
Old v0 clients can only handle up to 16 buffers. It's unfortunate that
we have to enforce this globally but otherwise it is possible that
a new client allocated more buffers which it then tries to share with
an old client and fail.
2020-02-11 16:03:38 +01:00
Wim Taymans
1a6848801f fix compiler warnings 2020-02-11 15:25:53 +01:00
Wim Taymans
9ce2c6157f client-node: fix v0 data offset
Set the right data offset for v0 clients.
2020-02-11 15:15:20 +01:00
George Kiagiadakis
db734a952d pkgconfig: require libspa on the libpipewire pkgconfig file
pipewire/pipewire.h directly includes spa headers, so libspa
is an implicit dependency that must always be required
2020-02-11 14:01:52 +00:00
Wim Taymans
d52df30c88 pipewireclock: use the monotonic time for now
Don't try to use the ticks for the clock but use the monotonic
timestamp instead.
2020-02-11 13:08:04 +01:00
Wim Taymans
b7f249c389 port: fix compilation 2020-02-11 12:14:23 +01:00
Wim Taymans
cd77ceebbc impl-port: warn and not crash when spa-node has no properties
When a spa-node tells us it has updated properties but then gives
us a NULL pointer, emit a warning instead of crashing.
2020-02-11 12:06:59 +01:00
Wim Taymans
293932d4ec v0: improve compatibility
Implement RequestClockUpdate event and ClockUpdate message for
old clients.
2020-02-11 11:23:28 +01:00
Wim Taymans
c12f2276c4 stream: streams are always live for now. 2020-02-11 11:22:52 +01:00
Wim Taymans
7edd3fb054 typemap: fill out more audio formats 2020-02-10 20:46:18 +01:00
Wim Taymans
eab6dda513 protocol-native: improve v0 compatibility 2020-02-10 18:15:24 +01:00
Wim Taymans
651013bfab Revert "buffers: set stride in buffer data chunks"
This reverts commit b3c4eecea7.

The provider of the buffers should really set the fields in the
chunk such as the offset, size and stride.
2020-02-10 16:55:02 +01:00
Wim Taymans
b3c4eecea7 buffers: set stride in buffer data chunks
v2 clients expect the stride to be set, even when the sender doesn't
set it.
2020-02-10 16:29:23 +01:00
Wim Taymans
56c15ca9e8 connection: improve version check
do the version check on the v2 update_types request or the v3
hello request.
2020-02-10 16:26:24 +01:00
Wim Taymans
d2e7f75071 resource: destroy old core_resource
If there is already a core_resource when we are going to make a new
one, remove the old one. This can happen when there is a version
switch.
2020-02-10 16:22:49 +01:00
Wim Taymans
03844d6c72 rtkit: add parameters for prio and rlimits
Make it possible to configure the prio and rlimits on the
rtkit module.
Set the defaults to the max.
2020-02-10 10:43:31 +01:00
Wim Taymans
40db445f3d rtkit: actually wake up the thread to set rt priority
Wake up the eventfd in the data thread to actually request the
realtime priority.
2020-02-08 22:47:18 +01:00
Wim Taymans
087448ff0f stream: set param id
The param id in the object is used to filter on the server so make
sure it is set in the object correctly.
2020-02-08 21:54:24 +01:00
Wim Taymans
ee67ab9c04 client-node: keep target links in list
Don't allocate the links in an array because they might be moved
when the array is resized. Instead just use calloc and add them
to a list.

Make sure we update the list used in the real-time thread from a
safe context.
2020-02-07 16:45:58 +01:00
Wim Taymans
a1bb1548e6 tests: msg is undefined when _get_next() return != 1 2020-02-07 15:40:28 +01:00
Wim Taymans
4d143c5751 command: fix load-module arguments
Reparse the arguments and pass all the remaining strings after the
module name as one arguments string.
2020-02-07 13:25:19 +01:00
Wim Taymans
88c6db8a82 policy-node: give more priority to newer video output nodes
A slight workaround for old firefox that doesn't specify the target
node, nor the media role when doing screen sharing.
2020-02-06 17:42:52 +01:00
Wim Taymans
3aa8e301c5 protocol-native: implement v2 update_permissions
Convert the old permission update to new permission events.
2020-02-06 16:57:24 +01:00
Wim Taymans
7a395bccaf improve v2 compat mode
Always send the server types when we got the first client types and
don't rely on the message sequence number.
Add some more types in the typemap.
2020-02-06 16:56:19 +01:00
Wim Taymans
b2dfa83052 pw-cat: print channelmap in verbose mode 2020-02-06 16:50:59 +01:00
Wim Taymans
95ecbacfe0 meson: install headers in versioned paths
Make sure all headers and plugins are installed in versioned paths
so that we can parallel install versions if we want.
2020-02-05 16:28:22 +01:00