Commit graph

2294 commits

Author SHA1 Message Date
Wim Taymans
9785d99821 monitor: Remove monitor event
Remove the monitor event and emit events with structures like we do
for the devices.
2019-05-30 12:51:12 +02:00
Wim Taymans
3780bd1b30 spa: use core to load spa_handle 2019-05-29 17:53:25 +02:00
Wim Taymans
165f3e06ad client-device: add missing file 2019-05-29 17:01:21 +02:00
George Kiagiadakis
0b4f56a586 spa/include: install missing headers 2019-05-29 11:58:39 +02:00
Wim Taymans
32ee1f045d client-device: directly map resource to spa_device
The resource is an implementation of a spa_device with remote methods
so we directly use this as a device implementation.
2019-05-29 11:24:47 +02:00
Wim Taymans
e9ecc47696 clean up proxy and resource api
Remove override for resources, it can't work in general.
Rename method to add_object_listener to add a listener for
events/methods from the remote object.
Rename some methods to _call to call the interface and _notify
to notify the listeners.
Remove unused client event to be notified of resource
implementations.
2019-05-29 10:39:24 +02:00
Wim Taymans
b1ea91fa1d client-device: fix cleanup 2019-05-28 17:23:52 +02:00
Wim Taymans
4754335d31 alsa: activate On profile 2019-05-28 14:13:41 +02:00
Wim Taymans
7ef99b8edb examples: add export-spa-device example 2019-05-28 14:07:22 +02:00
Wim Taymans
67a1d317c4 client-device: add client device
Make it possible to implement a device out-of-process
2019-05-28 14:04:58 +02:00
Wim Taymans
504b2da72b device: handle async implementations 2019-05-28 14:02:14 +02:00
Wim Taymans
bf677d55da spa: implement node sync 2019-05-28 14:01:18 +02:00
Wim Taymans
9420497dd9 alsa: profile 0 is Off 2019-05-28 14:00:31 +02:00
Wim Taymans
857b2a0cfb spa: add result type
We need this to know the type of result, especially when serializing.
2019-05-28 13:59:48 +02:00
Wim Taymans
c767ce62c9 device: add sync operation 2019-05-28 13:55:36 +02:00
Wim Taymans
7d1a833b82 add index of method, event and callback defines 2019-05-28 13:53:07 +02:00
Wim Taymans
5299677f88 add const to spa_event and spa_command 2019-05-28 13:51:12 +02:00
Wim Taymans
4661ee882c spa-monitor: remove device when destroyed
Remove the device from our list when it got destroyed.
2019-05-27 16:02:36 +02:00
Wim Taymans
973a92b49d device: add free signal 2019-05-27 15:58:50 +02:00
Wim Taymans
891bb49dfb core: fix destroy order
Improve destroy order, destroy children before parents.
2019-05-27 15:37:01 +02:00
Wim Taymans
c44d655516 v4l2: use 32 buffers max
We don't yet probe the number of available buffers and so we might claim
to support 64 buffers but then fail to allocate that many buffers in
_use_buffers().
2019-05-27 15:35:20 +02:00
Wim Taymans
5b3336ce3e device: fix event signal 2019-05-27 15:34:48 +02:00
Wim Taymans
51d1569114 stream: fix internal method call 2019-05-24 17:16:25 +02:00
Wim Taymans
428cb5de75 port: ignore not implemented mixer methods 2019-05-24 16:50:48 +02:00
Wim Taymans
a680f434d2 port: use right properties
Use format.dsp as a key to mark the dsp format on a port
Use audio.channel as the key to set the audio channel on a port
2019-05-24 16:14:19 +02:00
Wim Taymans
3ad73f0532 keys: add keys.h with defines and docs
Add a keys.h file that lists and documents all keys available to
be used in properties.
2019-05-24 15:47:48 +02:00
Wim Taymans
7bb6515800 loop: cleanups 2019-05-23 15:11:49 +02:00
Wim Taymans
ff946e3d4b interface: add an interface struct
The interface struct has the type,version and methods of the
interface.
Make spa interfaces extend from spa_interface and make a
separate structure for the methods.
Pass a generic void* as the first argument of methods, like
we don in PipeWire.
Bundle the methods + implementation in a versioned inteface
and use that to invoke methods. This way we can do version
checks on the methods.
Make resource and proxy interfaces that we can can call. We
can then make the core interfaces independent on proxy/resource and
hide them in the lower layers.
Add add_listener method to methods of core interfaces, just
like SPA.
2019-05-23 12:59:24 +02:00
Wim Taymans
eb6481efb3 fmtconvert: also return all formats when not negotiated
Also return all possible formats if the other port was not
negotiated.
2019-05-23 10:27:54 +02:00
Wim Taymans
78fbcca660 alsa: handle alsa-lib 1.1.9
alsa-lib 1.1.9 removed /usr/include/alsa from the include path, we
must include <alsa/asoundlib.h>
2019-05-23 10:15:49 +02:00
Michael Olbrich
c79a30bd8a gstpipewiresrc: clear timestamps when processing a buffer
This is necessary for 'do-timestamp' to work if the source provides no
timestamps. Without this, the timestamp from the first use will remain,
because the basesrc only overwrites timestamps that are
GST_CLOCK_TIME_NONE.
2019-05-23 10:15:43 +02:00
Thomas Zimmermann
10ec285911 meson.build: Test for ptrdiff_t in <stddef.h>
The build scripts assumed ptrdiff_t to just be around by default. But POSIX
specifies ptrdiff_t to be defined in <stddef.h>, which is now included from
the test.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:15:35 +02:00
Thomas Zimmermann
83d1e37e2c autogen.sh: Immediately fail on command errors
If a command fails, there's no point in continuing with configuring
the project. Exit immediately.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:15:14 +02:00
Thomas Zimmermann
ff44d57426 autogen.sh: Check for meson
If meson is not installed, at least an error message should be printed.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:14:35 +02:00
Thomas Zimmermann
7af045cf93 autogen.sh: Put meson arguments right after command name
According to the meson man page, arguments go directly after the command's
name. Rearrange the call accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:14:10 +02:00
Thomas Zimmermann
5f5403ff75 autogen.sh: Replace symbolic link to Makefile
The autogen.sh script creates a symbolic link to the build/Makfile. If
the link already exists, a warning is printed and the old link persists.
Now replace it with the correct target.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:13:59 +02:00
Thomas Zimmermann
21cd78fe9e autogen.sh: Reuse existing build directory
Removing the build directory might delete important development files
as well.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2019-05-23 10:13:50 +02:00
Wim Taymans
e20857ccd1 destroy resources first, then the global
The clients see the proxy disappear before the global is removed.
2019-05-23 10:11:56 +02:00
Wim Taymans
f57a806cf8 Return -EEXIST when registering an object twice 2019-05-23 10:00:23 +02:00
Wim Taymans
fbf6acd271 list: use spa_list_consume some more
If we know the item is removed in each iteration, _consume can handle
deletion of any item while being iterated.
2019-05-23 09:56:02 +02:00
Wim Taymans
58fa5561b8 interface: get_registry always returns a Registry type 2019-05-21 15:46:31 +02:00
Wim Taymans
a564d9f3f1 Move implementation helpers to utils 2019-05-20 10:14:00 +02:00
Wim Taymans
b195a25636 pipewire: only load spa_handle
Only provide a method to load a spa_handle, getting the interface
from that is easy and we only use refcounting on the handle.
2019-05-20 09:49:39 +02:00
Wim Taymans
da9f0ed160 core: simply load the dbus interface in core 2019-05-17 17:33:15 +02:00
Michael Olbrich
4be788962e core: fix pw_core_find_format() for active ports
pw_core_find_format() is currently broken when one of the ports is already
active: The format of the active port is used and the other port is
completely ignored.
As a result, the autolink module may try to link a new port to the first
already active port even if the formats do not match.

To fix this, use the format of the active port as a filter and enumerate
the formats of the other port.
2019-05-17 12:52:18 +02:00
Jonas Ådahl
b1c193346e pipewire/node: Pass along 'media.role' node property too 2019-05-17 12:42:45 +02:00
Wim Taymans
51e900c9d3 Remove libv4l2 dependency
It's not used anywhere right now.
2019-05-17 12:41:57 +02:00
Wim Taymans
3cb400bb61 audioconvert: don't use range
Use the spa_io_position->size to decide how many samples to output
from the resampler.
2019-05-17 10:31:20 +02:00
Wim Taymans
4ae771ccc1 a2dp: also acquire when the state is pending 2019-05-16 16:43:35 +02:00
Wim Taymans
e009fead09 io: remove unused range 2019-05-16 16:42:49 +02:00