mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
Improve introspection
Add instrospection of client and source-output. Add properties to source-output and to CreateSourceOutput/Input Add helper to fill properties of context. Add client-name to pinossrc and pinossink Improve test-subscribe to show all new introspection details.
This commit is contained in:
parent
85e09e7a5b
commit
13d846ec38
21 changed files with 684 additions and 72 deletions
|
|
@ -39,6 +39,7 @@ struct _PinosSourceOutputPrivate
|
|||
gchar *source_path;
|
||||
|
||||
GBytes *possible_formats;
|
||||
PinosProperties *properties;
|
||||
GBytes *requested_format;
|
||||
GBytes *format;
|
||||
|
||||
|
|
@ -58,6 +59,7 @@ enum
|
|||
PROP_CLIENT_PATH,
|
||||
PROP_SOURCE_PATH,
|
||||
PROP_POSSIBLE_FORMATS,
|
||||
PROP_PROPERTIES,
|
||||
PROP_REQUESTED_FORMAT,
|
||||
PROP_FORMAT,
|
||||
PROP_SOCKET,
|
||||
|
|
@ -101,6 +103,10 @@ pinos_source_output_get_property (GObject *_object,
|
|||
g_value_set_boxed (value, priv->possible_formats);
|
||||
break;
|
||||
|
||||
case PROP_PROPERTIES:
|
||||
g_value_set_boxed (value, priv->properties);
|
||||
break;
|
||||
|
||||
case PROP_REQUESTED_FORMAT:
|
||||
g_value_set_boxed (value, priv->requested_format);
|
||||
break;
|
||||
|
|
@ -155,6 +161,14 @@ pinos_source_output_set_property (GObject *_object,
|
|||
g_bytes_get_data (priv->possible_formats, NULL), NULL);
|
||||
break;
|
||||
|
||||
case PROP_PROPERTIES:
|
||||
if (priv->properties)
|
||||
pinos_properties_free (priv->properties);
|
||||
priv->properties = g_value_dup_boxed (value);
|
||||
g_object_set (priv->iface, "properties",
|
||||
pinos_properties_to_variant (priv->properties), NULL);
|
||||
break;
|
||||
|
||||
case PROP_FORMAT:
|
||||
if (priv->format)
|
||||
g_bytes_unref (priv->format);
|
||||
|
|
@ -389,6 +403,16 @@ pinos_source_output_class_init (PinosSourceOutputClass * klass)
|
|||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_PROPERTIES,
|
||||
g_param_spec_boxed ("properties",
|
||||
"Properties",
|
||||
"Extra properties of the stream",
|
||||
PINOS_TYPE_PROPERTIES,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_REQUESTED_FORMAT,
|
||||
g_param_spec_boxed ("requested-format",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue