mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
packet: Make pa_packet_new() create fixed-size packets
if length exceeds maximum appended size, create a packet of type dynamic instead of type appended this is a preparation to use a separate free-list for packets document semantics of pa_packet_new_*() functions Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
5a2c41e5bf
commit
c1a7f0e326
2 changed files with 18 additions and 3 deletions
|
|
@ -25,7 +25,12 @@
|
|||
|
||||
typedef struct pa_packet pa_packet;
|
||||
|
||||
/* create empty packet (either of type appended or dynamic depending
|
||||
* on length) */
|
||||
pa_packet* pa_packet_new(size_t length);
|
||||
|
||||
/* data must have been malloc()ed; the packet takes ownership of the memory,
|
||||
* i.e. memory is free()d with the packet */
|
||||
pa_packet* pa_packet_new_dynamic(void* data, size_t length);
|
||||
|
||||
const void* pa_packet_data(pa_packet *p, size_t *l);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue