Commit graph

164 commits

Author SHA1 Message Date
George Kiagiadakis
f7c0730b7e docs: enable building html documentation with hotdoc 2020-01-22 17:06:01 +02:00
George Kiagiadakis
efb33ddd1b lib: introduce export macros and hide all private symbols 2020-01-16 18:50:07 +02:00
Julian Bouzas
43d71d47a1 exported: export when connected signal is emitted if core is not connected 2020-01-14 08:37:43 -05:00
Julian Bouzas
a9ac1fdc06 update to the latest pipewire API 2020-01-13 15:07:08 -05:00
Julian Bouzas
cf768e9b20 core: remove wp_core_get_pw_remote API 2020-01-13 08:45:26 -05:00
Julian Bouzas
c1bece82f9 core: add wp_core_export_object API 2020-01-13 08:44:35 -05:00
Julian Bouzas
4699946e56 core: remove wp_core_get_pw_core_proxy API 2020-01-10 10:16:15 -05:00
Julian Bouzas
b92e2f3574 monitor: use WpCore API when creating pipewire objects 2020-01-10 10:16:15 -05:00
Julian Bouzas
35ca79750d monitor: clean monitor code 2020-01-10 10:16:15 -05:00
Julian Bouzas
116376a0a6 proxy: add local_object property to handle local objects 2020-01-10 10:16:07 -05:00
Julian Bouzas
0a690f61a4 core: add wp_core_create_local_object API 2020-01-09 08:49:57 -05:00
Julian Bouzas
55ff0a6339 proxy: add WpProxyDevice subclass 2020-01-08 09:54:31 -05:00
Julian Bouzas
59580e7c84 properties: add wp_properties_copy_all API 2020-01-07 09:00:46 -05:00
George Kiagiadakis
e10b0f871d lib: debug loading of config files + endpoint priorities 2019-12-18 15:43:29 +02:00
George Kiagiadakis
2bb534d063 policy: track the exported session instead of the proxy
The proxy takes more roundtrips to get updated and this makes the
policy fail to find a default endpoint at startup, right after
the devices have been discovered

This also removes the weak ref on the session, since the object
manager internally maintains a reference on the objects that
it manages.
2019-12-17 18:01:03 +02:00
Julian Bouzas
5348239ccb policy: add _get_session API for the policy manager 2019-12-16 13:37:05 -05:00
Julian Bouzas
d485c1192a base-endpoint: add _get_global_id API 2019-12-16 13:37:05 -05:00
Julian Bouzas
0ad0c9fb9d base-endpoint: add _get_priority API 2019-12-16 13:37:05 -05:00
George Kiagiadakis
1fcadf4bdf meson: install a pkgconfig file for libwireplumber 2019-12-12 20:41:20 +02:00
George Kiagiadakis
8b2d8c90a2 endpoint proxy: don't try to set a control value if the proxy is destroyed 2019-12-12 20:09:17 +02:00
George Kiagiadakis
67cb633fb5 core: change idle_add to take a GDestroyNotify as well and return a source id
to make it more usable and compatible with g_idle_add
2019-12-12 20:07:46 +02:00
George Kiagiadakis
bb7b8daa17 exported: delay export until the core is connected
This is useful to be able to call export() from a module init
function, which is called before the core is connected
2019-12-11 23:43:53 +02:00
George Kiagiadakis
787bd8d576 endpoint: implement get_{name,media_class,direction} 2019-12-11 23:43:13 +02:00
George Kiagiadakis
ff36ff31e5 session: ensure the exported properties do not leak object, client & factory ids
These are set by the server on the global properties set
2019-12-11 19:05:09 +02:00
George Kiagiadakis
7b222ebcbd endpoint: export name, media class & direction + finetune the global properties 2019-12-11 19:05:09 +02:00
George Kiagiadakis
a71d433a5e lib: implement WpEndpoint (interface + Proxy + Exported + unit test)
heavily based on the WpSession implementation
2019-12-11 19:05:09 +02:00
George Kiagiadakis
c0455c981d lib: rename WpEndpoint* to WpBaseEndpoint*
to avoid name clashing with the upcoming WpEndpoint interface
that is going to be the common interface of Wp{Proxy,Exported}Endpoint
2019-12-11 19:05:05 +02:00
Julian Bouzas
00006854f0 policy: store a core weak reference 2019-12-10 16:13:08 -05:00
Julian Bouzas
e04f935952 core: return a boolean in sync API 2019-12-06 08:53:57 -05:00
Julian Bouzas
9b255922ff core: remove unnecessary idle callback when connecting 2019-12-06 08:53:51 -05:00
George Kiagiadakis
7a214e8fab wp_properties_match: use wildcard pattern matching instad of strict string comparison 2019-12-05 12:41:45 +02:00
George Kiagiadakis
92107e8342 object-manager: keep a reference to self while doing a core sync
Otherwise, if the object manager is destroyed while a sync is in progress,
we get an invalid 'self' pointer on the callback later, which is being
called regardless

There is a bit more work that should be done in the core to avoid leaking
this ref in case pipewire disconnects before the sync is completed
2019-12-05 12:05:34 +02:00
Julian Bouzas
c8417f8826 endpoint: add get_role API 2019-12-04 16:38:35 -05:00
Julian Bouzas
7bd9f84e6f endpoint: add keep property 2019-12-04 16:38:35 -05:00
Julian Bouzas
d49ffbef1d endpoint: add get_properties API 2019-12-04 16:38:35 -05:00
Julian Bouzas
b2c4162c2f policy: remove unneeded handle_endpoint callback 2019-12-04 16:38:35 -05:00
Julian Bouzas
ea3b58c2cd properties: add wp_properties_matches API 2019-12-04 16:38:35 -05:00
Julian Bouzas
58f321f815 object-manager: sync object-changed with pipewire's core 2019-12-04 16:38:35 -05:00
Julian Bouzas
61227c9da2 core: add sync API 2019-12-04 16:38:35 -05:00
Julian Bouzas
77ec4c548c lib: introduce WpConfiguration
The purpose of this change is to have a generic API that allows modules to read
configuration data from files under a specific directory. Since we can have many
types of configuration files, this new class maps file extensions with generic
parsers defined in the modules, giving modules full freedom to parse any kind of
data.
2019-12-04 16:38:35 -05:00
Julian Bouzas
9a9d773b06 wptoml: add new library to parse TOML files 2019-12-04 16:38:35 -05:00
George Kiagiadakis
a4d8e85a96 proxy: construct WpProxySession for session proxies 2019-12-04 18:49:47 +02:00
George Kiagiadakis
82fe7831b1 lib: implement WpSession (proxy + exported for pw_session) 2019-12-04 18:49:47 +02:00
George Kiagiadakis
ce3883c1a2 lib: add WpSpaProps, a helper to deal with SPA_PARAM_Props & SPA_PARAM_PropInfo 2019-12-04 18:49:14 +02:00
George Kiagiadakis
44e498ca01 lib: add WpExported, a base class for all exported objects 2019-12-03 18:05:34 +02:00
George Kiagiadakis
d4b7e98748 proxy: add type associations for the new session-manager extension types 2019-12-03 18:05:34 +02:00
Julian Bouzas
7f8fb72849 object-manager: sync on the core 2019-11-27 13:44:32 -05:00
Julian Bouzas
936a9f4d8b core: add wp_core_idle_add API 2019-11-27 13:16:43 -05:00
George Kiagiadakis
23b66a8f43 proxy: debug in dispose() so that we can print the pw_proxy pointer
in finalize() the pw_proxy is already gone and we always print null
2019-11-16 17:24:18 +02:00
George Kiagiadakis
4ad4974f27 endpoint-link: ensure we call finalize of the parent class
This was causing a memory corruption and crash because the
simple-endpoint-link was not calling finalize of the endpoint-link
and the GWeakRefs pointing to the endpoints were not uninitialized,
causing g_object_unref later to try to write to them (on free'ed memory)
2019-11-16 11:40:02 +02:00