libguac
0.9.2
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
guacamole
audio.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2013 Glyptodon LLC
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to deal
6
* in the Software without restriction, including without limitation the rights
7
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
* copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
* THE SOFTWARE.
21
*/
22
23
24
#ifndef __GUAC_AUDIO_H
25
#define __GUAC_AUDIO_H
26
33
#include "
audio-fntypes.h
"
34
#include "
audio-types.h
"
35
#include "
client-types.h
"
36
#include "
stream-types.h
"
37
38
struct
guac_audio_encoder
{
39
44
const
char
*
mimetype
;
45
49
guac_audio_encoder_begin_handler
*
begin_handler
;
50
54
guac_audio_encoder_write_handler
*
write_handler
;
55
59
guac_audio_encoder_end_handler
*
end_handler
;
60
61
};
62
63
struct
guac_audio_stream
{
64
68
unsigned
char
*
pcm_data
;
69
73
int
used
;
74
78
int
length
;
79
83
unsigned
char
*
encoded_data
;
84
88
int
encoded_data_used
;
89
93
int
encoded_data_length
;
94
99
guac_audio_encoder
*
encoder
;
100
104
guac_client
*
client
;
105
109
guac_stream
*
stream
;
110
114
int
rate
;
115
120
int
channels
;
121
126
int
bps
;
127
131
int
pcm_bytes_written
;
132
136
void
*
data
;
137
138
};
139
154
guac_audio_stream
*
guac_audio_stream_alloc
(
guac_client
* client,
155
guac_audio_encoder
* encoder);
156
162
void
guac_audio_stream_free
(
guac_audio_stream
* stream);
163
174
void
guac_audio_stream_begin
(
guac_audio_stream
* stream,
int
rate,
int
channels,
int
bps);
175
183
void
guac_audio_stream_end
(
guac_audio_stream
* stream);
184
195
void
guac_audio_stream_write_pcm
(
guac_audio_stream
* stream,
196
const
unsigned
char
* data,
int
length);
197
203
void
guac_audio_stream_flush
(
guac_audio_stream
* stream);
204
215
void
guac_audio_stream_write_encoded
(
guac_audio_stream
* audio,
216
const
unsigned
char
* data,
int
length);
217
218
#endif
219
Generated on Mon Jul 21 2014 14:14:14 for libguac by
1.8.1.2