00001 #ifndef foostreamhfoo
00002 #define foostreamhfoo
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <sys/types.h>
00029
00030 #include <pulse/sample.h>
00031 #include <pulse/channelmap.h>
00032 #include <pulse/volume.h>
00033 #include <pulse/def.h>
00034 #include <pulse/cdecl.h>
00035 #include <pulse/operation.h>
00036
00265 PA_C_DECL_BEGIN
00266
00268 typedef struct pa_stream pa_stream;
00269
00271 typedef void (*pa_stream_success_cb_t) (pa_stream*s, int success, void *userdata);
00272
00274 typedef void (*pa_stream_request_cb_t)(pa_stream *p, size_t length, void *userdata);
00275
00277 typedef void (*pa_stream_notify_cb_t)(pa_stream *p, void *userdata);
00278
00280 pa_stream* pa_stream_new(
00281 pa_context *c ,
00282 const char *name ,
00283 const pa_sample_spec *ss ,
00284 const pa_channel_map *map );
00285
00287 void pa_stream_unref(pa_stream *s);
00288
00290 pa_stream *pa_stream_ref(pa_stream *s);
00291
00293 pa_stream_state_t pa_stream_get_state(pa_stream *p);
00294
00296 pa_context* pa_stream_get_context(pa_stream *p);
00297
00299 uint32_t pa_stream_get_index(pa_stream *s);
00300
00302 int pa_stream_connect_playback(
00303 pa_stream *s ,
00304 const char *dev ,
00305 const pa_buffer_attr *attr ,
00306 pa_stream_flags_t flags ,
00307 pa_cvolume *volume ,
00308 pa_stream *sync_stream );
00309
00311 int pa_stream_connect_record(
00312 pa_stream *s ,
00313 const char *dev ,
00314 const pa_buffer_attr *attr ,
00315 pa_stream_flags_t flags );
00316
00318 int pa_stream_disconnect(pa_stream *s);
00319
00327 int pa_stream_write(
00328 pa_stream *p ,
00329 const void *data ,
00330 size_t length ,
00331 pa_free_cb_t free_cb ,
00332 int64_t offset,
00333 pa_seek_mode_t seek );
00334
00340 int pa_stream_peek(
00341 pa_stream *p ,
00342 const void **data ,
00343 size_t *length );
00344
00347 int pa_stream_drop(pa_stream *p);
00348
00350 size_t pa_stream_writable_size(pa_stream *p);
00351
00353 size_t pa_stream_readable_size(pa_stream *p);
00354
00356 pa_operation* pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00357
00362 pa_operation* pa_stream_update_timing_info(pa_stream *p, pa_stream_success_cb_t cb, void *userdata);
00363
00365 void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata);
00366
00369 void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
00370
00373 void pa_stream_set_read_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
00374
00376 void pa_stream_set_overflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00377
00379 void pa_stream_set_underflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00380
00382 void pa_stream_set_latency_update_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00383
00385 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata);
00386
00390 pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00391
00394 pa_operation* pa_stream_prebuf(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00395
00399 pa_operation* pa_stream_trigger(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00400
00402 pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata);
00403
00419 int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec);
00420
00425 int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative);
00426
00437 const pa_timing_info* pa_stream_get_timing_info(pa_stream *s);
00438
00440 const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s);
00441
00443 const pa_channel_map* pa_stream_get_channel_map(pa_stream *s);
00444
00448 const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s);
00449
00450 PA_C_DECL_END
00451
00452 #endif