PulseAudio
4.0-186-ga89ca
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_MPEG2_AAC_IEC61937
,
61
PA_ENCODING_MAX
,
64
PA_ENCODING_INVALID
= -1,
66
}
pa_encoding_t
;
67
69
#define PA_ENCODING_ANY PA_ENCODING_ANY
70
#define PA_ENCODING_PCM PA_ENCODING_PCM
71
#define PA_ENCODING_AC3_IEC61937 PA_ENCODING_AC3_IEC61937
72
#define PA_ENCODING_EAC3_IEC61937 PA_ENCODING_EAC3_IEC61937
73
#define PA_ENCODING_MPEG_IEC61937 PA_ENCODING_MPEG_IEC61937
74
#define PA_ENCODING_DTS_IEC61937 PA_ENCODING_DTS_IEC61937
75
#define PA_ENCODING_MPEG2_AAC_IEC61937 PA_ENCODING_MPEG2_AAC_IEC61937
76
#define PA_ENCODING_MAX PA_ENCODING_MAX
77
#define PA_ENCODING_INVALID PA_ENCODING_INVALID
78
81
const
char
*
pa_encoding_to_string
(
pa_encoding_t
e)
PA_GCC_CONST
;
82
84
pa_encoding_t
pa_encoding_from_string
(
const
char
*encoding);
85
87
typedef
struct
pa_format_info
{
88
pa_encoding_t
encoding
;
91
pa_proplist
*
plist
;
93
}
pa_format_info
;
94
96
pa_format_info
*
pa_format_info_new
(
void
);
97
99
pa_format_info
*
pa_format_info_copy
(
const
pa_format_info
*src);
100
102
void
pa_format_info_free
(
pa_format_info
*f);
103
105
int
pa_format_info_valid
(
const
pa_format_info
*f);
106
108
int
pa_format_info_is_pcm
(
const
pa_format_info
*f);
109
117
int
pa_format_info_is_compatible
(
pa_format_info
*first,
pa_format_info
*second);
118
124
#define PA_FORMAT_INFO_SNPRINT_MAX 256
125
127
char
*
pa_format_info_snprint
(
char
*s,
size_t
l,
const
pa_format_info
*f);
128
131
pa_format_info
*
pa_format_info_from_string
(
const
char
*str);
132
134
pa_format_info
*
pa_format_info_from_sample_spec
(
pa_sample_spec
*ss,
pa_channel_map
*map);
135
141
int
pa_format_info_to_sample_spec
(
pa_format_info
*f,
pa_sample_spec
*ss,
pa_channel_map
*map);
142
144
typedef
enum
pa_prop_type_t
{
145
PA_PROP_TYPE_INT
,
148
PA_PROP_TYPE_INT_RANGE
,
151
PA_PROP_TYPE_INT_ARRAY
,
154
PA_PROP_TYPE_STRING
,
157
PA_PROP_TYPE_STRING_ARRAY
,
160
PA_PROP_TYPE_INVALID
= -1,
162
}
pa_prop_type_t
;
163
165
#define PA_PROP_TYPE_INT PA_PROP_TYPE_INT
166
#define PA_PROP_TYPE_INT_RANGE PA_PROP_TYPE_INT_RANGE
167
#define PA_PROP_TYPE_INT_ARRAY PA_PROP_TYPE_INT_ARRAY
168
#define PA_PROP_TYPE_STRING PA_PROP_TYPE_STRING
169
#define PA_PROP_TYPE_STRING_ARRAY PA_PROP_TYPE_STRING_ARRAY
170
#define PA_PROP_TYPE_INVALID PA_PROP_TYPE_INVALID
171
174
pa_prop_type_t
pa_format_info_get_prop_type
(
pa_format_info
*f,
const
char
*key);
175
177
int
pa_format_info_get_prop_int
(
pa_format_info
*f,
const
char
*key,
int
*v);
180
int
pa_format_info_get_prop_int_range
(
pa_format_info
*f,
const
char
*key,
int
*min,
int
*max);
184
int
pa_format_info_get_prop_int_array
(
pa_format_info
*f,
const
char
*key,
int
**values,
int
*n_values);
187
int
pa_format_info_get_prop_string
(
pa_format_info
*f,
const
char
*key,
char
**v);
191
int
pa_format_info_get_prop_string_array
(
pa_format_info
*f,
const
char
*key,
char
***values,
int
*n_values);
192
194
void
pa_format_info_free_string_array
(
char
**values,
int
n_values);
195
197
void
pa_format_info_set_prop_int
(
pa_format_info
*f,
const
char
*key,
int
value);
199
void
pa_format_info_set_prop_int_array
(
pa_format_info
*f,
const
char
*key,
const
int
*values,
int
n_values);
201
void
pa_format_info_set_prop_int_range
(
pa_format_info
*f,
const
char
*key,
int
min,
int
max);
203
void
pa_format_info_set_prop_string
(
pa_format_info
*f,
const
char
*key,
const
char
*value);
205
void
pa_format_info_set_prop_string_array
(
pa_format_info
*f,
const
char
*key,
const
char
**values,
int
n_values);
206
208
void
pa_format_info_set_sample_format
(
pa_format_info
*f,
pa_sample_format_t
sf);
210
void
pa_format_info_set_rate
(
pa_format_info
*f,
int
rate);
212
void
pa_format_info_set_channels
(
pa_format_info
*f,
int
channels);
214
void
pa_format_info_set_channel_map
(
pa_format_info
*f,
const
pa_channel_map
*map);
215
216
PA_C_DECL_END
217
218
#endif
src
pulse
format.h
Generated by
1.8.4