mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
pw_core -> pw_context
The proxy API is the one that we would like to expose for applications and the other API is used internally when implementing modules or factories. The current pw_core object is really a context for all objects so name it that way. It also makes it possible to rename pw_core_proxy to pw_proxy later.
This commit is contained in:
parent
42103a8218
commit
8ea78c2e3f
113 changed files with 905 additions and 906 deletions
|
|
@ -63,7 +63,7 @@ struct buffer {
|
|||
|
||||
struct impl {
|
||||
struct pw_protocol_native_connection this;
|
||||
struct pw_core *core;
|
||||
struct pw_context *context;
|
||||
|
||||
struct buffer in, out;
|
||||
struct spa_pod_builder builder;
|
||||
|
|
@ -225,7 +225,7 @@ static void clear_buffer(struct buffer *buf)
|
|||
*
|
||||
* \memberof pw_protocol_native_connection
|
||||
*/
|
||||
struct pw_protocol_native_connection *pw_protocol_native_connection_new(struct pw_core *core, int fd)
|
||||
struct pw_protocol_native_connection *pw_protocol_native_connection_new(struct pw_context *context, int fd)
|
||||
{
|
||||
struct impl *impl;
|
||||
struct pw_protocol_native_connection *this;
|
||||
|
|
@ -235,7 +235,7 @@ struct pw_protocol_native_connection *pw_protocol_native_connection_new(struct p
|
|||
return NULL;
|
||||
|
||||
debug_messages = pw_debug_is_category_enabled("connection");
|
||||
impl->core = core;
|
||||
impl->context = context;
|
||||
|
||||
this = &impl->this;
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ pw_protocol_native_connection_add_listener(struct pw_protocol_native_connection
|
|||
}
|
||||
|
||||
struct pw_protocol_native_connection *
|
||||
pw_protocol_native_connection_new(struct pw_core *core, int fd);
|
||||
pw_protocol_native_connection_new(struct pw_context *context, int fd);
|
||||
|
||||
int pw_protocol_native_connection_set_fd(struct pw_protocol_native_connection *conn, int fd);
|
||||
|
||||
|
|
|
|||
|
|
@ -123,23 +123,23 @@ static void test_read_write(struct pw_protocol_native_connection *in,
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct pw_main_loop *loop;
|
||||
struct pw_core *core;
|
||||
struct pw_context *context;
|
||||
struct pw_protocol_native_connection *in, *out;
|
||||
int fds[2];
|
||||
|
||||
pw_init(&argc, &argv);
|
||||
|
||||
loop = pw_main_loop_new(NULL);
|
||||
core = pw_core_new(pw_main_loop_get_loop(loop), NULL, 0);
|
||||
context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 0);
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
|
||||
spa_assert_not_reached();
|
||||
return -1;
|
||||
}
|
||||
|
||||
in = pw_protocol_native_connection_new(core, fds[0]);
|
||||
in = pw_protocol_native_connection_new(context, fds[0]);
|
||||
spa_assert(in != NULL);
|
||||
out = pw_protocol_native_connection_new(core, fds[1]);
|
||||
out = pw_protocol_native_connection_new(context, fds[1]);
|
||||
spa_assert(out != NULL);
|
||||
|
||||
test_create(in);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue