10
10
PulseAudio is free software; you can redistribute it and/or modify
11
11
it under the terms of the GNU Lesser General Public License as published
12
by the Free Software Foundation; either version 2 of the License,
12
by the Free Software Foundation; either version 2.1 of the License,
13
13
or (at your option) any later version.
15
15
PulseAudio is distributed in the hope that it will be useful, but
71
79
void *state_userdata;
72
80
pa_context_subscribe_cb_t subscribe_callback;
73
81
void *subscribe_userdata;
82
pa_context_event_cb_t event_callback;
75
85
pa_mempool *mempool;
77
87
pa_bool_t is_local:1;
78
88
pa_bool_t do_shm:1;
89
pa_bool_t server_specified:1;
80
91
pa_bool_t do_autospawn:1;
81
92
pa_spawn_api spawn_api;
153
164
uint32_t write_index_not_before;
154
165
uint32_t read_index_not_before;
156
/* Data about individual timing update correctoins */
167
/* Data about individual timing update corrections */
157
168
pa_index_correction write_index_corrections[PA_MAX_WRITE_INDEX_CORRECTIONS];
158
169
int current_write_index_correction;
160
171
/* Latency interpolation stuff */
161
172
pa_time_event *auto_timing_update_event;
173
pa_usec_t auto_timing_interval_usec;
163
175
pa_smoother *smoother;
181
193
void *suspended_userdata;
182
194
pa_stream_notify_cb_t started_callback;
183
195
void *started_userdata;
196
pa_stream_event_cb_t event_callback;
197
void *event_userdata;
198
pa_stream_notify_cb_t buffer_attr_callback;
199
void *buffer_attr_userdata;
186
202
typedef void (*pa_operation_cb_t)(void);
207
223
void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
208
224
void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
209
225
void pa_command_stream_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
226
void pa_command_stream_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
227
void pa_command_client_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
228
void pa_command_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
210
230
pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t callback, void *userdata);
211
231
void pa_operation_done(pa_operation *o);
226
246
pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *tag);
228
#define PA_CHECK_VALIDITY(context, expression, error) do { \
248
#define PA_CHECK_VALIDITY(context, expression, error) \
230
251
return -pa_context_set_error((context), (error)); \
234
#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) do { \
235
if (!(expression)) { \
236
pa_context_set_error((context), (error)); \
241
#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL)
255
#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) \
257
if (!(expression)) { \
258
pa_context_set_error((context), (error)); \
263
#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) \
264
PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL)
266
#define PA_FAIL(context, error) \
268
return -pa_context_set_error((context), (error)); \
271
#define PA_FAIL_RETURN_ANY(context, error, value) \
273
pa_context_set_error((context), (error)); \
277
#define PA_FAIL_RETURN_NULL(context, error) \
278
PA_FAIL_RETURN_ANY(context, error, NULL)
243
280
void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t);