]> code.delx.au - pulseaudio/blob - src/pulsecore/pstream.h
* add new function pa_check_in_group()
[pulseaudio] / src / pulsecore / pstream.h
1 #ifndef foopstreamhfoo
2 #define foopstreamhfoo
3
4 /* $Id$ */
5
6 /***
7 This file is part of PulseAudio.
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, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
24
25 #include <inttypes.h>
26
27 #include <pulse/mainloop-api.h>
28 #include <pulse/def.h>
29
30 #include <pulsecore/packet.h>
31 #include <pulsecore/memblock.h>
32 #include <pulsecore/iochannel.h>
33 #include <pulsecore/memchunk.h>
34 #include <pulsecore/creds.h>
35
36 typedef struct pa_pstream pa_pstream;
37
38 typedef void (*pa_pstream_packet_cb_t)(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata);
39 typedef void (*pa_pstream_memblock_cb_t)(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata);
40 typedef void (*pa_pstream_notify_cb_t)(pa_pstream *p, void *userdata);
41
42 pa_pstream* pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_memblock_stat *s);
43 void pa_pstream_unref(pa_pstream*p);
44 pa_pstream* pa_pstream_ref(pa_pstream*p);
45
46 void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_creds *creds);
47 void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk);
48
49 void pa_pstream_set_recieve_packet_callback(pa_pstream *p, pa_pstream_packet_cb_t cb, void *userdata);
50 void pa_pstream_set_recieve_memblock_callback(pa_pstream *p, pa_pstream_memblock_cb_t cb, void *userdata);
51 void pa_pstream_set_drain_callback(pa_pstream *p, pa_pstream_notify_cb_t cb, void *userdata);
52
53 void pa_pstream_set_die_callback(pa_pstream *p, pa_pstream_notify_cb_t cb, void *userdata);
54
55 int pa_pstream_is_pending(pa_pstream *p);
56
57 void pa_pstream_close(pa_pstream *p);
58
59 #endif