mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Use interfaces
Add interfaces and events on objects. Use this to communicate with the objects and transparently convert/marshall to network in the protocols.
This commit is contained in:
parent
9b7debbfd3
commit
e0813b679d
16 changed files with 1307 additions and 822 deletions
|
|
@ -37,11 +37,6 @@ typedef struct _PinosResource PinosResource;
|
|||
|
||||
typedef void (*PinosDestroy) (void *object);
|
||||
|
||||
typedef SpaResult (*PinosDispatchFunc) (void *object,
|
||||
uint32_t opcode,
|
||||
void *message,
|
||||
void *data);
|
||||
|
||||
struct _PinosResource {
|
||||
PinosCore *core;
|
||||
SpaList link;
|
||||
|
|
@ -53,6 +48,10 @@ struct _PinosResource {
|
|||
void *object;
|
||||
PinosDestroy destroy;
|
||||
|
||||
const void *interface;
|
||||
const void *event;
|
||||
const void *marshall;
|
||||
|
||||
PINOS_SIGNAL (destroy_signal, (PinosListener *listener,
|
||||
PinosResource *resource));
|
||||
};
|
||||
|
|
@ -64,14 +63,6 @@ PinosResource * pinos_resource_new (PinosClient *client,
|
|||
PinosDestroy destroy);
|
||||
void pinos_resource_destroy (PinosResource *resource);
|
||||
|
||||
void pinos_resource_set_dispatch (PinosResource *resource,
|
||||
PinosDispatchFunc func,
|
||||
void *data);
|
||||
|
||||
SpaResult pinos_resource_dispatch (PinosResource *resource,
|
||||
uint32_t opcode,
|
||||
void *message);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue