mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
introspect: merge client properties in sink_input/source_output
sink_input and source_output must contain the merged properties of the client.
This commit is contained in:
parent
e0970386f0
commit
bb101afa0c
1 changed files with 10 additions and 2 deletions
|
|
@ -1249,7 +1249,7 @@ struct sink_input_data {
|
|||
|
||||
static void sink_input_callback(struct sink_input_data *d)
|
||||
{
|
||||
struct global *g = d->global, *l;
|
||||
struct global *g = d->global, *l, *cl;
|
||||
struct pw_node_info *info = g->info;
|
||||
const char *name;
|
||||
pa_sink_input_info i;
|
||||
|
|
@ -1270,6 +1270,8 @@ static void sink_input_callback(struct sink_input_data *d)
|
|||
else
|
||||
name = info->name;
|
||||
|
||||
cl = pa_context_find_global(d->context, g->parent_id);
|
||||
|
||||
spa_zero(i);
|
||||
i.index = g->id;
|
||||
i.name = name ? name : "Unknown";
|
||||
|
|
@ -1309,6 +1311,8 @@ static void sink_input_callback(struct sink_input_data *d)
|
|||
i.driver = "PipeWire";
|
||||
i.mute = false;
|
||||
i.proplist = pa_proplist_new_dict(info->props);
|
||||
if (cl && cl->client_info.info.proplist)
|
||||
pa_proplist_update(i.proplist, PA_UPDATE_MERGE, cl->client_info.info.proplist);
|
||||
i.corked = false;
|
||||
i.has_volume = true;
|
||||
i.volume_writable = true;
|
||||
|
|
@ -1514,7 +1518,7 @@ struct source_output_data {
|
|||
|
||||
static void source_output_callback(struct source_output_data *d)
|
||||
{
|
||||
struct global *g = d->global, *l;
|
||||
struct global *g = d->global, *l, *cl;
|
||||
struct pw_node_info *info = g->info;
|
||||
const char *name;
|
||||
pa_source_output_info i;
|
||||
|
|
@ -1535,6 +1539,8 @@ static void source_output_callback(struct source_output_data *d)
|
|||
else
|
||||
name = info->name;
|
||||
|
||||
cl = pa_context_find_global(d->context, g->parent_id);
|
||||
|
||||
spa_zero(i);
|
||||
i.index = g->id;
|
||||
i.name = name ? name : "Unknown";
|
||||
|
|
@ -1574,6 +1580,8 @@ static void source_output_callback(struct source_output_data *d)
|
|||
i.driver = "PipeWire";
|
||||
i.mute = false;
|
||||
i.proplist = pa_proplist_new_dict(info->props);
|
||||
if (cl && cl->client_info.info.proplist)
|
||||
pa_proplist_update(i.proplist, PA_UPDATE_MERGE, cl->client_info.info.proplist);
|
||||
i.corked = false;
|
||||
i.has_volume = true;
|
||||
i.volume_writable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue