endpoint: refactor slightly the public API

* Make streams a GVariant array, for future-proofness
* Add API for controls (volume, mute, brightness, contrast, etc...)
* Remove API for profiles (it's not well-thought; may be re-added
  in the future)
This commit is contained in:
George Kiagiadakis
2019-05-21 18:27:07 +03:00
parent 0506f53149
commit 5f853d0e53
3 changed files with 104 additions and 96 deletions

View File

@@ -29,6 +29,12 @@ G_DEFINE_TYPE (WpPipewireSimpleEndpoint, simple_endpoint, WP_TYPE_ENDPOINT)
static void
simple_endpoint_init (WpPipewireSimpleEndpoint * self)
{
GVariantBuilder b;
g_variant_builder_init (&b, G_VARIANT_TYPE_VARDICT);
g_variant_builder_add (&b, "{sv}", "id", g_variant_new_uint32 (0));
g_variant_builder_add (&b, "{sv}", "name", g_variant_new_string ("default"));
wp_endpoint_register_stream (WP_ENDPOINT (self), g_variant_builder_end (&b));
}
static gboolean