PulseAudio 0.9.22-1bP
|
00001 #ifndef foostreamhfoo 00002 #define foostreamhfoo 00003 00004 /*** 00005 This file is part of PulseAudio. 00006 00007 Copyright 2004-2006 Lennart Poettering 00008 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB 00009 00010 PulseAudio is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published 00012 by the Free Software Foundation; either version 2.1 of the License, 00013 or (at your option) any later version. 00014 00015 PulseAudio is distributed in the hope that it will be useful, but 00016 WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with PulseAudio; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 USA. 00024 ***/ 00025 00026 #include <sys/types.h> 00027 00028 #include <pulse/sample.h> 00029 #include <pulse/channelmap.h> 00030 #include <pulse/volume.h> 00031 #include <pulse/def.h> 00032 #include <pulse/cdecl.h> 00033 #include <pulse/operation.h> 00034 #include <pulse/context.h> 00035 #include <pulse/proplist.h> 00036 00318 PA_C_DECL_BEGIN 00319 00321 typedef struct pa_stream pa_stream; 00322 00324 typedef void (*pa_stream_success_cb_t) (pa_stream*s, int success, void *userdata); 00325 00327 typedef void (*pa_stream_request_cb_t)(pa_stream *p, size_t nbytes, void *userdata); 00328 00330 typedef void (*pa_stream_notify_cb_t)(pa_stream *p, void *userdata); 00331 00338 typedef void (*pa_stream_event_cb_t)(pa_stream *p, const char *name, pa_proplist *pl, void *userdata); 00339 00343 pa_stream* pa_stream_new( 00344 pa_context *c , 00345 const char *name , 00346 const pa_sample_spec *ss , 00347 const pa_channel_map *map ); 00348 00352 pa_stream* pa_stream_new_with_proplist( 00353 pa_context *c , 00354 const char *name , 00355 const pa_sample_spec *ss , 00356 const pa_channel_map *map , 00357 pa_proplist *p ); 00358 00360 void pa_stream_unref(pa_stream *s); 00361 00363 pa_stream *pa_stream_ref(pa_stream *s); 00364 00366 pa_stream_state_t pa_stream_get_state(pa_stream *p); 00367 00369 pa_context* pa_stream_get_context(pa_stream *p); 00370 00375 uint32_t pa_stream_get_index(pa_stream *s); 00376 00385 uint32_t pa_stream_get_device_index(pa_stream *s); 00386 00395 const char *pa_stream_get_device_name(pa_stream *s); 00396 00401 int pa_stream_is_suspended(pa_stream *s); 00402 00405 int pa_stream_is_corked(pa_stream *s); 00406 00423 int pa_stream_connect_playback( 00424 pa_stream *s , 00425 const char *dev , 00426 const pa_buffer_attr *attr , 00427 pa_stream_flags_t flags , 00428 const pa_cvolume *volume , 00429 pa_stream *sync_stream ); 00430 00432 int pa_stream_connect_record( 00433 pa_stream *s , 00434 const char *dev , 00435 const pa_buffer_attr *attr , 00436 pa_stream_flags_t flags ); 00437 00439 int pa_stream_disconnect(pa_stream *s); 00440 00469 int pa_stream_begin_write( 00470 pa_stream *p, 00471 void **data, 00472 size_t *nbytes); 00473 00483 int pa_stream_cancel_write( 00484 pa_stream *p); 00485 00506 int pa_stream_write( 00507 pa_stream *p , 00508 const void *data , 00509 size_t nbytes , 00510 pa_free_cb_t free_cb , 00511 int64_t offset, 00512 pa_seek_mode_t seek ); 00513 00520 int pa_stream_peek( 00521 pa_stream *p , 00522 const void **data , 00523 size_t *nbytes ); 00524 00527 int pa_stream_drop(pa_stream *p); 00528 00530 size_t pa_stream_writable_size(pa_stream *p); 00531 00533 size_t pa_stream_readable_size(pa_stream *p); 00534 00539 pa_operation* pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *userdata); 00540 00545 pa_operation* pa_stream_update_timing_info(pa_stream *p, pa_stream_success_cb_t cb, void *userdata); 00546 00548 void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata); 00549 00552 void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata); 00553 00556 void pa_stream_set_read_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata); 00557 00559 void pa_stream_set_overflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00560 00562 void pa_stream_set_underflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00563 00569 void pa_stream_set_started_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00570 00574 void pa_stream_set_latency_update_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00575 00581 void pa_stream_set_moved_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00582 00591 void pa_stream_set_suspended_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00592 00595 void pa_stream_set_event_callback(pa_stream *p, pa_stream_event_cb_t cb, void *userdata); 00596 00602 void pa_stream_set_buffer_attr_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata); 00603 00614 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata); 00615 00620 pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata); 00621 00624 pa_operation* pa_stream_prebuf(pa_stream *s, pa_stream_success_cb_t cb, void *userdata); 00625 00629 pa_operation* pa_stream_trigger(pa_stream *s, pa_stream_success_cb_t cb, void *userdata); 00630 00632 pa_operation* pa_stream_set_name(pa_stream *s, const char *name, pa_stream_success_cb_t cb, void *userdata); 00633 00665 int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec); 00666 00677 int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative); 00678 00693 const pa_timing_info* pa_stream_get_timing_info(pa_stream *s); 00694 00696 const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s); 00697 00699 const pa_channel_map* pa_stream_get_channel_map(pa_stream *s); 00700 00709 const pa_buffer_attr* pa_stream_get_buffer_attr(pa_stream *s); 00710 00719 pa_operation *pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata); 00720 00726 pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata); 00727 00734 pa_operation *pa_stream_proplist_update(pa_stream *s, pa_update_mode_t mode, pa_proplist *p, pa_stream_success_cb_t cb, void *userdata); 00735 00738 pa_operation *pa_stream_proplist_remove(pa_stream *s, const char *const keys[], pa_stream_success_cb_t cb, void *userdata); 00739 00744 int pa_stream_set_monitor_stream(pa_stream *s, uint32_t sink_input_idx); 00745 00749 uint32_t pa_stream_get_monitor_stream(pa_stream *s); 00750 00751 PA_C_DECL_END 00752 00753 #endif