Commit graph

94 commits

Author SHA1 Message Date
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
698ab911c3 loop: pass spa_dict to *_loop_new
Make the thread_loop alloc its own loop by default to simplify
some core. Add extra new_full method to pass a custom pw_loop.
Make other loop implementations ready to support custom loops
if we want that later.
2019-12-13 11:34:25 +01:00
Wim Taymans
9b53c65c72 pw_endpoint_proxy -> pw_endpoint 2019-12-11 16:43:53 +01:00
Wim Taymans
beb3c69dfe pw_node_proxy -> pw_node 2019-12-11 15:26:11 +01:00
Wim Taymans
199fa47216 pw_module_proxy -> pw_module 2019-12-11 15:16:30 +01:00
Wim Taymans
f1eb5f6046 pw_device_proxy -> pw_device 2019-12-11 15:00:41 +01:00
Wim Taymans
a8f1d756c3 pw_client_proxy -> pw_client 2019-12-11 14:53:39 +01:00
Wim Taymans
aa378417c2 interfaces: move proxy API into their own header files 2019-12-11 14:44:59 +01:00
Wim Taymans
49d736bbb7 pw_registry_proxy -> pw_registry 2019-12-11 09:44:48 +01:00
Wim Taymans
ecc6b27cd7 rename core_proxy -> core
Rename core_proxy to core and move the introspect and interface
contents to core.h

In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans
8ea78c2e3f pw_core -> pw_context
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.

The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
cfeb724d58 pulse: don't add listener when connection failed 2019-12-06 22:27:27 +01:00
Wim Taymans
d677aeeeca stream: remove our ref to the stream on destroy 2019-12-06 22:18:01 +01:00
Wim Taymans
8a959ea7a1 core_proxy: prepare to rename pw_remote -> pw_core_proxy
The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.

With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.

This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
2019-12-06 11:48:40 +01:00
Wim Taymans
b0932e687f pulse: avoid errors with const 2019-12-05 10:35:07 +01:00
Wim Taymans
2fddfb02bd pulse: map stream index to endpoint 2019-11-29 13:34:09 +01:00
Wim Taymans
b7aa8f5c85 media-session: subscribe to params when needed
Subscribe to params and collect them.
2019-11-29 13:34:08 +01:00
Wim Taymans
b432bda109 pulse: use monitor endpoints as monitor 2019-11-29 13:34:08 +01:00
Wim Taymans
f2ce69c4bd media-session: pass the client.id in the endpoint
Pass the client.id that we made this endpoint for in the endpoint
properties. This makes it possible to let pulse find the client
that belongs to the endpiont. The client.id is used to find the
client that actually made the object (the session manager)
2019-11-29 13:34:08 +01:00
Wim Taymans
b518496136 pulse: only find linked source or sink endpoints 2019-11-29 13:34:08 +01:00
Wim Taymans
8c43ebaf3e pulse: find linked endpoints
Set the stream node object-id as the node.id on the endpoint so that
the pulse api can find the linked endpoint.
2019-11-29 13:34:08 +01:00
Wim Taymans
3f3dfbc67e More session manager work
pulseaudio card is mapped to device
pulseaudio sink/source is mapped to an endpoint
prepare to map streams to card profiles
Add Route param to implement the endpoint routing later (ports)
Create an alsa endpoint for each device
Create one stream for each endpoint (Playback/Capture)

Implement create_link on the endpoint. The idea is to call
create link on the peer endpoint to complete the link. Remove
create_link on the session.

Add stream-monitor to turn pw_stream nodes into endpoints

Add a policy manager that tries to link endpoints

Use enum pw_direction for the endpoint direction. We can use the
media_class to determine if this is a pw_stream or not but it should
not really matter, you can link any output to any input.

Add autoconnect property for endpoints to make the policy connect.
2019-11-29 13:34:07 +01:00
Wim Taymans
edd011605d use endpoint in pulse 2019-11-29 13:34:07 +01:00
Wim Taymans
738603fd04 stream: Align with pw_filter
Remove some of the unused states in pw_stream. The app can know the
state by following the format and buffer events.

Make it possible to be notified of io are updates. This should make it
possible to follow the transport etc.

Make it possible to be notified of any param changes.

