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
b97540a1
Commit
b97540a1
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
endpoint: add wp_endpoint_create_link method
parent
23ae8c0d
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/endpoint.c
+39
-0
39 additions, 0 deletions
lib/wp/endpoint.c
lib/wp/endpoint.h
+3
-0
3 additions, 0 deletions
lib/wp/endpoint.h
with
42 additions
and
0 deletions
lib/wp/endpoint.c
+
39
−
0
View file @
b97540a1
...
...
@@ -34,6 +34,7 @@
#include
<spa/pod/builder.h>
#include
<spa/pod/parser.h>
#include
<spa/pod/filter.h>
#include
<spa/utils/result.h>
/* WpEndpoint */
...
...
@@ -422,6 +423,44 @@ wp_endpoint_iterate_streams (WpEndpoint * self)
return
wp_object_manager_iterate
(
priv
->
streams_om
);
}
/**
* wp_endpoint_create_link:
* @self: the endpoint
* @props: the link properties
*
* Creates a #WpEndpointLink between @self and another endpoint, which
* must be specified in @props.
* @props may contain:
* - `endpoint-link.output.endpoint`: the bound id of the endpoint
* that is in the %WP_DIRECTION_OUTPUT direction
* - `endpoint-link.output.stream`: the bound id of the endpoint stream
* that is in the %WP_DIRECTION_OUTPUT direction
* - `endpoint-link.input.endpoint`: the bound id of the endpoint
* that is in the %WP_DIRECTION_INPUT direction
* - `endpoint-link.input.stream`: the bound id of the endpoint stream
* that is in the %WP_DIRECTION_INPUT direction
*
* If either stream id are not specified (or set to -1), then the first
* available stream of this endpoint is used for the link.
*
* The id of @self is not necessary to be specified, so only one of
* `endpoint-link.output.endpoint`, `endpoint-link.input.endpoint`
* is actually required.
*/
void
wp_endpoint_create_link
(
WpEndpoint
*
self
,
WpProperties
*
props
)
{
WpEndpointPrivate
*
priv
=
wp_endpoint_get_instance_private
(
WP_ENDPOINT
(
self
));
int
res
;
res
=
pw_endpoint_create_link
(
priv
->
iface
,
wp_properties_peek_dict
(
props
));
if
(
res
<
0
)
{
wp_warning_object
(
self
,
"pw_endpoint_create_link: %d: %s"
,
res
,
spa_strerror
(
res
));
}
}
/* WpImplEndpoint */
enum
{
...
...
This diff is collapsed.
Click to expand it.
lib/wp/endpoint.h
+
3
−
0
View file @
b97540a1
...
...
@@ -76,6 +76,9 @@ WpEndpointStream * wp_endpoint_find_stream (WpEndpoint * self, guint32 bound_id)
WP_API
WpIterator
*
wp_endpoint_iterate_streams
(
WpEndpoint
*
self
);
WP_API
void
wp_endpoint_create_link
(
WpEndpoint
*
self
,
WpProperties
*
props
);
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