Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
0c455a0c
Commit
0c455a0c
authored
5 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
si-adapter: port to use WpSiFactory
parent
fc4fa4ca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/module-si-adapter.c
+22
-36
22 additions, 36 deletions
modules/module-si-adapter.c
with
22 additions
and
36 deletions
modules/module-si-adapter.c
+
22
−
36
View file @
0c455a0c
...
...
@@ -79,31 +79,6 @@ si_adapter_reset (WpSessionItem * item)
WP_SESSION_ITEM_CLASS
(
si_adapter_parent_class
)
->
reset
(
item
);
}
static
GVariant
*
si_adapter_get_config_spec
(
WpSessionItem
*
item
)
{
GVariantBuilder
b
;
g_variant_builder_init
(
&
b
,
G_VARIANT_TYPE_VARDICT
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"node"
,
"t"
,
WP_SI_CONFIG_OPTION_WRITEABLE
|
WP_SI_CONFIG_OPTION_REQUIRED
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"name"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"media-class"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"role"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"priority"
,
"u"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"enable-control-port"
,
"b"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"enable-monitor"
,
"b"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"direction"
,
"y"
,
0
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"channels"
,
"u"
,
0
,
NULL
);
return
g_variant_builder_end
(
&
b
);
}
static
GVariant
*
si_adapter_get_configuration
(
WpSessionItem
*
item
)
{
...
...
@@ -378,7 +353,6 @@ si_adapter_class_init (WpSiAdapterClass * klass)
object_class
->
finalize
=
si_adapter_finalize
;
si_class
->
get_config_spec
=
si_adapter_get_config_spec
;
si_class
->
configure
=
si_adapter_configure
;
si_class
->
get_configuration
=
si_adapter_get_configuration
;
si_class
->
get_next_step
=
si_adapter_get_next_step
;
...
...
@@ -526,17 +500,29 @@ si_adapter_stream_init (WpSiStreamInterface * iface)
iface
->
get_parent_endpoint
=
si_adapter_get_stream_parent_endpoint
;
}
static
void
si_adapter_factory
(
WpFactory
*
factory
,
GType
type
,
GVariant
*
properties
,
GAsyncReadyCallback
ready
,
gpointer
user_data
)
{
WpSessionItem
*
item
=
g_object_new
(
si_adapter_get_type
(),
NULL
);
wp_session_item_configure
(
item
,
properties
);
//TODO: return
}
WP_PLUGIN_EXPORT
void
wireplumber__module_init
(
WpModule
*
module
,
WpCore
*
core
,
GVariant
*
args
)
{
wp_factory_new
(
core
,
"si-adapter"
,
si_adapter_factory
);
GVariantBuilder
b
;
g_variant_builder_init
(
&
b
,
G_VARIANT_TYPE_VARDICT
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"node"
,
"t"
,
WP_SI_CONFIG_OPTION_WRITEABLE
|
WP_SI_CONFIG_OPTION_REQUIRED
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"name"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"media-class"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"role"
,
"s"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"priority"
,
"u"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"enable-control-port"
,
"b"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"enable-monitor"
,
"b"
,
WP_SI_CONFIG_OPTION_WRITEABLE
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"direction"
,
"y"
,
0
,
NULL
);
g_variant_builder_add
(
&
b
,
"(ssymv)"
,
"channels"
,
"u"
,
0
,
NULL
);
wp_si_factory_register
(
core
,
wp_si_factory_new_simple
(
"si-adapter"
,
si_adapter_get_type
(),
g_variant_builder_end
(
&
b
)));
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment