SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <audionetsink.h>
Public Types | |
enum | SinkType { SinkUDP, SinkRTP } |
enum | Codec { CodecL16, CodecL8, CodecPCMA, CodecPCMU, CodecG722, CodecOpus } |
Public Member Functions | |
AudioNetSink (QObject *parent) | |
without RTP More... | |
AudioNetSink (QObject *parent, int sampleRate, bool stereo) | |
with RTP More... | |
~AudioNetSink () | |
void | setDestination (const QString &address, uint16_t port) |
void | addDestination (const QString &address, uint16_t port) |
void | deleteDestination (const QString &address, uint16_t port) |
void | setParameters (Codec codec, bool stereo, int sampleRate) |
void | setDecimation (uint32_t decimation) |
void | write (qint16 sample) |
void | write (qint16 lSample, qint16 rSample) |
bool | isRTPCapable () const |
bool | selectType (SinkType type) |
void | moveToThread (QThread *thread) |
Static Public Attributes | |
static const int | m_udpBlockSize = 512 |
static const int | m_dataBlockSize = 65536 |
static const int | m_g722BlockSize = 12800 |
static const int | m_opusBlockSize = 960*2 |
static const int | m_opusOutputSize = 160 |
Protected Member Functions | |
void | setNewCodecData () |
void | setDecimationFilters () |
Protected Attributes | |
SinkType | m_type |
Codec | m_codec |
QUdpSocket * | m_udpSocket |
RTPSink * | m_rtpBufferAudio |
AudioCompressor | m_audioCompressor |
AudioG722 | m_g722 |
AudioOpus | m_opus |
AudioFilter | m_audioFilter |
int | m_sampleRate |
bool | m_stereo |
uint32_t | m_decimation |
uint32_t | m_decimationCount |
char | m_data [m_dataBlockSize] |
int16_t | m_opusIn [m_opusBlockSize] |
int | m_codecInputSize |
int | m_codecInputIndex |
int | m_codecRatio |
unsigned int | m_bufferIndex |
QHostAddress | m_address |
unsigned int | m_port |
Definition at line 37 of file audionetsink.h.
enum AudioNetSink::Codec |
Definition at line 45 of file audionetsink.h.
Enumerator | |
---|---|
SinkUDP | |
SinkRTP |
Definition at line 39 of file audionetsink.h.
AudioNetSink::AudioNetSink | ( | QObject * | parent | ) |
without RTP
Definition at line 29 of file audionetsink.cpp.
References AudioOpus::m_bitrate, m_codecRatio, m_data, m_dataBlockSize, m_decimation, m_opusBlockSize, m_opusIn, m_sampleRate, and m_udpSocket.
AudioNetSink::AudioNetSink | ( | QObject * | parent, |
int | sampleRate, | ||
bool | stereo | ||
) |
with RTP
Definition at line 48 of file audionetsink.cpp.
References AudioOpus::m_bitrate, m_codecRatio, m_data, m_dataBlockSize, m_decimation, m_opusBlockSize, m_opusIn, m_rtpBufferAudio, m_sampleRate, and m_udpSocket.
AudioNetSink::~AudioNetSink | ( | ) |
void AudioNetSink::addDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 106 of file audionetsink.cpp.
References RTPSink::addDestination(), and m_rtpBufferAudio.
void AudioNetSink::deleteDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 113 of file audionetsink.cpp.
References RTPSink::deleteDestination(), and m_rtpBufferAudio.
bool AudioNetSink::isRTPCapable | ( | ) | const |
Definition at line 77 of file audionetsink.cpp.
References RTPSink::isValid(), and m_rtpBufferAudio.
void AudioNetSink::moveToThread | ( | QThread * | thread | ) |
bool AudioNetSink::selectType | ( | SinkType | type | ) |
Definition at line 82 of file audionetsink.cpp.
References m_type, SinkRTP, and SinkUDP.
Referenced by AudioOutput::setUdpUseRTP().
void AudioNetSink::setDecimation | ( | uint32_t | decimation | ) |
Definition at line 162 of file audionetsink.cpp.
References decimation(), m_decimation, m_decimationCount, and setNewCodecData().
Referenced by AudioOutput::setUdpDecimation().
|
protected |
Definition at line 190 of file audionetsink.cpp.
References CodecG722, CodecL16, CodecL8, CodecOpus, CodecPCMA, CodecPCMU, m_audioFilter, m_codec, m_decimation, m_sampleRate, and AudioFilter::setDecimFilters().
Referenced by setNewCodecData().
void AudioNetSink::setDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 96 of file audionetsink.cpp.
References m_address, m_port, m_rtpBufferAudio, and RTPSink::setDestination().
Referenced by AudioOutput::setUdpDestination().
|
protected |
Definition at line 170 of file audionetsink.cpp.
References CodecOpus, AudioOpus::m_bitrate, m_bufferIndex, m_codec, m_codecInputIndex, m_codecInputSize, m_codecRatio, m_decimation, m_opus, m_sampleRate, m_stereo, setDecimationFilters(), and AudioOpus::setEncoder().
Referenced by setDecimation(), and setParameters().
void AudioNetSink::setParameters | ( | Codec | codec, |
bool | stereo, | ||
int | sampleRate | ||
) |
Definition at line 120 of file audionetsink.cpp.
References CodecG722, CodecL16, CodecL8, CodecOpus, CodecPCMA, CodecPCMU, AudioCompressor::fillALaw(), AudioCompressor::fillULaw(), m_audioCompressor, m_codec, m_rtpBufferAudio, m_sampleRate, m_stereo, RTPSink::PayloadG722, RTPSink::PayloadL16Mono, RTPSink::PayloadL16Stereo, RTPSink::PayloadL8, RTPSink::PayloadOpus, RTPSink::PayloadPCMA8, RTPSink::PayloadPCMU8, setNewCodecData(), and RTPSink::setPayloadInformation().
Referenced by AudioOutput::setUdpChannelFormat().
void AudioNetSink::write | ( | qint16 | sample | ) |
Definition at line 212 of file audionetsink.cpp.
References CodecG722, CodecL16, CodecL8, CodecOpus, CodecPCMA, CodecPCMU, AudioCompressor::compress8(), AudioG722::encode(), AudioOpus::encode(), m_address, m_audioCompressor, m_audioFilter, AudioOpus::m_bitrate, m_bufferIndex, m_codec, m_codecInputIndex, m_codecInputSize, m_codecRatio, m_data, m_decimation, m_decimationCount, m_g722, m_g722BlockSize, m_opus, m_opusIn, m_port, m_rtpBufferAudio, m_type, m_udpBlockSize, m_udpSocket, AudioFilter::run(), SinkRTP, SinkUDP, and RTPSink::write().
Referenced by AudioOutput::readData().
void AudioNetSink::write | ( | qint16 | lSample, |
qint16 | rSample | ||
) |
Definition at line 364 of file audionetsink.cpp.
References CodecG722, CodecL16, CodecL8, CodecOpus, CodecPCMA, CodecPCMU, AudioOpus::encode(), m_address, m_audioFilter, AudioOpus::m_bitrate, m_bufferIndex, m_codec, m_codecInputIndex, m_codecInputSize, m_codecRatio, m_data, m_decimation, m_decimationCount, m_opus, m_opusIn, m_port, m_rtpBufferAudio, m_type, m_udpBlockSize, m_udpSocket, AudioFilter::runLP(), SinkRTP, SinkUDP, and RTPSink::write().
|
protected |
Definition at line 101 of file audionetsink.h.
Referenced by setDestination(), and write().
|
protected |
Definition at line 87 of file audionetsink.h.
Referenced by setParameters(), and write().
|
protected |
Definition at line 90 of file audionetsink.h.
Referenced by setDecimationFilters(), and write().
|
protected |
Definition at line 100 of file audionetsink.h.
Referenced by setNewCodecData(), and write().
|
protected |
Definition at line 84 of file audionetsink.h.
Referenced by setDecimationFilters(), setNewCodecData(), setParameters(), and write().
|
protected |
Definition at line 98 of file audionetsink.h.
Referenced by setNewCodecData(), and write().
|
protected |
Definition at line 97 of file audionetsink.h.
Referenced by setNewCodecData(), and write().
|
protected |
Definition at line 99 of file audionetsink.h.
Referenced by AudioNetSink(), setNewCodecData(), and write().
|
protected |
Definition at line 95 of file audionetsink.h.
Referenced by AudioNetSink(), and write().
|
static |
Definition at line 74 of file audionetsink.h.
Referenced by AudioNetSink().
|
protected |
Definition at line 93 of file audionetsink.h.
Referenced by AudioNetSink(), setDecimation(), setDecimationFilters(), setNewCodecData(), and write().
|
protected |
Definition at line 94 of file audionetsink.h.
Referenced by setDecimation(), and write().
|
protected |
Definition at line 88 of file audionetsink.h.
Referenced by write().
|
static |
Definition at line 75 of file audionetsink.h.
Referenced by write().
|
protected |
Definition at line 89 of file audionetsink.h.
Referenced by setNewCodecData(), and write().
|
static |
Definition at line 76 of file audionetsink.h.
Referenced by AudioNetSink().
|
protected |
Definition at line 96 of file audionetsink.h.
Referenced by AudioNetSink(), and write().
|
static |
Definition at line 77 of file audionetsink.h.
|
protected |
Definition at line 102 of file audionetsink.h.
Referenced by setDestination(), and write().
|
protected |
Definition at line 86 of file audionetsink.h.
Referenced by addDestination(), AudioNetSink(), deleteDestination(), isRTPCapable(), setDestination(), setParameters(), write(), and ~AudioNetSink().
|
protected |
Definition at line 91 of file audionetsink.h.
Referenced by AudioNetSink(), setDecimationFilters(), setNewCodecData(), and setParameters().
|
protected |
Definition at line 92 of file audionetsink.h.
Referenced by setNewCodecData(), and setParameters().
|
protected |
Definition at line 83 of file audionetsink.h.
Referenced by selectType(), and write().
|
static |
Definition at line 73 of file audionetsink.h.
Referenced by write().
|
protected |
Definition at line 85 of file audionetsink.h.
Referenced by AudioNetSink(), moveToThread(), write(), and ~AudioNetSink().