class for compressing audio to be sent over network
More...
#include <audioencoder.h>
|
void | frameReady (quint32 aCallId, quint32 aSeqNo, const QByteArray &aAudioData, Hash aForNode) |
|
|
void | frameEncoded (quint32 aCallId, quint32 aSeqNo, const QByteArray &aEncodedData, Hash aForNode) |
|
class for compressing audio to be sent over network
This class encapsulates opus encoder for packing audio over network. Future releases may include other options regarding the codec or type of input (audio/video/feeling/touch/smell/other?)
◆ AudioEncoder()
AudioEncoder::AudioEncoder |
( |
quint32 |
aSampleRate = 8000 , |
|
|
quint32 |
aNumChannels = 1 |
|
) |
| |
◆ ~AudioEncoder()
AudioEncoder::~AudioEncoder |
( |
| ) |
|
◆ frameEncoded
void AudioEncoder::frameEncoded |
( |
quint32 |
aCallId, |
|
|
quint32 |
aSeqNo, |
|
|
const QByteArray & |
aEncodedData, |
|
|
Hash |
aForNode |
|
) |
| |
|
signal |
This signal is emitted after audio frame has been encoded into opus format. When audio data is sent in via slot frameReady then this signal is emitted as result of succesful processing.
- Parameters
-
aCallId | call identifer of the audio stream |
aSeqNo | sequence number of frame inside stream |
aEncodedData | raw opus frame, as it comes out from opus library call opus_encode_float(). |
aForNode | fingerprint of node supposed to receive the frame |
◆ frameReady
void AudioEncoder::frameReady |
( |
quint32 |
aCallId, |
|
|
quint32 |
aSeqNo, |
|
|
const QByteArray & |
aAudioData, |
|
|
Hash |
aForNode |
|
) |
| |
|
slot |
Input to encoder cames in via this method.
- Parameters
-
aCallId | call identifer of the audio stream |
aSeqNo | sequence number of frame inside stream |
aAudioData | raw, unpacked audio samples. The byte-array must contain an array of floats in [-1,1] range. |
aForNode | fingerprint of node supposed to receive the frame |
◆ iEncodedData
unsigned char* AudioEncoder::iEncodedData |
|
private |
◆ iEncoder
OpusEncoder* AudioEncoder::iEncoder |
|
private |
◆ iNumChannels
const quint32 AudioEncoder::iNumChannels |
|
private |
The documentation for this class was generated from the following file: