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
0a690f61
Commit
0a690f61
authored
5 years ago
by
Julian Bouzas
Browse files
Options
Downloads
Patches
Plain Diff
core: add wp_core_create_local_object API
parent
55ff0a63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/wp/core.c
+37
-0
37 additions, 0 deletions
lib/wp/core.c
lib/wp/core.h
+3
-0
3 additions, 0 deletions
lib/wp/core.h
with
40 additions
and
0 deletions
lib/wp/core.c
+
37
−
0
View file @
0a690f61
...
...
@@ -545,6 +545,43 @@ wp_core_get_remote_state (WpCore * self, const gchar ** error)
return
(
WpRemoteState
)
pw_remote_get_state
(
self
->
pw_remote
,
error
);
}
WpProxy
*
wp_core_create_local_object
(
WpCore
*
self
,
const
gchar
*
factory_name
,
guint32
interface_type
,
guint32
interface_version
,
WpProperties
*
properties
)
{
struct
pw_proxy
*
pw_proxy
=
NULL
;
struct
pw_factory
*
factory
=
NULL
;
gpointer
iface
=
NULL
;
g_return_val_if_fail
(
WP_IS_CORE
(
self
),
NULL
);
g_return_val_if_fail
(
self
->
pw_core
,
NULL
);
g_return_val_if_fail
(
self
->
pw_remote
,
NULL
);
factory
=
pw_core_find_factory
(
self
->
pw_core
,
factory_name
);
if
(
!
factory
)
return
NULL
;
iface
=
pw_factory_create_object
(
factory
,
NULL
,
interface_type
,
interface_version
,
properties
?
wp_properties_to_pw_properties
(
properties
)
:
NULL
,
0
);
if
(
!
iface
)
return
NULL
;
pw_proxy
=
pw_remote_export
(
self
->
pw_remote
,
interface_type
,
properties
?
wp_properties_to_pw_properties
(
properties
)
:
NULL
,
iface
,
0
);
if
(
!
pw_proxy
)
return
NULL
;
return
wp_proxy_new_wrap
(
self
,
pw_proxy
,
interface_type
,
interface_version
);
}
WpProxy
*
wp_core_create_remote_object
(
WpCore
*
self
,
const
gchar
*
factory_name
,
guint32
interface_type
,
...
...
This diff is collapsed.
Click to expand it.
lib/wp/core.h
+
3
−
0
View file @
0a690f61
...
...
@@ -50,6 +50,9 @@ struct pw_remote * wp_core_get_pw_remote (WpCore * self);
gboolean
wp_core_connect
(
WpCore
*
self
);
WpRemoteState
wp_core_get_remote_state
(
WpCore
*
self
,
const
gchar
**
error
);
WpProxy
*
wp_core_create_local_object
(
WpCore
*
self
,
const
gchar
*
factory_name
,
guint32
interface_type
,
guint32
interface_version
,
WpProperties
*
properties
);
WpProxy
*
wp_core_create_remote_object
(
WpCore
*
self
,
const
gchar
*
factory_name
,
guint32
interface_type
,
guint32
interface_version
,
WpProperties
*
properties
);
...
...
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