mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: use property keys
This commit is contained in:
parent
bc1192c8dd
commit
d6391070c4
1 changed files with 9 additions and 8 deletions
|
|
@ -456,7 +456,8 @@ static int do_set_client_name(struct client *client, uint32_t command, uint32_t
|
||||||
TAG_INVALID)) < 0)
|
TAG_INVALID)) < 0)
|
||||||
return res;
|
return res;
|
||||||
if (name)
|
if (name)
|
||||||
changed += pw_properties_set(client->props, "application.name", name);
|
changed += pw_properties_set(client->props,
|
||||||
|
PW_KEY_APP_NAME, name);
|
||||||
} else {
|
} else {
|
||||||
if ((res = message_get(m,
|
if ((res = message_get(m,
|
||||||
TAG_PROPLIST, client->props,
|
TAG_PROPLIST, client->props,
|
||||||
|
|
@ -477,7 +478,7 @@ static int do_set_client_name(struct client *client, uint32_t command, uint32_t
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_log_info(NAME" %p: SET_CLIENT_NAME %s", impl,
|
pw_log_info(NAME" %p: SET_CLIENT_NAME %s", impl,
|
||||||
pw_properties_get(client->props, "application.name"));
|
pw_properties_get(client->props, PW_KEY_APP_NAME));
|
||||||
|
|
||||||
reply = reply_new(client, tag);
|
reply = reply_new(client, tag);
|
||||||
|
|
||||||
|
|
@ -2031,7 +2032,7 @@ static void fill_client_info(struct client *client, struct message *m)
|
||||||
{
|
{
|
||||||
message_put(m,
|
message_put(m,
|
||||||
TAG_U32, 0, /* client index */
|
TAG_U32, 0, /* client index */
|
||||||
TAG_STRING, pw_properties_get(client->props, "application.name"),
|
TAG_STRING, pw_properties_get(client->props, PW_KEY_APP_NAME),
|
||||||
TAG_U32, SPA_ID_INVALID, /* module */
|
TAG_U32, SPA_ID_INVALID, /* module */
|
||||||
TAG_STRING, "PipeWire", /* driver */
|
TAG_STRING, "PipeWire", /* driver */
|
||||||
TAG_INVALID);
|
TAG_INVALID);
|
||||||
|
|
@ -2049,7 +2050,7 @@ static void fill_sink_info(struct client *client, struct message *m, struct devi
|
||||||
message_put(m,
|
message_put(m,
|
||||||
TAG_U32, sink->index, /* sink index */
|
TAG_U32, sink->index, /* sink index */
|
||||||
TAG_STRING, sink->name,
|
TAG_STRING, sink->name,
|
||||||
TAG_STRING, pw_properties_get(sink->props, "device.description"),
|
TAG_STRING, pw_properties_get(sink->props, PW_KEY_DEVICE_DESCRIPTION),
|
||||||
TAG_SAMPLE_SPEC, &sink->ss,
|
TAG_SAMPLE_SPEC, &sink->ss,
|
||||||
TAG_CHANNEL_MAP, &sink->map,
|
TAG_CHANNEL_MAP, &sink->map,
|
||||||
TAG_U32, SPA_ID_INVALID, /* module index */
|
TAG_U32, SPA_ID_INVALID, /* module index */
|
||||||
|
|
@ -2102,7 +2103,7 @@ static void fill_source_info(struct client *client, struct message *m, struct de
|
||||||
message_put(m,
|
message_put(m,
|
||||||
TAG_U32, source->index, /* source index */
|
TAG_U32, source->index, /* source index */
|
||||||
TAG_STRING, source->name,
|
TAG_STRING, source->name,
|
||||||
TAG_STRING, pw_properties_get(source->props, "device.description"),
|
TAG_STRING, pw_properties_get(source->props, PW_KEY_DEVICE_DESCRIPTION),
|
||||||
TAG_SAMPLE_SPEC, &source->ss,
|
TAG_SAMPLE_SPEC, &source->ss,
|
||||||
TAG_CHANNEL_MAP, &source->map,
|
TAG_CHANNEL_MAP, &source->map,
|
||||||
TAG_U32, SPA_ID_INVALID, /* module index */
|
TAG_U32, SPA_ID_INVALID, /* module index */
|
||||||
|
|
@ -3060,7 +3061,7 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
|
||||||
.name = "input.pipewire",
|
.name = "input.pipewire",
|
||||||
.direction = PW_DIRECTION_INPUT,
|
.direction = PW_DIRECTION_INPUT,
|
||||||
.props = pw_properties_new(
|
.props = pw_properties_new(
|
||||||
"device.description", "PipeWire Sink",
|
PW_KEY_DEVICE_DESCRIPTION, "PipeWire Sink",
|
||||||
NULL),
|
NULL),
|
||||||
.ss = (struct sample_spec) {
|
.ss = (struct sample_spec) {
|
||||||
.format = SAMPLE_FLOAT32LE,
|
.format = SAMPLE_FLOAT32LE,
|
||||||
|
|
@ -3082,7 +3083,7 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
|
||||||
.name = "output.pipewire.monitor",
|
.name = "output.pipewire.monitor",
|
||||||
.direction = PW_DIRECTION_OUTPUT,
|
.direction = PW_DIRECTION_OUTPUT,
|
||||||
.props = pw_properties_new(
|
.props = pw_properties_new(
|
||||||
"device.description", "Monitor of PipeWire Sink",
|
PW_KEY_DEVICE_DESCRIPTION, "Monitor of PipeWire Sink",
|
||||||
NULL),
|
NULL),
|
||||||
.ss = (struct sample_spec) {
|
.ss = (struct sample_spec) {
|
||||||
.format = SAMPLE_FLOAT32LE,
|
.format = SAMPLE_FLOAT32LE,
|
||||||
|
|
@ -3104,7 +3105,7 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
|
||||||
.name = "output.pipewire",
|
.name = "output.pipewire",
|
||||||
.direction = PW_DIRECTION_OUTPUT,
|
.direction = PW_DIRECTION_OUTPUT,
|
||||||
.props = pw_properties_new(
|
.props = pw_properties_new(
|
||||||
"device.description", "PipeWire Source",
|
PW_KEY_DEVICE_DESCRIPTION, "PipeWire Source",
|
||||||
NULL),
|
NULL),
|
||||||
.ss = (struct sample_spec) {
|
.ss = (struct sample_spec) {
|
||||||
.format = SAMPLE_FLOAT32LE,
|
.format = SAMPLE_FLOAT32LE,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue