Wim Taymans
63a3811aa7
fix some warnings
2021-02-18 12:42:06 +01:00
Pauli Virtanen
2efdb78239
media-session: save and restore latencyOffsetNsec
2021-02-18 11:33:45 +00:00
Wim Taymans
bf062e455a
media-session: always remember the new route availability
2021-02-17 15:49:20 +01:00
Wim Taymans
2b44f42845
pass the complete buffer size to snprintf
...
There is no reason to pass size-1, snprintf will always put a \0
at the end.
2021-02-02 12:09:29 +01:00
Wim Taymans
a18a8c9e32
media-session: save and restore profile ports
...
Save the last explicitly set ports per profile.
When a profile change happens, restore the saved ports or select
the best port when nothing was saved.
2021-02-01 18:02:32 +01:00
Wim Taymans
8fd120cb23
media-session: recheck route status when != available
...
Save the new state so we can detect changes
Check for available != yes to also recheck when the state becomes
unknown.
2021-01-29 17:23:02 +01:00
Wim Taymans
f43bcca35e
media-session: implement route selection and restore
...
Disable automatic port configuration in acp and move the logic
to the session manager.
Implement initial port selection and restore on profile activation.
Implement route switch when unavailable
Implement port settings save.
2021-01-29 16:59:17 +01:00
Wim Taymans
f03deb5324
media-session: try to avoid switching away from hdmi
...
When HDMI goes to sleep the profile becomes unavailable. Avoid
switching to Off in that case.
2021-01-28 15:41:14 +01:00
Wim Taymans
fc08c79dad
media-session: start timeout only when something changed
2021-01-28 14:36:29 +01:00
Wim Taymans
072d3a191c
media-session: keep track of all active routes
...
Keep track of active profile in default-routes so that we can restore
the prefered routes later.
Keep track of all active routes in an array. There can be more than
one active route per direction.
New routes will get their volume restored. Route changes will be saved.
2021-01-28 14:28:46 +01:00
Wim Taymans
82bc0710f0
media-session: use a default volume if unknown
...
Set a safe volume when there is no previously saved volume.
2021-01-27 15:44:52 +01:00
Wim Taymans
0be851739f
improve config parsing
...
Use get_string to get object keys in a more generic way.
2021-01-27 15:36:32 +01:00
Wim Taymans
cf35e52586
media-session: use the right define for the bitmask
2021-01-27 13:48:10 +01:00
Wim Taymans
3366eeb65e
media-session: restore route volumes
...
Follow the active input/output routes. If the route changes, restore
the previously saved settings. If only the properties change, save
them to be restored later.
Fixes #402
2021-01-25 12:11:16 +01:00
Wim Taymans
62cdec8448
spa: move json parser to utils
...
Add unit test
Add escape function
2020-11-28 15:34:01 +01:00
Wim Taymans
b86acec625
media-session: ignore empty channelMap/channelVolume
2020-11-23 20:18:32 +01:00
Wim Taymans
2b95afeddc
media-session: add and parse channelmap in routes and stream
2020-11-23 15:34:24 +01:00
Wim Taymans
7ca8491be3
media-session: store values as json
...
Save settings as jason and use a small json compatible tokenizer to
load settings instead of our own less flexible format.
Save settings with a prefix and filter out entries without prefix
Listen for changes in restore.stream metadata and update properties.
2020-11-22 10:00:58 +01:00
Wim Taymans
0da406d304
media-session: make sure we don't read invalid data
2020-10-01 11:32:40 +02:00
Wim Taymans
a4e079e1cb
media-session: guard against invalid input
...
See #304
2020-09-22 12:39:39 +02:00
Wim Taymans
6b7928aee5
media-session: only debug param when loglevel set
2020-08-17 17:52:25 +02:00
Wim Taymans
f9a5053c73
media-session: improve cleanup in some modules
2020-08-17 17:50:15 +02:00
Wim Taymans
48a7e83fab
media-session: add module to restore route volumes
2020-08-17 11:17:21 +02:00