PulseAudio  1.1
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 
345  pa_context *c ,
346  const char *name ,
347  const pa_sample_spec *ss ,
348  const pa_channel_map *map );
349 
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 
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 
376 
379 
382 
387 uint32_t pa_stream_get_index(pa_stream *s);
388 
398 
407 const char *pa_stream_get_device_name(pa_stream *s);
408 
414 
418 
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 
445  pa_stream *s ,
446  const char *dev ,
447  const pa_buffer_attr *attr ,
448  pa_stream_flags_t flags );
449 
452 
482  pa_stream *p,
483  void **data,
484  size_t *nbytes);
485 
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 
543 
546 
552 
558 
561 
565 
569 
572 
578 
581 
588 
593 
600 
610 
613 void pa_stream_set_event_callback(pa_stream *p, pa_stream_event_cb_t cb, void *userdata);
614 
621 
632 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata);
633 
639 
643 
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 
712 
715 
718 
721 
731 
741 
747 pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata);
748 
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 
771 
772 PA_C_DECL_END
773 
774 #endif