mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: message: store pointer to impl directly
Store a pointer to the owner `impl` object instead of the (embedded) `stat` object. This way `message_free()` can be simplified since the owner `impl` does not need to be passed explicitly.
This commit is contained in:
parent
b843b0ab29
commit
080a97c0bb
5 changed files with 27 additions and 30 deletions
|
|
@ -32,11 +32,10 @@
|
|||
#include <spa/support/log.h>
|
||||
|
||||
struct impl;
|
||||
struct stats;
|
||||
|
||||
struct message {
|
||||
struct spa_list link;
|
||||
struct stats *stat;
|
||||
struct impl *impl;
|
||||
uint32_t extra[4];
|
||||
uint32_t channel;
|
||||
uint32_t allocated;
|
||||
|
|
@ -68,7 +67,7 @@ enum {
|
|||
};
|
||||
|
||||
struct message *message_alloc(struct impl *impl, uint32_t channel, uint32_t size);
|
||||
void message_free(struct impl *impl, struct message *msg, bool dequeue, bool destroy);
|
||||
void message_free(struct message *msg, bool dequeue, bool destroy);
|
||||
int message_get(struct message *m, ...);
|
||||
int message_put(struct message *m, ...);
|
||||
int message_dump(enum spa_log_level level, struct message *m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue