PulseAudio
2.1
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
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
{
40
PA_ENCODING_ANY
,
43
PA_ENCODING_PCM
,
46
PA_ENCODING_AC3_IEC61937
,
49
PA_ENCODING_EAC3_IEC61937
,
52
PA_ENCODING_MPEG_IEC61937
,
55
PA_ENCODING_DTS_IEC61937
,
58
PA_ENCODING_MAX
,
61
PA_ENCODING_INVALID
= -1,
63
}
pa_encoding_t
;
64
66
const
char
*
pa_encoding_to_string
(
pa_encoding_t
e)
PA_GCC_CONST
;
67
69
pa_encoding_t
pa_encoding_from_string
(
const
char
*encoding);
70
72
typedef
struct
pa_format_info
{
73
pa_encoding_t
encoding
;
76
pa_proplist
*
plist
;
78
}
pa_format_info
;
79
81
pa_format_info
*
pa_format_info_new
(
void
);
82
84
pa_format_info
*
pa_format_info_copy
(
const
pa_format_info
*src);
85
87
void
pa_format_info_free
(
pa_format_info
*f);
88
90
int
pa_format_info_valid
(
const
pa_format_info
*f);
91
93
int
pa_format_info_is_pcm
(
const
pa_format_info
*f);
94
102
int
pa_format_info_is_compatible
(
pa_format_info
*first,
pa_format_info
*second);
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
116
pa_format_info
*
pa_format_info_from_string
(
const
char
*str);
117
119
pa_format_info
*
pa_format_info_from_sample_spec
(
pa_sample_spec
*ss,
pa_channel_map
*map);
120
126
int
pa_format_info_to_sample_spec
(
pa_format_info
*f,
pa_sample_spec
*ss,
pa_channel_map
*map);
127
129
typedef
enum
pa_prop_type_t
{
130
PA_PROP_TYPE_INT
,
133
PA_PROP_TYPE_INT_RANGE
,
136
PA_PROP_TYPE_INT_ARRAY
,
139
PA_PROP_TYPE_STRING
,
142
PA_PROP_TYPE_STRING_ARRAY
,
145
PA_PROP_TYPE_INVALID
= -1,
147
}
pa_prop_type_t
;
148
150
pa_prop_type_t
pa_format_info_get_prop_type
(
pa_format_info
*f,
const
char
*key);
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
184
void
pa_format_info_set_sample_format
(
pa_format_info
*f,
pa_sample_format_t
sf);
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);
190
void
pa_format_info_set_channel_map
(
pa_format_info
*f,
const
pa_channel_map
*map);
191
192
PA_C_DECL_END
193
194
#endif
src
pulse
format.h
Generated on Thu Aug 30 2012 14:35:48 for PulseAudio by
1.8.1.2