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
a7dcd3b7
Commit
a7dcd3b7
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
src: port daemon to the new APIs
parent
ccdc3544
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
meson.build
+1
-1
1 addition, 1 deletion
meson.build
src/config/wireplumber.conf
+1
-1
1 addition, 1 deletion
src/config/wireplumber.conf
src/main.c
+12
-17
12 additions, 17 deletions
src/main.c
with
14 additions
and
19 deletions
meson.build
+
1
−
1
View file @
a7dcd3b7
...
...
@@ -73,6 +73,6 @@ endif
subdir
(
'lib'
)
subdir
(
'docs'
)
subdir
(
'modules'
)
#
subdir('src')
subdir
(
'src'
)
subdir
(
'tests'
)
#subdir('tools')
This diff is collapsed.
Click to expand it.
src/config/wireplumber.conf
+
1
−
1
View file @
a7dcd3b7
...
...
@@ -63,7 +63,7 @@ load-module C libwireplumber-module-node-suspension
# Sets endpoint defaults on each session and stores default endpoint
# user settings in XDG_CONFIG_DIR
load
-
module
C
libwireplumber
-
module
-
session
-
settings
#
load-module C libwireplumber-module-session-settings
# Implements static objects creation based on TOML configuration files
load
-
module
C
libwireplumber
-
module
-
config
-
static
-
objects
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
12
−
17
View file @
a7dcd3b7
...
...
@@ -38,6 +38,7 @@ struct WpDaemonData
GDestroyNotify
free_message
;
GPtrArray
*
sessions
;
guint
n_sessions_exported
;
};
static
void
...
...
@@ -96,43 +97,37 @@ activate_plugins (struct WpDaemonData *d)
}
static
void
on_session_exported
(
Wp
Proxy
*
session
,
GAsyncResult
*
res
,
on_session_exported
(
Wp
Object
*
session
,
GAsyncResult
*
res
,
struct
WpDaemonData
*
d
)
{
g_autoptr
(
GError
)
error
=
NULL
;
if
(
!
wp_
proxy_augment
_finish
(
session
,
res
,
&
error
))
{
if
(
!
wp_
object_activate
_finish
(
session
,
res
,
&
error
))
{
wp_warning_object
(
session
,
"session could not be exported: %s"
,
error
->
message
);
}
if
(
wp_log_level_is_enabled
(
G_LOG_LEVEL_DEBUG
))
{
g_autoptr
(
WpProperties
)
props
=
wp_proxy_get_properties
(
session
);
g_autoptr
(
WpProperties
)
props
=
wp_pipewire_object_get_properties
(
WP_PIPEWIRE_OBJECT
(
session
));
wp_debug_object
(
session
,
"session '%s' exported"
,
wp_properties_get
(
props
,
"session.name"
));
}
for
(
guint
i
=
0
;
i
<
d
->
sessions
->
len
;
i
++
)
{
WpProxy
*
session
=
g_ptr_array_index
(
d
->
sessions
,
i
);
if
((
wp_proxy_get_features
(
session
)
&
WP_SESSION_FEATURES_STANDARD
)
!=
WP_SESSION_FEATURES_STANDARD
)
{
/* not ready yet */
return
;
}
if
(
++
d
->
n_sessions_exported
==
d
->
sessions
->
len
)
{
wp_debug
(
"All sessions exported"
);
wp_core_idle_add
(
d
->
core
,
NULL
,
G_SOURCE_FUNC
(
activate_plugins
),
d
,
NULL
);
}
wp_debug
(
"All sessions exported"
);
wp_core_idle_add
(
d
->
core
,
NULL
,
G_SOURCE_FUNC
(
activate_plugins
),
d
,
NULL
);
}
static
void
on_connected
(
WpCore
*
core
,
struct
WpDaemonData
*
d
)
{
d
->
n_sessions_exported
=
0
;
for
(
guint
i
=
0
;
i
<
d
->
sessions
->
len
;
i
++
)
{
WpProxy
*
session
=
g_ptr_array_index
(
d
->
sessions
,
i
);
wp_proxy_augment
(
session
,
WP_SESSION_FEATURES_STANDARD
,
NULL
,
(
GAsyncReadyCallback
)
on_session_exported
,
d
);
WpObject
*
session
=
g_ptr_array_index
(
d
->
sessions
,
i
);
wp_object_activate
(
session
,
WP_OBJECT_FEATURES_ALL
,
NULL
,
(
GAsyncReadyCallback
)
on_session_exported
,
d
);
}
}
...
...
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