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
9612d35c
Commit
9612d35c
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
si-interfaces: drop the multi-endpoint interface
It's not well-defined; we'll come back to that later
parent
c95ee227
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/wp/si-interfaces.c
+0
-55
0 additions, 55 deletions
lib/wp/si-interfaces.c
lib/wp/si-interfaces.h
+0
-25
0 additions, 25 deletions
lib/wp/si-interfaces.h
modules/module-si-adapter.c
+0
-22
0 additions, 22 deletions
modules/module-si-adapter.c
with
0 additions
and
102 deletions
lib/wp/si-interfaces.c
+
0
−
55
View file @
9612d35c
...
...
@@ -135,61 +135,6 @@ wp_si_endpoint_get_stream_acquisition (WpSiEndpoint * self)
return
WP_SI_ENDPOINT_GET_IFACE
(
self
)
->
get_stream_acquisition
(
self
);
}
/**
* WpSiMultiEndpoint:
*
* An interface for session items that provide multiple PipeWire endpoints.
*
* This is useful for items that need to expose more than one endpoints while
* managing the same nodes underneath. For example, an audio playback device
* may have one input endpoint for sending audio to the device and one output
* endpoint for monitoring (exposing the adapter's monitor ports).
*
* If an item implements both #WpSiMultiEndpoint and #WpSiEndpoint, then the
* managing session will only inspect the #WpSiMultiEndpoint interface in
* order to determine which endpoints to export. Effectively this means that
* such an item should also include itself in the list of endpoints that
* it exposes through #WpSiMultiEndpoint in order to be exported to PipeWire.
*/
G_DEFINE_INTERFACE
(
WpSiMultiEndpoint
,
wp_si_multi_endpoint
,
WP_TYPE_SESSION_ITEM
)
static
void
wp_si_multi_endpoint_default_init
(
WpSiMultiEndpointInterface
*
iface
)
{
}
/**
* wp_si_multi_endpoint_get_n_endpoints: (virtual get_n_endpoints)
* @self: the session item
*
* Returns: the number of endpoints exposed by this item
*/
guint
wp_si_multi_endpoint_get_n_endpoints
(
WpSiMultiEndpoint
*
self
)
{
g_return_val_if_fail
(
WP_IS_SI_MULTI_ENDPOINT
(
self
),
0
);
g_return_val_if_fail
(
WP_SI_MULTI_ENDPOINT_GET_IFACE
(
self
)
->
get_n_endpoints
,
0
);
return
WP_SI_MULTI_ENDPOINT_GET_IFACE
(
self
)
->
get_n_endpoints
(
self
);
}
/**
* wp_si_multi_endpoint_get_endpoint: (virtual get_endpoint)
* @self: the session item
* @index: the endpoint index, from 0 up to and excluding
* wp_si_multi_endpoint_get_n_endpoints()
*
* Returns: (transfer none): the endpoint at @index
*/
WpSiEndpoint
*
wp_si_multi_endpoint_get_endpoint
(
WpSiMultiEndpoint
*
self
,
guint
index
)
{
g_return_val_if_fail
(
WP_IS_SI_MULTI_ENDPOINT
(
self
),
NULL
);
g_return_val_if_fail
(
WP_SI_MULTI_ENDPOINT_GET_IFACE
(
self
)
->
get_endpoint
,
NULL
);
return
WP_SI_MULTI_ENDPOINT_GET_IFACE
(
self
)
->
get_endpoint
(
self
,
index
);
}
/**
* WpSiStream:
*
...
...
This diff is collapsed.
Click to expand it.
lib/wp/si-interfaces.h
+
0
−
25
View file @
9612d35c
...
...
@@ -57,31 +57,6 @@ WpSiStream * wp_si_endpoint_get_stream (WpSiEndpoint * self, guint index);
WP_API
WpSiStreamAcquisition
*
wp_si_endpoint_get_stream_acquisition
(
WpSiEndpoint
*
self
);
/**
* WP_TYPE_SI_MULTI_ENDPOINT:
*
* The #WpSiMultiEndpoint #GType
*/
#define WP_TYPE_SI_MULTI_ENDPOINT (wp_si_multi_endpoint_get_type ())
WP_API
G_DECLARE_INTERFACE
(
WpSiMultiEndpoint
,
wp_si_multi_endpoint
,
WP
,
SI_MULTI_ENDPOINT
,
WpSessionItem
)
struct
_WpSiMultiEndpointInterface
{
GTypeInterface
interface
;
guint
(
*
get_n_endpoints
)
(
WpSiMultiEndpoint
*
self
);
WpSiEndpoint
*
(
*
get_endpoint
)
(
WpSiMultiEndpoint
*
self
,
guint
index
);
};
WP_API
guint
wp_si_multi_endpoint_get_n_endpoints
(
WpSiMultiEndpoint
*
self
);
WP_API
WpSiEndpoint
*
wp_si_multi_endpoint_get_endpoint
(
WpSiMultiEndpoint
*
self
,
guint
index
);
/**
* WP_TYPE_SI_STREAM:
*
...
...
This diff is collapsed.
Click to expand it.
modules/module-si-adapter.c
+
0
−
22
View file @
9612d35c
...
...
@@ -43,13 +43,11 @@ struct _WpSiAdapter
WpObjectManager
*
ports_om
;
};
static
void
si_adapter_multi_endpoint_init
(
WpSiMultiEndpointInterface
*
iface
);
static
void
si_adapter_endpoint_init
(
WpSiEndpointInterface
*
iface
);
static
void
si_adapter_stream_init
(
WpSiStreamInterface
*
iface
);
G_DECLARE_FINAL_TYPE
(
WpSiAdapter
,
si_adapter
,
WP
,
SI_ADAPTER
,
WpSessionItem
)
G_DEFINE_TYPE_WITH_CODE
(
WpSiAdapter
,
si_adapter
,
WP_TYPE_SESSION_ITEM
,
G_IMPLEMENT_INTERFACE
(
WP_TYPE_SI_MULTI_ENDPOINT
,
si_adapter_multi_endpoint_init
)
G_IMPLEMENT_INTERFACE
(
WP_TYPE_SI_ENDPOINT
,
si_adapter_endpoint_init
)
G_IMPLEMENT_INTERFACE
(
WP_TYPE_SI_STREAM
,
si_adapter_stream_init
))
...
...
@@ -394,26 +392,6 @@ si_adapter_class_init (WpSiAdapterClass * klass)
si_class
->
activate_rollback
=
si_adapter_activate_rollback
;
}
static
guint
si_adapter_get_n_endpoints
(
WpSiMultiEndpoint
*
item
)
{
return
1
;
}
static
WpSiEndpoint
*
si_adapter_get_endpoint
(
WpSiMultiEndpoint
*
item
,
guint
index
)
{
g_return_val_if_fail
(
index
==
0
,
NULL
);
return
WP_SI_ENDPOINT
(
item
);
}
static
void
si_adapter_multi_endpoint_init
(
WpSiMultiEndpointInterface
*
iface
)
{
iface
->
get_n_endpoints
=
si_adapter_get_n_endpoints
;
iface
->
get_endpoint
=
si_adapter_get_endpoint
;
}
static
GVariant
*
si_adapter_get_registration_info
(
WpSiEndpoint
*
item
)
{
...
...
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