libguac 1.5.5
Loading...
Searching...
No Matches
audio.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef __GUAC_AUDIO_H
21#define __GUAC_AUDIO_H
22
29#include "audio-fntypes.h"
30#include "audio-types.h"
31#include "client-types.h"
32#include "stream-types.h"
33
70
111
154 guac_audio_encoder* encoder, int rate, int channels, int bps);
155
182 guac_audio_encoder* encoder, int rate, int channels, int bps);
183
198
206
222 const unsigned char* data, int length);
223
233
234#endif
235
Function type definitions related to simple streaming audio.
void guac_audio_encoder_begin_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is opened.
Definition audio-fntypes.h:38
void guac_audio_encoder_write_handler(guac_audio_stream *audio, const unsigned char *pcm_data, int length)
Handler which is called when PCM data is written to the audio stream.
Definition audio-fntypes.h:84
void guac_audio_encoder_flush_handler(guac_audio_stream *audio)
Handler which is called when the audio stream needs to be flushed.
Definition audio-fntypes.h:46
void guac_audio_encoder_join_handler(guac_audio_stream *audio, guac_user *user)
Handler which is called when a new user has joined the Guacamole connection associated with the audio...
Definition audio-fntypes.h:67
void guac_audio_encoder_end_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is closed.
Definition audio-fntypes.h:54
Type definitions related to simple streaming audio.
void guac_audio_stream_reset(guac_audio_stream *audio, guac_audio_encoder *encoder, int rate, int channels, int bps)
Resets the given audio stream, switching to the given encoder, rate, channels, and bits per sample.
void guac_audio_stream_write_pcm(guac_audio_stream *stream, const unsigned char *data, int length)
Writes PCM data to the given audio stream.
void guac_audio_stream_add_user(guac_audio_stream *audio, guac_user *user)
Notifies the given audio stream that a user has joined the connection.
guac_audio_stream * guac_audio_stream_alloc(guac_client *client, guac_audio_encoder *encoder, int rate, int channels, int bps)
Allocates a new audio stream at the client level which encodes audio data using the given encoder.
void guac_audio_stream_free(guac_audio_stream *stream)
Closes and frees the given audio stream.
void guac_audio_stream_flush(guac_audio_stream *stream)
Flushes the underlying audio buffer, if any, ensuring that all audio previously written via guac_audi...
Type definitions related to the Guacamole client structure, guac_client.
Type definitions related to Guacamole protocol streams.
Arbitrary audio codec encoder.
Definition audio.h:34
guac_audio_encoder_write_handler * write_handler
Handler which will be called when PCM data is written to the audio stream for encoding.
Definition audio.h:51
guac_audio_encoder_begin_handler * begin_handler
Handler which will be called when the audio stream is first created.
Definition audio.h:45
const char * mimetype
The mimetype of the audio data encoded by this audio encoder.
Definition audio.h:40
guac_audio_encoder_end_handler * end_handler
Handler which will be called when the audio stream is closed.
Definition audio.h:61
guac_audio_encoder_flush_handler * flush_handler
Handler which will be called when the audio stream is flushed.
Definition audio.h:56
guac_audio_encoder_join_handler * join_handler
Handler which will be called when a new user joins the Guacamole connection associated with an audio ...
Definition audio.h:67
Basic audio stream.
Definition audio.h:71
guac_client * client
The client associated with this audio stream.
Definition audio.h:81
int bps
The number of bits per sample per channel for PCM data.
Definition audio.h:103
guac_stream * stream
The actual stream associated with this audio stream.
Definition audio.h:86
int rate
The number of samples per second of PCM data sent to this stream.
Definition audio.h:91
void * data
Encoder-specific state data.
Definition audio.h:108
guac_audio_encoder * encoder
Arbitrary codec encoder which will receive raw PCM data.
Definition audio.h:76
int channels
The number of audio channels per sample of PCM data.
Definition audio.h:97
Guacamole proxy client.
Definition client.h:48
Represents a single stream within the Guacamole protocol.
Definition stream.h:32
Representation of a physical connection within a larger logical connection which may be shared.
Definition user.h:115