Commit graph

22 commits

Author SHA1 Message Date
Wim Taymans
b99074879f policy-node: use the daemon samplerate
Use the samplerate of the daemon to configure the nodes.
2020-01-09 15:52:53 +01:00
Wim Taymans
b312e77385 Make simple node policy
Make it possible to run the session manager without endpoint
modules. Add a simple node policy that links nodes.

Move the session-manager implementation and startup of the
endpoint monitors to a separate module.

Handle async set_param on the device
2020-01-07 17:19:09 +01:00
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
147f488514 media-session: improve cleanup 2019-12-18 12:15:03 +01:00
Wim Taymans
05f93cd750 media-session: improve cleanup 2019-12-17 10:47:31 +01:00
Wim Taymans
f06fc5a62b media-session: add sync_update
Add method to only emit the update event when all actions up to
the sync point completed.

Update the available bits on NODES/PORTS/STREAMS/ENDPOINTS
2019-12-16 13:38:16 +01:00
Wim Taymans
1bca1b15ea context: add object store
Add method to set and get typed objects from the context. This can
be used to pass around context objects between modules without having
to register them.
2019-12-16 10:28:18 +01:00
Wim Taymans
1317ca140c pass spa_dict around as config
Don't pass pw_properties around when we simply need to pass around
config info, only use pw_properties when used to construct an object
that keeps the properties.
2019-12-13 11:26:05 +01:00
Wim Taymans
d70a47b7fe move proxy implementations in their own file
Rearrange headers
2019-12-11 10:58:51 +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
125fcb5660 session-manager: remove obsolte _set_id
media-session: Wait for devices to appear and be bound before setting
the profile on the device. Then wait for all the nodes to appear
before attempting the create endpoints on the device.
2019-11-29 13:34:09 +01:00
Wim Taymans
e1ef01c860 alsa-endpoint: move to separate service
Let the session manager monitor device objects as well.

Make the alsa-endpoint monitor a separate service instead of letting
the alsa-monitor call it directly. This means that it listens for
device objects and then tries to configure the endpoints when the
device profile is set to active. This does not work yet because we
can't link the nodes to the device yet because there is no way to know
what the global id is of the device we created.

Make sure implementations of objects run in a separate remote connection
because the main remote connection might block while waiting for a
return value from the implementation.

Trigger an object update after all object info is collected. We do this
by triggering a roundtrip after receiving the info event. When we get
the reply, we can assume all info is flushed. This includes the
parameters that we received.
2019-11-29 13:34:09 +01:00
Wim Taymans
87946ed2cf media-session: move all flags to the object 2019-11-29 13:34:09 +01:00
Wim Taymans
c46753bcae media-session: track nodes we create
Add a method to create a node and track the proxy. We can then
use this to track the params on a node.

Don't listen end enumerate the params in the monitors bbut let the
session do that. Use the collected params from the session to create
endpoints and streams.

Always activate the default stream on alsa nodes to create the
ports and have something we can present to apps.
2019-11-29 13:34:09 +01:00
Wim Taymans
80ac755670 media-session: make the services more modular 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
541f3a4cc6 media-session: keep globals in a list as well
Also keep a list of globals and use it to emit the globals in
add_listener.
2019-11-29 13:34:08 +01:00
Wim Taymans
e24e383550 media-session: add callback based sync method
Call the callback when the sync completes. Implement roundtrip
with this.
2019-11-29 13:34:08 +01:00
Wim Taymans
709a52e286 media-session: also create EndpointLink objects
Create an endpoint link object when linking endpoints. Keep track
of the links in the endpoint_link and cleanup when they are all
gone.

Improve properties on session objects.
2019-11-29 13:34:08 +01:00
Wim Taymans
3cd7d90d88 media-session: link all stream ports
Create a helper in the session manager to link all ports between
2 nodes.

Make the output endpoint call the input endpoint create_link, passing
the node or ports to link to.

Make the input endpoint complete the link by calling the session
helper to link all ports.

Remove the node policy, we're only using a policy for the endpoints
now.
2019-11-29 13:34:07 +01:00
Wim Taymans
9bc5d23ffe media-session: add _roundtrip helper
Add a function to force a roundtrip
2019-11-29 13:34:07 +01:00
Wim Taymans
161cf46898 media-session: add media session helpers
Move all the media-session object monitoring into one place and
provide an API to get to the session objects.

Make API to add module specific info to objects.

Add methods to export and create objects in the session. This should
make it possible to link proxy to implementation and avoid a server
roundtrip in some cases.
2019-11-29 13:34:07 +01:00