5 This file is part of PulseAudio.
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as
12 published by the Free Software Foundation; either version 2.1 of the
13 License, or (at your option) any later version.
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with PulseAudio; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 #include <pulse/mainloop-api.h>
29 #include <pulse/def.h>
31 #include <pulsecore/packet.h>
32 #include <pulsecore/memblock.h>
33 #include <pulsecore/iochannel.h>
34 #include <pulsecore/memchunk.h>
35 #include <pulsecore/creds.h>
36 #include <pulsecore/macro.h>
38 typedef struct pa_pstream pa_pstream
;
40 typedef void (*pa_pstream_packet_cb_t
)(pa_pstream
*p
, pa_packet
*packet
, const pa_creds
*creds
, void *userdata
);
41 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
);
42 typedef void (*pa_pstream_notify_cb_t
)(pa_pstream
*p
, void *userdata
);
43 typedef void (*pa_pstream_block_id_cb_t
)(pa_pstream
*p
, uint32_t block_id
, void *userdata
);
45 pa_pstream
* pa_pstream_new(pa_mainloop_api
*m
, pa_iochannel
*io
, pa_mempool
*p
);
47 pa_pstream
* pa_pstream_ref(pa_pstream
*p
);
48 void pa_pstream_unref(pa_pstream
*p
);
50 void pa_pstream_unlink(pa_pstream
*p
);
52 void pa_pstream_send_packet(pa_pstream
*p
, pa_packet
*packet
, const pa_creds
*creds
);
53 void pa_pstream_send_memblock(pa_pstream
*p
, uint32_t channel
, int64_t offset
, pa_seek_mode_t seek
, const pa_memchunk
*chunk
);
54 void pa_pstream_send_release(pa_pstream
*p
, uint32_t block_id
);
55 void pa_pstream_send_revoke(pa_pstream
*p
, uint32_t block_id
);
57 void pa_pstream_set_recieve_packet_callback(pa_pstream
*p
, pa_pstream_packet_cb_t cb
, void *userdata
);
58 void pa_pstream_set_recieve_memblock_callback(pa_pstream
*p
, pa_pstream_memblock_cb_t cb
, void *userdata
);
59 void pa_pstream_set_drain_callback(pa_pstream
*p
, pa_pstream_notify_cb_t cb
, void *userdata
);
60 void pa_pstream_set_die_callback(pa_pstream
*p
, pa_pstream_notify_cb_t cb
, void *userdata
);
61 void pa_pstream_set_release_callback(pa_pstream
*p
, pa_pstream_block_id_cb_t cb
, void *userdata
);
62 void pa_pstream_set_revoke_callback(pa_pstream
*p
, pa_pstream_block_id_cb_t cb
, void *userdata
);
64 pa_bool_t
pa_pstream_is_pending(pa_pstream
*p
);
66 void pa_pstream_enable_shm(pa_pstream
*p
, pa_bool_t enable
);
67 pa_bool_t
pa_pstream_get_shm(pa_pstream
*p
);