mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
packet: Hide internals of pa_packet, introduce pa_packet_data()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
9f97f08f40
commit
5a2c41e5bf
5 changed files with 50 additions and 24 deletions
|
|
@ -23,18 +23,13 @@
|
|||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <pulsecore/refcnt.h>
|
||||
|
||||
typedef struct pa_packet {
|
||||
PA_REFCNT_DECLARE;
|
||||
enum { PA_PACKET_APPENDED, PA_PACKET_DYNAMIC } type;
|
||||
size_t length;
|
||||
uint8_t *data;
|
||||
} pa_packet;
|
||||
typedef struct pa_packet pa_packet;
|
||||
|
||||
pa_packet* pa_packet_new(size_t length);
|
||||
pa_packet* pa_packet_new_dynamic(void* data, size_t length);
|
||||
|
||||
const void* pa_packet_data(pa_packet *p, size_t *l);
|
||||
|
||||
pa_packet* pa_packet_ref(pa_packet *p);
|
||||
void pa_packet_unref(pa_packet *p);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue