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
e4e60c2e
Commit
e4e60c2e
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
endpoint-stream: add GObject property to access the name
parent
8c40bbbc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/wp/endpoint-stream.c
+32
-0
32 additions, 0 deletions
lib/wp/endpoint-stream.c
with
32 additions
and
0 deletions
lib/wp/endpoint-stream.c
+
32
−
0
View file @
e4e60c2e
...
...
@@ -37,6 +37,11 @@
/* WpEndpointStream */
enum
{
PROP_0
,
PROP_NAME
,
};
typedef
struct
_WpEndpointStreamPrivate
WpEndpointStreamPrivate
;
struct
_WpEndpointStreamPrivate
{
...
...
@@ -65,6 +70,23 @@ wp_endpoint_stream_finalize (GObject * object)
G_OBJECT_CLASS
(
wp_endpoint_stream_parent_class
)
->
finalize
(
object
);
}
static
void
wp_endpoint_stream_get_gobj_property
(
GObject
*
object
,
guint
property_id
,
GValue
*
value
,
GParamSpec
*
pspec
)
{
WpEndpointStream
*
self
=
WP_ENDPOINT_STREAM
(
object
);
WpEndpointStreamPrivate
*
priv
=
wp_endpoint_stream_get_instance_private
(
self
);
switch
(
property_id
)
{
case
PROP_NAME
:
g_value_set_string
(
value
,
priv
->
info
?
priv
->
info
->
name
:
NULL
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
property_id
,
pspec
);
break
;
}
}
static
gconstpointer
wp_endpoint_stream_get_info
(
WpProxy
*
proxy
)
{
...
...
@@ -168,6 +190,7 @@ wp_endpoint_stream_class_init (WpEndpointStreamClass * klass)
WpProxyClass
*
proxy_class
=
(
WpProxyClass
*
)
klass
;
object_class
->
finalize
=
wp_endpoint_stream_finalize
;
object_class
->
get_property
=
wp_endpoint_stream_get_gobj_property
;
proxy_class
->
pw_iface_type
=
PW_TYPE_INTERFACE_EndpointStream
;
proxy_class
->
pw_iface_version
=
PW_VERSION_ENDPOINT_STREAM
;
...
...
@@ -180,6 +203,15 @@ wp_endpoint_stream_class_init (WpEndpointStreamClass * klass)
proxy_class
->
set_param
=
wp_endpoint_stream_set_param
;
proxy_class
->
pw_proxy_created
=
wp_endpoint_stream_pw_proxy_created
;
/**
* WpEndpointStream:name:
*
* The name of the endpoint stream
*/
g_object_class_install_property
(
object_class
,
PROP_NAME
,
g_param_spec_string
(
"name"
,
"name"
,
"name"
,
NULL
,
G_PARAM_READABLE
|
G_PARAM_STATIC_STRINGS
));
}
/**
...
...
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