38 #ifndef __GUAC_AUDIO_H
39 #define __GUAC_AUDIO_H
234 const unsigned char* data,
int length);
254 const unsigned char* data,
int length);
void guac_audio_stream_write_encoded(guac_audio_stream *audio, const unsigned char *data, int length)
Appends arbitrarily-encoded data to the encoded_data buffer within the given audio stream...
int bps
The number of bits per sample per channel for PCM data.
Definition: audio.h:164
void guac_audio_encoder_write_handler(guac_audio_stream *audio, const unsigned char *pcm_data, int length)
Handler which is called when the audio stream is flushed.
Definition: audio.h:65
int encoded_data_used
Number of bytes in the encoded data buffer.
Definition: audio.h:126
guac_audio_encoder * encoder
Arbitrary codec encoder.
Definition: audio.h:137
guac_audio_encoder_begin_handler * begin_handler
Handler which will be called when the audio stream is opened.
Definition: audio.h:82
void guac_audio_stream_write_pcm(guac_audio_stream *stream, const unsigned char *data, int length)
Writes PCM data to the given audio stream.
int used
Number of bytes in buffer.
Definition: audio.h:111
Provides functions and structures required for allocating and using nested streams.
guac_client * client
The client associated with this audio stream.
Definition: audio.h:142
guac_audio_encoder_write_handler * write_handler
Handler which will be called when the audio stream is flushed.
Definition: audio.h:87
void guac_audio_stream_flush(guac_audio_stream *stream)
Flushes the given audio stream.
guac_stream * stream
The actual stream associated with this audio stream.
Definition: audio.h:147
void guac_audio_stream_end(guac_audio_stream *stream)
Ends the current audio packet, writing the finished packet as an audio instruction.
void guac_audio_stream_free(guac_audio_stream *stream)
Frees the given audio stream.
void * data
Encoder-specific state data.
Definition: audio.h:174
Guacamole proxy client.
Definition: client.h:215
const char * mimetype
The mimetype of the audio data encoded by this audio encoder.
Definition: audio.h:77
Basic audio stream.
Definition: audio.h:101
unsigned char * encoded_data
Encoded audio data buffer, as written by the encoder.
Definition: audio.h:121
int rate
The number of samples per second of PCM data sent to this stream.
Definition: audio.h:152
int encoded_data_length
Maximum number of bytes in the encoded data buffer.
Definition: audio.h:131
Arbitrary audio codec encoder.
Definition: audio.h:71
guac_audio_encoder_end_handler * end_handler
Handler which will be called when the audio stream is closed.
Definition: audio.h:92
Represents a single nested stream within the Guacamole protocol.
Definition: stream.h:53
int length
Maximum number of bytes in buffer.
Definition: audio.h:116
void guac_audio_stream_begin(guac_audio_stream *stream, int rate, int channels, int bps)
Begins a new audio packet within the given audio stream.
Provides functions and structures required for defining (and handling) a proxy client.
void guac_audio_encoder_begin_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is opened.
Definition: audio.h:55
unsigned char * pcm_data
PCM data buffer, 16-bit samples, 2-channel, 44100 Hz.
Definition: audio.h:106
guac_audio_stream * guac_audio_stream_alloc(guac_client *client, guac_audio_encoder *encoder)
Allocates a new audio stream which encodes audio data using the given encoder.
void guac_audio_encoder_end_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is closed.
Definition: audio.h:60
int channels
The number of audio channels per sample of PCM data.
Definition: audio.h:158
int pcm_bytes_written
The number of PCM bytes written since the audio chunk began.
Definition: audio.h:169