PulseAudio
1.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
33
PA_C_DECL_BEGIN
34
36
typedef
enum
pa_encoding
{
37
PA_ENCODING_ANY
,
40
PA_ENCODING_PCM
,
43
PA_ENCODING_AC3_IEC61937
,
46
PA_ENCODING_EAC3_IEC61937
,
49
PA_ENCODING_MPEG_IEC61937
,
52
PA_ENCODING_DTS_IEC61937
,
55
PA_ENCODING_MAX
,
58
PA_ENCODING_INVALID
= -1,
60
}
pa_encoding_t
;
61
63
const
char
*
pa_encoding_to_string
(
pa_encoding_t
e)
PA_GCC_CONST
;
64
66
pa_encoding_t
pa_encoding_from_string
(
const
char
*encoding);
67
69
typedef
struct
pa_format_info
{
70
pa_encoding_t
encoding
;
73
pa_proplist
*
plist
;
75
}
pa_format_info
;
76
78
pa_format_info
*
pa_format_info_new
(
void
);
79
81
pa_format_info
*
pa_format_info_copy
(
const
pa_format_info
*src);
82
84
void
pa_format_info_free
(
pa_format_info
*f);
85
87
int
pa_format_info_valid
(
const
pa_format_info
*f);
88
90
int
pa_format_info_is_pcm
(
const
pa_format_info
*f);
91
99
int
pa_format_info_is_compatible
(
pa_format_info
*first,
pa_format_info
*second);
100
106
#define PA_FORMAT_INFO_SNPRINT_MAX 256
107
109
char
*
pa_format_info_snprint
(
char
*s,
size_t
l,
const
pa_format_info
*f);
110
113
pa_format_info
*
pa_format_info_from_string
(
const
char
*str);
114
116
void
pa_format_info_set_prop_int
(
pa_format_info
*f,
const
char
*key,
int
value);
118
void
pa_format_info_set_prop_int_array
(
pa_format_info
*f,
const
char
*key,
const
int
*values,
int
n_values);
120
void
pa_format_info_set_prop_int_range
(
pa_format_info
*f,
const
char
*key,
int
min,
int
max);
122
void
pa_format_info_set_prop_string
(
pa_format_info
*f,
const
char
*key,
const
char
*value);
124
void
pa_format_info_set_prop_string_array
(
pa_format_info
*f,
const
char
*key,
const
char
**values,
int
n_values);
125
127
void
pa_format_info_set_sample_format
(
pa_format_info
*f,
pa_sample_format_t
sf);
129
void
pa_format_info_set_rate
(
pa_format_info
*f,
int
rate);
131
void
pa_format_info_set_channels
(
pa_format_info
*f,
int
channels);
133
void
pa_format_info_set_channel_map
(
pa_format_info
*f,
const
pa_channel_map
*map);
134
135
PA_C_DECL_END
136
137
#endif
src
pulse
format.h
Generated by
1.8.1