Rename finish_format to update_params because that is what it does.
Make this work in the same was as the filter: updating the params
removes all old params of the types and installs the new ones.

Don't get the Props and PropInfo from the node proxy, instead get them
directly from the adapter that we have locally. Update the controls
directly on the adapter instead of going to the server first.
2019-11-21 16:14:50 +01:00
Wim Taymans
f918fa874f Update README.md 2019-11-07 15:46:04 +00:00
Wim Taymans
8bbfe876a7 Revert "WIP use endpoint in pulse"
This reverts commit 7a4a8d78b9.
2019-11-07 11:45:16 +01:00
Wim Taymans
7a4a8d78b9 WIP use endpoint in pulse 2019-11-06 11:34:14 +01:00
Wim Taymans
29254b688a pulse: fix list_prev 2019-11-04 17:30:33 +01:00
Arun Raghavan
37a72b2531 Merge pipewire-pulseaudio subtree 2019-11-03 15:20:57 +01:00
Arun Raghavan
59bdab94bc Drop git submodule structure
The workflow is getting a little messy with these, so we're just going
to merge those repositories in.
2019-11-03 15:19:43 +01:00
Wim Taymans
0a81a982f7 metadata: Add metadata API
Metadata allows apps to attach properties to objects that can be
read by other apps.
Not complete yet, properties should be removed when the object is
removed.
2019-11-03 10:31:14 +01:00
Wim Taymans
9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans
6e0ffb0c47 flags: change flag macros
SPA_FLAG_CHECK -> SPA_FLAG_IS_SET
SPA_FLAG_UNSET -> SPA_FLAG_CLEAR
Add SPA_FLAG_UPDATE
2019-10-02 18:00:42 +02:00
Wim Taymans
50fc65a07e pulseaudio: update 2019-09-27 09:50:24 +02:00
Wim Taymans
8db4a797aa core: remove parent_id from the global event
Remove the parent_id from the global event. Remove the parent
and owner from the global object.

Use properties instead to mark parents and owners of objects.

Properties are easier to control for client exported objects and
usually a simple parent/child is not enough. For example, a client
exported node has the client as a parent but also the factory that
created the node.
2019-08-16 22:11:42 +02:00
Wim Taymans
9807e7fdab pulse: sync 2019-08-16 15:23:35 +02:00
Wim Taymans
23812807ad pulse: update module 2019-08-13 18:48:05 +02:00
Wim Taymans
c6a7b3eedb channelmix: implement per channel volume
Implement per channel volume on channelmix. Extend control on stream to
take an array of values when possible.

Remove name argument from pw_node_new and pw_device_new. We can pass
this as a property instead.

Improve properties on nodes to more closely match what pulseaudio does.
Don't let the monitor do too much with the udev properties but let the
session manager set the description and icon-names.

Remove some change_mask flags for things that don't change in
introspect. Use the flags to mark changes in -cli and -monitor.
2019-08-12 15:14:39 +02:00
Wim Taymans
461da71ae3 pulse: update submodule 2019-07-16 18:54:06 +02:00
Wim Taymans
f8127943cd pulse: update 2019-07-11 11:29:35 +02:00
Wim Taymans
94e7be1845 media-session: use adapter around sink
Don't use the DSP nodes anymore, use the adapter instead and wrap
it around a sink/source.
2019-07-02 17:39:04 +02:00
Wim Taymans
497a8364c5 printf format fixes 2019-06-07 17:16:02 +02:00
Wim Taymans
db88e9f954 System: More work on making system functions pluggable
Move the epoll functions to the system functions and make the loop
use those. Use simple mask for events instead of enum.
Add the used system api in pw_loop.
Add System API to spa_support and use it where possible.
Pass the system API used in the realtime loops in spa_support as
well and use this in the realtime paths.
Improve bootstrapping, load only the log and cpu interfaces because
those can/need to be shared between instances. Let the core load
the other interfaces.
Add keys to configure the System and Loop implementations used in
pw_loop.
2019-06-06 15:31:53 +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
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
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
58fa5561b8 interface: get_registry always returns a Registry type 2019-05-21 15:46:31 +02:00
Wim Taymans
dcddd5080b submodule update 2019-04-23 17:42:55 +02:00
Wim Taymans
01604e4495 submodule update 2019-04-17 15:25:31 +02:00