Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julian Bouzas
WirePlumber
Commits
d49ffbef
Commit
d49ffbef
authored
Nov 22, 2019
by
Julian Bouzas
Browse files
endpoint: add get_properties API
parent
b2c4162c
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/wp/endpoint.c
View file @
d49ffbef
...
...
@@ -451,6 +451,17 @@ wp_endpoint_get_creation_time (WpEndpoint * self)
return
priv
->
creation_time
;
}
WpProperties
*
wp_endpoint_get_properties
(
WpEndpoint
*
self
)
{
g_return_val_if_fail
(
WP_IS_ENDPOINT
(
self
),
NULL
);
if
(
WP_ENDPOINT_GET_CLASS
(
self
)
->
get_properties
)
return
WP_ENDPOINT_GET_CLASS
(
self
)
->
get_properties
(
self
);
return
NULL
;
}
/**
* wp_endpoint_register_stream:
* @self: the endpoint
...
...
lib/wp/endpoint.h
View file @
d49ffbef
...
...
@@ -28,6 +28,8 @@ struct _WpEndpointClass
{
GObjectClass
parent_class
;
WpProperties
*
(
*
get_properties
)
(
WpEndpoint
*
self
);
GVariant
*
(
*
get_control_value
)
(
WpEndpoint
*
self
,
guint32
control_id
);
gboolean
(
*
set_control_value
)
(
WpEndpoint
*
self
,
guint32
control_id
,
GVariant
*
value
);
...
...
@@ -49,6 +51,7 @@ const gchar * wp_endpoint_get_name (WpEndpoint * self);
const
gchar
*
wp_endpoint_get_media_class
(
WpEndpoint
*
self
);
guint
wp_endpoint_get_direction
(
WpEndpoint
*
self
);
guint64
wp_endpoint_get_creation_time
(
WpEndpoint
*
self
);
WpProperties
*
wp_endpoint_get_properties
(
WpEndpoint
*
self
);
void
wp_endpoint_register_stream
(
WpEndpoint
*
self
,
GVariant
*
stream
);
GVariant
*
wp_endpoint_get_stream
(
WpEndpoint
*
self
,
guint32
stream_id
);
...
...
modules/module-pipewire/audio-softdsp-endpoint.c
View file @
d49ffbef
...
...
@@ -92,6 +92,14 @@ object_safe_new_finish(WpPwAudioSoftdspEndpoint * self, GObject *initable,
return
g_steal_pointer
(
&
object
);
}
static
WpProperties
*
endpoint_get_properties
(
WpEndpoint
*
ep
)
{
WpPwAudioSoftdspEndpoint
*
self
=
WP_PW_AUDIO_SOFTDSP_ENDPOINT
(
ep
);
return
wp_proxy_node_get_properties
(
self
->
proxy_node
);
}
static
gboolean
endpoint_prepare_link
(
WpEndpoint
*
ep
,
guint32
stream_id
,
WpEndpointLink
*
link
,
GVariant
**
properties
,
GError
**
error
)
...
...
@@ -397,6 +405,7 @@ endpoint_class_init (WpPwAudioSoftdspEndpointClass * klass)
object_class
->
set_property
=
endpoint_set_property
;
object_class
->
get_property
=
endpoint_get_property
;
endpoint_class
->
get_properties
=
endpoint_get_properties
;
endpoint_class
->
prepare_link
=
endpoint_prepare_link
;
endpoint_class
->
get_control_value
=
endpoint_get_control_value
;
endpoint_class
->
set_control_value
=
endpoint_set_control_value
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment