PulseAudio
2.1
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
stream.h
Go to the documentation of this file.
1
#ifndef foostreamhfoo
2
#define foostreamhfoo
3
4
/***
5
This file is part of PulseAudio.
6
7
Copyright 2004-2006 Lennart Poettering
8
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
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 published
12
by the Free Software Foundation; either version 2.1 of the License,
13
or (at your option) any later version.
14
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
General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public License
21
along with PulseAudio; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23
USA.
24
***/
25
26
#include <sys/types.h>
27
28
#include <
pulse/sample.h
>
29
#include <
pulse/format.h
>
30
#include <
pulse/channelmap.h
>
31
#include <
pulse/volume.h
>
32
#include <
pulse/def.h
>
33
#include <pulse/cdecl.h>
34
#include <
pulse/operation.h
>
35
#include <
pulse/context.h
>
36
#include <
pulse/proplist.h
>
37
319
PA_C_DECL_BEGIN
320
322
typedef
struct
pa_stream
pa_stream
;
323
325
typedef
void (*
pa_stream_success_cb_t
) (
pa_stream
*s,
int
success,
void
*userdata);
326
328
typedef
void (*
pa_stream_request_cb_t
)(
pa_stream
*p,
size_t
nbytes,
void
*userdata);
329
331
typedef
void (*
pa_stream_notify_cb_t
)(
pa_stream
*p,
void
*userdata);
332
339
typedef
void (*
pa_stream_event_cb_t
)(
pa_stream
*p,
const
char
*name,
pa_proplist
*pl,
void
*userdata);
340
344
pa_stream
*
pa_stream_new
(
345
pa_context
*c ,
346
const
char
*name ,
347
const
pa_sample_spec
*ss ,
348
const
pa_channel_map
*map );
349
353
pa_stream
*
pa_stream_new_with_proplist
(
354
pa_context
*c ,
355
const
char
*name ,
356
const
pa_sample_spec
*ss ,
357
const
pa_channel_map
*map ,
358
pa_proplist
*p );
359
364
pa_stream
*
pa_stream_new_extended
(
365
pa_context
*c ,
366
const
char
*name ,
367
pa_format_info
*
const
* formats ,
368
unsigned
int
n_formats ,
369
pa_proplist
*p );
370
372
void
pa_stream_unref
(
pa_stream
*s);
373
375
pa_stream
*
pa_stream_ref
(
pa_stream
*s);
376
378
pa_stream_state_t
pa_stream_get_state
(
pa_stream
*p);
379
381
pa_context
*
pa_stream_get_context
(
pa_stream
*p);
382
387
uint32_t
pa_stream_get_index
(
pa_stream
*s);
388
398
uint32_t
pa_stream_get_device_index
(
pa_stream
*s);
399
409
const
char
*
pa_stream_get_device_name
(
pa_stream
*s);
410
415
int
pa_stream_is_suspended
(
pa_stream
*s);
416
419
int
pa_stream_is_corked
(
pa_stream
*s);
420
439
int
pa_stream_connect_playback
(
440
pa_stream
*s ,
441
const
char
*dev ,
442
const
pa_buffer_attr
*attr ,
443
pa_stream_flags_t
flags ,
444
const
pa_cvolume
*volume ,
445
pa_stream
*sync_stream );
446
448
int
pa_stream_connect_record
(
449
pa_stream
*s ,
450
const
char
*dev ,
451
const
pa_buffer_attr
*attr ,
452
pa_stream_flags_t
flags );
453
455
int
pa_stream_disconnect
(
pa_stream
*s);
456
489
int
pa_stream_begin_write
(
490
pa_stream
*p,
491
void
**data,
492
size_t
*nbytes);
493
503
int
pa_stream_cancel_write
(
504
pa_stream
*p);
505
528
int
pa_stream_write
(
529
pa_stream
*p ,
530
const
void
*data ,
531
size_t
nbytes ,
532
pa_free_cb_t
free_cb ,
533
int64_t offset,
534
pa_seek_mode_t
seek );
535
542
int
pa_stream_peek
(
543
pa_stream
*p ,
544
const
void
**data ,
545
size_t
*nbytes );
546
549
int
pa_stream_drop
(
pa_stream
*p);
550
552
size_t
pa_stream_writable_size
(
pa_stream
*p);
553
555
size_t
pa_stream_readable_size
(
pa_stream
*p);
556
561
pa_operation
*
pa_stream_drain
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
562
567
pa_operation
*
pa_stream_update_timing_info
(
pa_stream
*p,
pa_stream_success_cb_t
cb,
void
*userdata);
568
570
void
pa_stream_set_state_callback
(
pa_stream
*s,
pa_stream_notify_cb_t
cb,
void
*userdata);
571
574
void
pa_stream_set_write_callback
(
pa_stream
*p,
pa_stream_request_cb_t
cb,
void
*userdata);
575
577
void
pa_stream_set_read_callback
(
pa_stream
*p,
pa_stream_request_cb_t
cb,
void
*userdata);
578
580
void
pa_stream_set_overflow_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
581
586
int64_t
pa_stream_get_underflow_index
(
pa_stream
*p);
587
589
void
pa_stream_set_underflow_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
590
596
void
pa_stream_set_started_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
597
601
void
pa_stream_set_latency_update_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
602
608
void
pa_stream_set_moved_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
609
618
void
pa_stream_set_suspended_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
619
622
void
pa_stream_set_event_callback
(
pa_stream
*p,
pa_stream_event_cb_t
cb,
void
*userdata);
623
629
void
pa_stream_set_buffer_attr_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
630
641
pa_operation
*
pa_stream_cork
(
pa_stream
*s,
int
b,
pa_stream_success_cb_t
cb,
void
*userdata);
642
647
pa_operation
*
pa_stream_flush
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
648
651
pa_operation
*
pa_stream_prebuf
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
652
656
pa_operation
*
pa_stream_trigger
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
657
659
pa_operation
*
pa_stream_set_name
(
pa_stream
*s,
const
char
*name,
pa_stream_success_cb_t
cb,
void
*userdata);
660
692
int
pa_stream_get_time
(
pa_stream
*s,
pa_usec_t
*r_usec);
693
706
int
pa_stream_get_latency
(
pa_stream
*s,
pa_usec_t
*r_usec,
int
*negative);
707
722
const
pa_timing_info
*
pa_stream_get_timing_info
(
pa_stream
*s);
723
725
const
pa_sample_spec
*
pa_stream_get_sample_spec
(
pa_stream
*s);
726
728
const
pa_channel_map
*
pa_stream_get_channel_map
(
pa_stream
*s);
729
731
const
pa_format_info
*
pa_stream_get_format_info
(
pa_stream
*s);
732
741
const
pa_buffer_attr
*
pa_stream_get_buffer_attr
(
pa_stream
*s);
742
751
pa_operation
*
pa_stream_set_buffer_attr
(
pa_stream
*s,
const
pa_buffer_attr
*attr,
pa_stream_success_cb_t
cb,
void
*userdata);
752
758
pa_operation
*
pa_stream_update_sample_rate
(
pa_stream
*s, uint32_t rate,
pa_stream_success_cb_t
cb,
void
*userdata);
759
766
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);
767
770
pa_operation
*
pa_stream_proplist_remove
(
pa_stream
*s,
const
char
*
const
keys[],
pa_stream_success_cb_t
cb,
void
*userdata);
771
776
int
pa_stream_set_monitor_stream
(
pa_stream
*s, uint32_t sink_input_idx);
777
781
uint32_t
pa_stream_get_monitor_stream
(
pa_stream
*s);
782
783
PA_C_DECL_END
784
785
#endif
src
pulse
stream.h
Generated on Thu Aug 30 2012 14:35:35 for PulseAudio by
1.8.1.2