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 #include <sys/types.h>
00026
00027 #include <pulse/sample.h>
00028 #include <pulse/channelmap.h>
00029 #include <pulse/volume.h>
00030 #include <pulse/def.h>
00031 #include <pulse/cdecl.h>
00032 #include <pulse/operation.h>
00033
00262 PA_C_DECL_BEGIN
00263
00265 typedef struct pa_stream pa_stream;
00266
00268 typedef void (*pa_stream_success_cb_t) (pa_stream*s, int success, void *userdata);
00269
00271 typedef void (*pa_stream_request_cb_t)(pa_stream *p, size_t length, void *userdata);
00272
00274 typedef void (*pa_stream_notify_cb_t)(pa_stream *p, void *userdata);
00275
00277 pa_stream* pa_stream_new(
00278 pa_context *c ,
00279 const char *name ,
00280 const pa_sample_spec *ss ,
00281 const pa_channel_map *map );
00282
00284 void pa_stream_unref(pa_stream *s);
00285
00287 pa_stream *pa_stream_ref(pa_stream *s);
00288
00290 pa_stream_state_t pa_stream_get_state(pa_stream *p);
00291
00293 pa_context* pa_stream_get_context(pa_stream *p);
00294
00296 uint32_t pa_stream_get_index(pa_stream *s);
00297
00299 int pa_stream_connect_playback(
00300 pa_stream *s ,
00301 const char *dev ,
00302 const pa_buffer_attr *attr ,
00303 pa_stream_flags_t flags ,
00304 pa_cvolume *volume ,
00305 pa_stream *sync_stream );
00306
00308 int pa_stream_connect_record(
00309 pa_stream *s ,
00310 const char *dev ,
00311 const pa_buffer_attr *attr ,
00312 pa_stream_flags_t flags );
00313
00315 int pa_stream_disconnect(pa_stream *s);
00316
00324 int pa_stream_write(
00325 pa_stream *p ,
00326 const void *data ,
00327 size_t length ,
00328 pa_free_cb_t free_cb ,
00329 int64_t offset,
00330 pa_seek_mode_t seek );
00331
00337 int pa_stream_peek(
00338 pa_stream *p ,
00339 const void **data ,
00340 size_t *length );
00341
00344 int pa_stream_drop(pa_stream *p);
00345
00347 size_t pa_stream_writable_size(pa_stream *p);
00348
00350 size_t pa_stream_readable_size(pa_stream *p);
00351
00353 pa_operation* pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00354
00359 pa_operation* pa_stream_update_timing_info(pa_stream *p, pa_stream_success_cb_t cb, void *userdata);
00360
00362 void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata);
00363
00366 void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
00367
00370 void pa_stream_set_read_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
00371
00373 void pa_stream_set_overflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00374
00376 void pa_stream_set_underflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00377
00379 void pa_stream_set_latency_update_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
00380
00382 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata);
00383
00387 pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00388
00391 pa_operation* pa_stream_prebuf(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00392
00396 pa_operation* pa_stream_trigger(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
00397
00399 pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata);
00400
00416 int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec);
00417
00422 int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative);
00423
00434 const pa_timing_info* pa_stream_get_timing_info(pa_stream *s);
00435
00437 const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s);
00438
00440 const pa_channel_map* pa_stream_get_channel_map(pa_stream *s);
00441
00445 const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s);
00446
00447 PA_C_DECL_END
00448
00449 #endif