Commit graph

3200 commits

Author SHA1 Message Date
Wim Taymans
4aff470a8f Release 0.2.6 2019-05-22 11:44:12 +02:00
Michael Olbrich
85e2eba941 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-22 10:51:04 +02:00
Thomas Zimmermann
cc5a155c9b 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-22 10:19:58 +02:00
Thomas Zimmermann
59fa57f2a3 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-22 10:19:58 +02:00
Thomas Zimmermann
768b082834 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-22 10:19:58 +02:00
Thomas Zimmermann
62afada593 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-22 10:19:58 +02:00
Thomas Zimmermann
352b04ba21 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-22 10:19:58 +02:00
Thomas Zimmermann
473fb330cf 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-22 10:19:58 +02:00
Wim Taymans
0951a97a36 destroy resources first, then the global 2019-05-22 10:09:48 +02:00
Wim Taymans
c67f903c61 Return -EEXIST when registering an object twice 2019-05-22 10:09:12 +02:00
Wim Taymans
92808809ec client-node: don't destroy the resource from its event
Do no destroy the resource from within the event handler
2019-05-22 10:05:24 +02:00
Wim Taymans
b700d76ff4 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-21 17:11:27 +02:00
Michael Olbrich
6b269cce35 node: use spa_list_for_each_safe() for pw_node_events_*
Introduce spa_hook_list_call_simple_safe() as a new helper that uses
spa_list_for_each_safe() and use it for pw_node_events_* This way multiple
threads can iterate at the same time and, if only one thread is active, the
current list entry can be safely removed (e.g. in
pw_node_events_destroy()).

Without this the node listener_list may be corrupted when the main and data
loop iterate over the list at the same time (See #143).
2019-05-21 17:10:09 +02:00
Wim Taymans
58fa5561b8 interface: get_registry always returns a Registry type 2019-05-21 15:46:31 +02:00
Wim Taymans
a1a5ae1d68 update for new API 2019-05-21 15:36:44 +02:00
Wim Taymans
640a50091e jack: update for new API 2019-05-21 15:36:25 +02:00
Jonas Ådahl
323917ab4b module-portal: Handle no app_id being set
Avoid crashing if the portal would for whatever reason fail to set this.
2019-05-20 16:10:12 +02:00
Jonas Ådahl
55eadd6c4c module-portal: Ignore if pipewire.access.portal.is_portal is "yes"
This is for the remotes that the portal itself owns, such as ones that
track the number of cameras.
2019-05-20 16:10:12 +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
abaf40ba8b core: small cleanup in _find_format() 2019-05-17 12:37:25 +02:00
Michael Olbrich
1c8daa4a50 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:23:49 +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
Jonas Ådahl
777b97b7d8 module-portal: Use permission store for portal initiated clients
Detect what clients were started by the portal, and use the permission
store to determine permissions of existing and future nodes.

Clients are detected whether they are from the portal or not by
comparing the PID of the client with the PID of the owner of the
portal D-Bus name.

It is assumed that the portal will set an appropriate app_id, and a
comma seperated list of media roles (e.g. "Camera"), that should be
queried. If app_id is an empty string, it's assumed to be a
non-sandboxed client, and permissions are assumed to be allowing.
2019-05-16 18:07:52 +02:00
Jonas Ådahl
31145b58dc Rename module-flatpak module-portal
It'll use the portal and permission store explicitly, and nothing
particularly flatpak specific.
2019-05-16 18:07:52 +02:00
Jonas Ådahl
3ce0c4b81a pipewire/node: Pass along 'media.role' node property too 2019-05-16 18:07:52 +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
Wim Taymans
6cfddde39c bluez: fix a2dp source
Actually compile the codec config and declare the config as extern
or else it's just all 0.
Only acquire the transport when ACTIVE.
Implement transport state_change signal and acquire the transport
when going to pending/active.
Try to acquire the transport before we expose the device if we
can.
Force device expose when we get the device ServicesResolved=1 property
update.
Free transport when the rfcomm is closed.
Implement various DBus signals to detect dynamic property updates.
2019-05-16 13:18:45 +02:00
Wim Taymans
c348790ca1 map: handle more error cases 2019-05-15 15:19:25 +02:00
Wim Taymans
448c1937ad hook: separate spa_callbacks from the hook
Make a spa_callbacks with just the functions and data and use this
in the hook and objects.
2019-05-15 12:17:52 +02:00
Wim Taymans
6ee192dff5 hooks: use hook to implement the callbacks
This way we get the version check implemented and save some
code.
2019-05-15 11:19:23 +02:00
Wim Taymans
a78617c6a8 a2dp: cleanups 2019-05-15 10:20:28 +02:00
Wim Taymans
f6ace8a000 a2dp: add events and implementation
Use hooks for the implementation of the transport
Add events to the transport
Handle the destroy event of the transport to release the reference
in source and sink.
2019-05-14 18:10:18 +02:00
Wim Taymans
903cbeb7c1 hook: handle port and factory implementation with hook
This way we can also handle the version number.
2019-05-14 18:08:02 +02:00
Wim Taymans
23d4ed62dd device: rename internal variable for consistency with node 2019-05-14 18:06:48 +02:00
Wim Taymans
5858c992ef audioconvert: improve debug 2019-05-14 18:05:51 +02:00
Wim Taymans
e6c42d3324 hook: add option to call hook with return value 2019-05-14 18:04:34 +02:00
Michael Olbrich
5f507c804f remove libv4l2 dependency
It's not used anywhere right now.
2019-05-14 13:21:53 +02:00
Julian Bouzas
674f3e197e bluez5: add a2dp-source plugin 2019-05-14 13:02:55 +02:00
Wim Taymans
29164a0f54 link: remove error from method
We return a reason in errno
2019-05-14 12:59:18 +02:00
Wim Taymans
2889db8efb link: listen to permission changes on the ports
If one of the ports becomes invisible to a client, hide the link.
If one of the ports is owned by a client and the peer port becomes
invisible for the client, destroy the link.
2019-05-14 12:09:34 +02:00
Wim Taymans
d7c7e9bf6f global: update child permissions
When the permissions of a global change, update the child permissions
as well.
2019-05-14 12:08:35 +02:00
Wim Taymans
d39d15b0d9 global: keep track of child globals
Keep track of the child globals and unregister when the parent
is unregistered.
2019-05-14 12:07:30 +02:00
Wim Taymans
b474666e2e link: listen for permission changes
Destroy the link when the ports or nodes are no longer visible
to the other side of the link.
2019-05-13 18:03:27 +02:00
Wim Taymans
a224234acd global: don't follow NULL parent 2019-05-13 18:00:50 +02:00