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
48d7c44f
Commit
48d7c44f
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
link: add method to get object ids
parent
7377d15f
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/link.c
+29
-0
29 additions, 0 deletions
lib/wp/link.c
lib/wp/link.h
+5
-0
5 additions, 0 deletions
lib/wp/link.h
with
34 additions
and
0 deletions
lib/wp/link.c
+
29
−
0
View file @
48d7c44f
...
...
@@ -146,3 +146,32 @@ wp_link_new_from_factory (WpCore * core,
props
?
wp_properties_peek_dict
(
props
)
:
NULL
,
0
));
return
self
;
}
/**
* wp_link_get_linked_object_ids:
* @self: the link
* @output_node: (out) (optional): the bound id of the output (source) node
* @output_port: (out) (optional): the bound id of the output (source) port
* @input_node: (out) (optional): the bound id of the input (sink) node
* @input_port: (out) (optional): the bound id of the input (sink) port
*
* Retrieves the ids of the objects that are linked by this link
*
* Note: Using this method requires %WP_PROXY_FEATURE_INFO
*/
void
wp_link_get_linked_object_ids
(
WpLink
*
self
,
guint32
*
output_node
,
guint32
*
output_port
,
guint32
*
input_node
,
guint32
*
input_port
)
{
g_return_if_fail
(
WP_IS_LINK
(
self
));
if
(
output_node
)
*
output_node
=
self
->
info
->
output_node_id
;
if
(
output_port
)
*
output_port
=
self
->
info
->
output_port_id
;
if
(
input_node
)
*
input_node
=
self
->
info
->
input_node_id
;
if
(
input_port
)
*
input_port
=
self
->
info
->
input_port_id
;
}
This diff is collapsed.
Click to expand it.
lib/wp/link.h
+
5
−
0
View file @
48d7c44f
...
...
@@ -26,6 +26,11 @@ WP_API
WpLink
*
wp_link_new_from_factory
(
WpCore
*
core
,
const
gchar
*
factory_name
,
WpProperties
*
properties
);
WP_API
void
wp_link_get_linked_object_ids
(
WpLink
*
self
,
guint32
*
output_node
,
guint32
*
output_port
,
guint32
*
input_node
,
guint32
*
input_port
);
G_END_DECLS
#endif
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