core_proxy: prepare to rename pw_remote -> pw_core_proxy

The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.

With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.

This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
This commit is contained in:
Wim Taymans 2019-12-06 11:48:40 +01:00
parent f8aabe69fe
commit 8a959ea7a1
37 changed files with 919 additions and 1185 deletions

View file

@ -554,13 +554,10 @@ static pa_stream* stream_new(pa_context *c, const char *name,
NULL);
pw_properties_update(props, &s->proplist->props->dict);
s->stream = pw_stream_new(c->remote, name, props);
s->refcount = 1;
s->context = c;
spa_list_init(&s->pending);
pw_stream_add_listener(s->stream, &s->stream_listener, &stream_events, s);
s->endpoint_id = SPA_ID_INVALID;
s->direction = PA_STREAM_NODIRECTION;
s->state = PA_STREAM_UNCONNECTED;
@ -858,12 +855,20 @@ static int create_stream(pa_stream_direction_t direction,
struct spa_dict_item items[5];
char latency[64];
bool monitor;
const char *name;
pa_context *c = s->context;
spa_assert(s);
spa_assert(s->refcount >= 1);
pw_log_debug("stream %p: connect %s %08x", s, dev, flags);
name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
s->stream = pw_stream_new(c->core_proxy,
name, pw_properties_copy(c->props));
pw_stream_add_listener(s->stream, &s->stream_listener, &stream_events, s);
s->direction = direction;
s->timing_info_valid = false;
s->disconnecting = false;