daemon: add nice value in service file to improve performance
[platform/upstream/pulseaudio.git] / src / pulsecore / packet.h
1 #ifndef foopackethfoo
2 #define foopackethfoo
3
4 /***
5   This file is part of PulseAudio.
6
7   Copyright 2004-2006 Lennart Poettering
8
9   PulseAudio is free software; you can redistribute it and/or modify
10   it under the terms of the GNU Lesser General Public License as
11   published by the Free Software Foundation; either version 2.1 of the
12   License, or (at your option) any later version.
13
14   PulseAudio is distributed in the hope that it will be useful, but
15   WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   Lesser General Public License for more details.
18
19   You should have received a copy of the GNU Lesser General Public
20   License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
21 ***/
22
23 #include <sys/types.h>
24 #include <inttypes.h>
25
26 typedef struct pa_packet pa_packet;
27
28 /* create empty packet (either of type appended or dynamic depending
29  * on length) */
30 pa_packet* pa_packet_new(size_t length);
31
32 /* create packet (either of type appended or dynamic depending on length)
33  * and copy data */
34 pa_packet* pa_packet_new_data(const void* data, size_t length);
35
36 /* data must have been malloc()ed; the packet takes ownership of the memory,
37  * i.e. memory is free()d with the packet */
38 pa_packet* pa_packet_new_dynamic(void* data, size_t length);
39
40 const void* pa_packet_data(pa_packet *p, size_t *l);
41
42 pa_packet* pa_packet_ref(pa_packet *p);
43 void pa_packet_unref(pa_packet *p);
44
45 #endif