mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 05:28:01 +02:00
module-metadata: s/settings/plugin/
This commit is contained in:
parent
40d2a186b6
commit
df258c3887
2 changed files with 18 additions and 20 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* WirePlumber
|
||||
*
|
||||
* Copyright © 2019 Collabora Ltd.
|
||||
* Copyright © 2020 Collabora Ltd.
|
||||
* @author Raghavendra Rao <raghavendra.rao@collabora.com>
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
|
|
@ -9,57 +9,55 @@
|
|||
#include <wp/wp.h>
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
struct _WpMetadataSettings
|
||||
struct _WpMetadataPlugin
|
||||
{
|
||||
WpPlugin parent;
|
||||
WpImplMetadata *metadata;
|
||||
};
|
||||
|
||||
G_DECLARE_FINAL_TYPE (WpMetadataSettings, wp_metadata_settings,
|
||||
WP, METADATA_SETTINGS, WpPlugin)
|
||||
G_DEFINE_TYPE (WpMetadataSettings, wp_metadata_settings, WP_TYPE_PLUGIN)
|
||||
G_DECLARE_FINAL_TYPE (WpMetadataPlugin, wp_metadata_plugin,
|
||||
WP, METADATA_PLUGIN, WpPlugin)
|
||||
G_DEFINE_TYPE (WpMetadataPlugin, wp_metadata_plugin, WP_TYPE_PLUGIN)
|
||||
|
||||
static void
|
||||
wp_metadata_settings_init (WpMetadataSettings * self)
|
||||
wp_metadata_plugin_init (WpMetadataPlugin * self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
wp_metadata_settings_activate (WpPlugin * plugin)
|
||||
wp_metadata_plugin_activate (WpPlugin * plugin)
|
||||
{
|
||||
WpMetadataSettings * self = WP_METADATA_SETTINGS (plugin);
|
||||
WpMetadataPlugin * self = WP_METADATA_PLUGIN (plugin);
|
||||
g_autoptr (WpCore) core = wp_plugin_get_core (plugin);
|
||||
|
||||
g_return_if_fail (core);
|
||||
|
||||
self->metadata = wp_impl_metadata_new(core);
|
||||
|
||||
self->metadata = wp_impl_metadata_new (core);
|
||||
wp_proxy_augment (WP_PROXY(self->metadata),
|
||||
WP_METADATA_FEATURES_STANDARD, NULL,
|
||||
WP_PROXY_FEATURES_STANDARD, NULL,
|
||||
NULL, self);
|
||||
}
|
||||
|
||||
static void
|
||||
wp_metadata_settings_deactivate (WpPlugin * plugin)
|
||||
wp_metadata_plugin_deactivate (WpPlugin * plugin)
|
||||
{
|
||||
WpMetadataSettings * self = WP_METADATA_SETTINGS (plugin);
|
||||
WpMetadataPlugin * self = WP_METADATA_PLUGIN (plugin);
|
||||
|
||||
g_clear_object (&self->metadata);
|
||||
}
|
||||
|
||||
static void
|
||||
wp_metadata_settings_class_init (WpMetadataSettingsClass * klass)
|
||||
wp_metadata_plugin_class_init (WpMetadataPluginClass * klass)
|
||||
{
|
||||
WpPluginClass *plugin_class = (WpPluginClass *) klass;
|
||||
|
||||
plugin_class->activate = wp_metadata_settings_activate;
|
||||
plugin_class->deactivate = wp_metadata_settings_deactivate;
|
||||
plugin_class->activate = wp_metadata_plugin_activate;
|
||||
plugin_class->deactivate = wp_metadata_plugin_deactivate;
|
||||
}
|
||||
|
||||
WP_PLUGIN_EXPORT void
|
||||
wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
|
||||
{
|
||||
wp_plugin_register (g_object_new (wp_metadata_settings_get_type (),
|
||||
wp_plugin_register (g_object_new (wp_metadata_plugin_get_type (),
|
||||
"module", module,
|
||||
NULL));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,5 +74,5 @@ load-module C libwireplumber-module-config-endpoint
|
|||
# Implements linking clients to devices based on TOML configuration files
|
||||
load-module C libwireplumber-module-config-policy
|
||||
|
||||
# Activates metadata module
|
||||
# Implements storing metadata about objects in RAM
|
||||
load-module C libwireplumber-module-metadata
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue