update for type changes

This commit is contained in:
Wim Taymans 2018-08-29 09:54:54 +02:00
parent 4c7fd98479
commit 5fb984a647
3 changed files with 12 additions and 12 deletions

View file

@ -100,7 +100,7 @@ static int set_mask(pa_context *c, struct global *g)
{ {
const char *str; const char *str;
if (g->type == PW_ID_INTERFACE_Node) { if (g->type == PW_TYPE_INTERFACE_Node) {
if (g->props == NULL) if (g->props == NULL)
return 0; return 0;
if ((str = pw_properties_get(g->props, "media.class")) == NULL) if ((str = pw_properties_get(g->props, "media.class")) == NULL)
@ -137,18 +137,18 @@ static int set_mask(pa_context *c, struct global *g)
g->event = PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT; g->event = PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT;
} }
} }
else if (g->type == PW_ID_INTERFACE_Module) { else if (g->type == PW_TYPE_INTERFACE_Module) {
g->mask = PA_SUBSCRIPTION_MASK_MODULE; g->mask = PA_SUBSCRIPTION_MASK_MODULE;
g->event = PA_SUBSCRIPTION_EVENT_MODULE; g->event = PA_SUBSCRIPTION_EVENT_MODULE;
} }
else if (g->type == PW_ID_INTERFACE_Client) { else if (g->type == PW_TYPE_INTERFACE_Client) {
g->mask = PA_SUBSCRIPTION_MASK_CLIENT; g->mask = PA_SUBSCRIPTION_MASK_CLIENT;
g->event = PA_SUBSCRIPTION_EVENT_CLIENT; g->event = PA_SUBSCRIPTION_EVENT_CLIENT;
} }
else if (g->type == PW_ID_INTERFACE_Port) { else if (g->type == PW_TYPE_INTERFACE_Port) {
pw_log_debug("found port %d", g->id); pw_log_debug("found port %d", g->id);
} }
else if (g->type == PW_ID_INTERFACE_Link) { else if (g->type == PW_TYPE_INTERFACE_Link) {
if ((str = pw_properties_get(g->props, "link.output")) == NULL) if ((str = pw_properties_get(g->props, "link.output")) == NULL)
return 0; return 0;
g->link_info.src = pa_context_find_global(c, pw_properties_parse_int(str)); g->link_info.src = pa_context_find_global(c, pw_properties_parse_int(str));
@ -262,7 +262,7 @@ static void remote_state_changed(void *data, enum pw_remote_state old,
c->core_proxy = pw_remote_get_core_proxy(c->remote); c->core_proxy = pw_remote_get_core_proxy(c->remote);
c->registry_proxy = pw_core_proxy_get_registry(c->core_proxy, c->registry_proxy = pw_core_proxy_get_registry(c->core_proxy,
PW_ID_INTERFACE_Registry, PW_TYPE_INTERFACE_Registry,
PW_VERSION_REGISTRY, 0); PW_VERSION_REGISTRY, 0);
pw_registry_proxy_add_listener(c->registry_proxy, pw_registry_proxy_add_listener(c->registry_proxy,
&c->registry_listener, &c->registry_listener,

View file

@ -71,17 +71,17 @@ static int ensure_global(pa_context *c, struct global *g)
if (g->proxy != NULL) if (g->proxy != NULL)
return 0; return 0;
if (g->type == PW_ID_INTERFACE_Node) { if (g->type == PW_TYPE_INTERFACE_Node) {
events = &node_events; events = &node_events;
client_version = PW_VERSION_NODE; client_version = PW_VERSION_NODE;
destroy = (pw_destroy_t) pw_node_info_free; destroy = (pw_destroy_t) pw_node_info_free;
} }
else if (g->type == PW_ID_INTERFACE_Module) { else if (g->type == PW_TYPE_INTERFACE_Module) {
events = &module_events; events = &module_events;
client_version = PW_VERSION_MODULE; client_version = PW_VERSION_MODULE;
destroy = (pw_destroy_t) pw_module_info_free; destroy = (pw_destroy_t) pw_module_info_free;
} }
else if (g->type == PW_ID_INTERFACE_Client) { else if (g->type == PW_TYPE_INTERFACE_Client) {
events = &client_events; events = &client_events;
client_version = PW_VERSION_CLIENT; client_version = PW_VERSION_CLIENT;
destroy = (pw_destroy_t) pw_client_info_free; destroy = (pw_destroy_t) pw_client_info_free;

View file

@ -110,7 +110,7 @@ static struct global *find_linked(pa_stream *s, uint32_t idx)
pa_context *c = s->context; pa_context *c = s->context;
spa_list_for_each(g, &c->globals, link) { spa_list_for_each(g, &c->globals, link) {
if (g->type != PW_ID_INTERFACE_Link) if (g->type != PW_TYPE_INTERFACE_Link)
continue; continue;
pw_log_debug("%d %d %d", idx, pw_log_debug("%d %d %d", idx,
@ -209,7 +209,7 @@ static const struct spa_pod *get_buffers_param(pa_stream *s, pa_buffer_attr *att
size, buffers); size, buffers);
param = spa_pod_builder_object(b, param = spa_pod_builder_object(b,
SPA_PARAM_Buffers, SPA_ID_OBJECT_ParamBuffers, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
":", SPA_PARAM_BUFFERS_buffers, "iru", buffers, ":", SPA_PARAM_BUFFERS_buffers, "iru", buffers,
SPA_POD_PROP_MIN_MAX(3, MAX_BUFFERS), SPA_POD_PROP_MIN_MAX(3, MAX_BUFFERS),
":", SPA_PARAM_BUFFERS_blocks, "i", blocks, ":", SPA_PARAM_BUFFERS_blocks, "i", blocks,
@ -656,7 +656,7 @@ static const struct spa_pod *get_param(pa_stream *s, pa_sample_spec *ss, pa_chan
{ {
const struct spa_pod *param; const struct spa_pod *param;
param = spa_pod_builder_object(b, param = spa_pod_builder_object(b,
SPA_PARAM_EnumFormat, SPA_ID_OBJECT_Format, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
"I", SPA_MEDIA_TYPE_audio, "I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw, "I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", format_pa2id(s, ss->format), ":", SPA_FORMAT_AUDIO_format, "I", format_pa2id(s, ss->format),