PulseAudio
1.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
397
uint32_t
pa_stream_get_device_index
(
pa_stream
*s);
398
407
const
char
*
pa_stream_get_device_name
(
pa_stream
*s);
408
413
int
pa_stream_is_suspended
(
pa_stream
*s);
414
417
int
pa_stream_is_corked
(
pa_stream
*s);
418
435
int
pa_stream_connect_playback
(
436
pa_stream
*s ,
437
const
char
*dev ,
438
const
pa_buffer_attr
*attr ,
439
pa_stream_flags_t
flags ,
440
const
pa_cvolume
*volume ,
441
pa_stream
*sync_stream );
442
444
int
pa_stream_connect_record
(
445
pa_stream
*s ,
446
const
char
*dev ,
447
const
pa_buffer_attr
*attr ,
448
pa_stream_flags_t
flags );
449
451
int
pa_stream_disconnect
(
pa_stream
*s);
452
481
int
pa_stream_begin_write
(
482
pa_stream
*p,
483
void
**data,
484
size_t
*nbytes);
485
495
int
pa_stream_cancel_write
(
496
pa_stream
*p);
497
518
int
pa_stream_write
(
519
pa_stream
*p ,
520
const
void
*data ,
521
size_t
nbytes ,
522
pa_free_cb_t
free_cb ,
523
int64_t offset,
524
pa_seek_mode_t
seek );
525
532
int
pa_stream_peek
(
533
pa_stream
*p ,
534
const
void
**data ,
535
size_t
*nbytes );
536
539
int
pa_stream_drop
(
pa_stream
*p);
540
542
size_t
pa_stream_writable_size
(
pa_stream
*p);
543
545
size_t
pa_stream_readable_size
(
pa_stream
*p);
546
551
pa_operation
*
pa_stream_drain
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
552
557
pa_operation
*
pa_stream_update_timing_info
(
pa_stream
*p,
pa_stream_success_cb_t
cb,
void
*userdata);
558
560
void
pa_stream_set_state_callback
(
pa_stream
*s,
pa_stream_notify_cb_t
cb,
void
*userdata);
561
564
void
pa_stream_set_write_callback
(
pa_stream
*p,
pa_stream_request_cb_t
cb,
void
*userdata);
565
568
void
pa_stream_set_read_callback
(
pa_stream
*p,
pa_stream_request_cb_t
cb,
void
*userdata);
569
571
void
pa_stream_set_overflow_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
572
577
int64_t
pa_stream_get_underflow_index
(
pa_stream
*p);
578
580
void
pa_stream_set_underflow_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
581
587
void
pa_stream_set_started_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
588
592
void
pa_stream_set_latency_update_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
593
599
void
pa_stream_set_moved_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
600
609
void
pa_stream_set_suspended_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
610
613
void
pa_stream_set_event_callback
(
pa_stream
*p,
pa_stream_event_cb_t
cb,
void
*userdata);
614
620
void
pa_stream_set_buffer_attr_callback
(
pa_stream
*p,
pa_stream_notify_cb_t
cb,
void
*userdata);
621
632
pa_operation
*
pa_stream_cork
(
pa_stream
*s,
int
b,
pa_stream_success_cb_t
cb,
void
*userdata);
633
638
pa_operation
*
pa_stream_flush
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
639
642
pa_operation
*
pa_stream_prebuf
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
643
647
pa_operation
*
pa_stream_trigger
(
pa_stream
*s,
pa_stream_success_cb_t
cb,
void
*userdata);
648
650
pa_operation
*
pa_stream_set_name
(
pa_stream
*s,
const
char
*name,
pa_stream_success_cb_t
cb,
void
*userdata);
651
683
int
pa_stream_get_time
(
pa_stream
*s,
pa_usec_t
*r_usec);
684
695
int
pa_stream_get_latency
(
pa_stream
*s,
pa_usec_t
*r_usec,
int
*negative);
696
711
const
pa_timing_info
*
pa_stream_get_timing_info
(
pa_stream
*s);
712
714
const
pa_sample_spec
*
pa_stream_get_sample_spec
(
pa_stream
*s);
715
717
const
pa_channel_map
*
pa_stream_get_channel_map
(
pa_stream
*s);
718
720
const
pa_format_info
*
pa_stream_get_format_info
(
pa_stream
*s);
721
730
const
pa_buffer_attr
*
pa_stream_get_buffer_attr
(
pa_stream
*s);
731
740
pa_operation
*
pa_stream_set_buffer_attr
(
pa_stream
*s,
const
pa_buffer_attr
*attr,
pa_stream_success_cb_t
cb,
void
*userdata);
741
747
pa_operation
*
pa_stream_update_sample_rate
(
pa_stream
*s, uint32_t rate,
pa_stream_success_cb_t
cb,
void
*userdata);
748
755
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);
756
759
pa_operation
*
pa_stream_proplist_remove
(
pa_stream
*s,
const
char
*
const
keys[],
pa_stream_success_cb_t
cb,
void
*userdata);
760
765
int
pa_stream_set_monitor_stream
(
pa_stream
*s, uint32_t sink_input_idx);
766
770
uint32_t
pa_stream_get_monitor_stream
(
pa_stream
*s);
771
772
PA_C_DECL_END
773
774
#endif
src
pulse
stream.h
Generated by
1.8.1