PulseAudio  3.0.0-7.1.mga3
format.h
Go to the documentation of this file.
1 #ifndef fooformathfoo
2 #define fooformathfoo
3 
4 /***
5  This file is part of PulseAudio.
6 
7  Copyright 2011 Intel Corporation
8  Copyright 2011 Collabora Multimedia
9  Copyright 2011 Arun Raghavan <arun.raghavan@collabora.co.uk>
10 
11  PulseAudio is free software; you can redistribute it and/or modify
12  it under the terms of the GNU Lesser General Public License as published
13  by the Free Software Foundation; either version 2.1 of the License,
14  or (at your option) any later version.
15 
16  PulseAudio is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public License
22  along with PulseAudio; if not, write to the Free Software
23  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24  USA.
25 ***/
26 
27 #include <pulse/cdecl.h>
28 #include <pulse/gccmacro.h>
29 #include <pulse/proplist.h>
30 #include <pulse/sample.h>
31 #include <pulse/channelmap.h>
32 
36 PA_C_DECL_BEGIN
37 
39 typedef enum pa_encoding {
64 
67 
69 pa_encoding_t pa_encoding_from_string(const char *encoding);
70 
72 typedef struct pa_format_info {
79 
82 
85 
88 
91 
94 
103 
109 #define PA_FORMAT_INFO_SNPRINT_MAX 256
110 
112 char *pa_format_info_snprint(char *s, size_t l, const pa_format_info *f);
113 
117 
120 
127 
129 typedef enum pa_prop_type_t {
148 
151 
153 int pa_format_info_get_prop_int(pa_format_info *f, const char *key, int *v);
156 int pa_format_info_get_prop_int_range(pa_format_info *f, const char *key, int *min, int *max);
160 int pa_format_info_get_prop_int_array(pa_format_info *f, const char *key, int **values, int *n_values);
163 int pa_format_info_get_prop_string(pa_format_info *f, const char *key, char **v);
167 int pa_format_info_get_prop_string_array(pa_format_info *f, const char *key, char ***values, int *n_values);
168 
170 void pa_format_info_free_string_array(char **values, int n_values);
171 
173 void pa_format_info_set_prop_int(pa_format_info *f, const char *key, int value);
175 void pa_format_info_set_prop_int_array(pa_format_info *f, const char *key, const int *values, int n_values);
177 void pa_format_info_set_prop_int_range(pa_format_info *f, const char *key, int min, int max);
179 void pa_format_info_set_prop_string(pa_format_info *f, const char *key, const char *value);
181 void pa_format_info_set_prop_string_array(pa_format_info *f, const char *key, const char **values, int n_values);
182 
186 void pa_format_info_set_rate(pa_format_info *f, int rate);
188 void pa_format_info_set_channels(pa_format_info *f, int channels);
191 
192 PA_C_DECL_END
193 
194 #endif