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 <rtpsink.h>
Public Types | |
enum | PayloadType { PayloadL16Mono, PayloadL16Stereo, PayloadL8, PayloadPCMA8, PayloadPCMU8, PayloadG722, PayloadOpus } |
Public Member Functions | |
RTPSink (QUdpSocket *udpSocket, int sampleRate, bool stereo) | |
~RTPSink () | |
bool | isValid () const |
void | setPayloadInformation (PayloadType payloadType, int sampleRate) |
void | setDestination (const QString &address, uint16_t port) |
void | deleteDestination (const QString &address, uint16_t port) |
void | addDestination (const QString &address, uint16_t port) |
void | write (const uint8_t *sampleByte) |
void | write (const uint8_t *sampleByteL, const uint8_t *sampleByteR) |
void | write (const uint8_t *sampleByte, int nbSamples) |
Static Protected Member Functions | |
static void | writeNetBuf (uint8_t *dest, const uint8_t *src, unsigned int elemLen, unsigned int bytesLen, bool endianReverse) |
static unsigned int | elemLength (PayloadType payloadType) |
Protected Attributes | |
bool | m_valid |
PayloadType | m_payloadType |
int | m_sampleRate |
int | m_sampleBytes |
int | m_packetSamples |
int | m_bufferSize |
int | m_sampleBufferIndex |
uint8_t * | m_byteBuffer |
QHostAddress | m_destip |
uint16_t | m_destport |
qrtplib::RTPSession | m_rtpSession |
qrtplib::RTPSessionParams | m_rtpSessionParams |
qrtplib::RTPUDPTransmissionParams | m_rtpTransmissionParams |
qrtplib::RTPUDPTransmitter | m_rtpTransmitter |
bool | m_endianReverse |
QMutex | m_mutex |
enum RTPSink::PayloadType |
Enumerator | |
---|---|
PayloadL16Mono | |
PayloadL16Stereo | |
PayloadL8 | |
PayloadPCMA8 | |
PayloadPCMU8 | |
PayloadG722 | |
PayloadOpus |
Definition at line 42 of file rtpsink.h.
RTPSink::RTPSink | ( | QUdpSocket * | udpSocket, |
int | sampleRate, | ||
bool | stereo | ||
) |
Definition at line 23 of file rtpsink.cpp.
References qrtplib::RTPSession::Create(), qrtplib::RTPUDPTransmitter::Create(), qrtplib::RTPSessionParams::GetMaximumPacketSize(), qrtplib::RTPUDPTransmitter::Init(), m_endianReverse, m_payloadType, m_rtpSession, m_rtpSessionParams, m_rtpTransmissionParams, m_rtpTransmitter, m_sampleRate, m_valid, qrtplib::RTPGetErrorString(), qrtplib::RTPSessionParams::SetOwnTimestampUnit(), setPayloadInformation(), qrtplib::RTPUDPTransmissionParams::SetRTCPMultiplexing(), and qrtplib::RTPUDPTransmissionParams::SetUseExistingSockets().
RTPSink::~RTPSink | ( | ) |
Definition at line 65 of file rtpsink.cpp.
References qrtplib::RTPSession::BYEDestroy(), m_byteBuffer, and m_rtpSession.
void RTPSink::addDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 205 of file rtpsink.cpp.
References qrtplib::RTPSession::AddDestination(), m_rtpSession, and qrtplib::RTPGetErrorString().
Referenced by AudioNetSink::addDestination(), and isValid().
void RTPSink::deleteDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 194 of file rtpsink.cpp.
References qrtplib::RTPSession::DeleteDestination(), m_rtpSession, and qrtplib::RTPGetErrorString().
Referenced by AudioNetSink::deleteDestination(), and isValid().
|
staticprotected |
Definition at line 334 of file rtpsink.cpp.
References PayloadG722, PayloadL16Mono, PayloadL16Stereo, PayloadL8, PayloadOpus, PayloadPCMA8, and PayloadPCMU8.
Referenced by isValid(), and write().
|
inline |
Definition at line 56 of file rtpsink.h.
References addDestination(), deleteDestination(), elemLength(), m_valid, setDestination(), setPayloadInformation(), write(), and writeNetBuf().
Referenced by AudioNetSink::isRTPCapable().
void RTPSink::setDestination | ( | const QString & | address, |
uint16_t | port | ||
) |
Definition at line 180 of file rtpsink.cpp.
References qrtplib::RTPSession::AddDestination(), qrtplib::RTPSession::ClearDestinations(), qrtplib::RTPSession::DeleteDestination(), m_destip, m_destport, m_rtpSession, and qrtplib::RTPGetErrorString().
Referenced by isValid(), and AudioNetSink::setDestination().
void RTPSink::setPayloadInformation | ( | PayloadType | payloadType, |
int | sampleRate | ||
) |
Definition at line 75 of file rtpsink.cpp.
References m_bufferSize, m_byteBuffer, m_mutex, m_packetSamples, m_payloadType, m_rtpSession, m_sampleBufferIndex, m_sampleBytes, m_sampleRate, PayloadG722, PayloadL16Mono, PayloadL16Stereo, PayloadL8, PayloadOpus, PayloadPCMA8, PayloadPCMU8, RTP_MINPACKETSIZE, qrtplib::RTPGetErrorString(), qrtplib::RTPSession::SetDefaultMark(), qrtplib::RTPSession::SetDefaultPayloadType(), qrtplib::RTPSession::SetDefaultTimestampIncrement(), qrtplib::RTPSession::SetMaximumPacketSize(), and qrtplib::RTPSession::SetTimestampUnit().
Referenced by isValid(), RTPSink(), and AudioNetSink::setParameters().
void RTPSink::write | ( | const uint8_t * | sampleByte | ) |
Definition at line 221 of file rtpsink.cpp.
References elemLength(), m_bufferSize, m_byteBuffer, m_endianReverse, m_mutex, m_packetSamples, m_payloadType, m_rtpSession, m_sampleBufferIndex, m_sampleBytes, qrtplib::RTPGetErrorString(), qrtplib::RTPSession::SendPacket(), and writeNetBuf().
Referenced by isValid(), and AudioNetSink::write().
Definition at line 251 of file rtpsink.cpp.
References elemLength(), m_bufferSize, m_byteBuffer, m_endianReverse, m_mutex, m_packetSamples, m_payloadType, m_rtpSession, m_sampleBufferIndex, m_sampleBytes, qrtplib::RTPGetErrorString(), qrtplib::RTPSession::SendPacket(), and writeNetBuf().
void RTPSink::write | ( | const uint8_t * | sampleByte, |
int | nbSamples | ||
) |
Definition at line 284 of file rtpsink.cpp.
References elemLength(), m_bufferSize, m_byteBuffer, m_endianReverse, m_mutex, m_packetSamples, m_payloadType, m_rtpSession, m_sampleBufferIndex, m_sampleBytes, qrtplib::RTPSession::SendPacket(), and writeNetBuf().
|
staticprotected |
Reverse endianess in destination buffer
Definition at line 322 of file rtpsink.cpp.
References i.
Referenced by isValid(), and write().
|
protected |
Definition at line 77 of file rtpsink.h.
Referenced by setPayloadInformation(), and write().
|
protected |
Definition at line 79 of file rtpsink.h.
Referenced by setPayloadInformation(), write(), and ~RTPSink().
|
protected |
Definition at line 80 of file rtpsink.h.
Referenced by setDestination().
|
protected |
Definition at line 81 of file rtpsink.h.
Referenced by setDestination().
|
protected |
|
protected |
Definition at line 87 of file rtpsink.h.
Referenced by setPayloadInformation(), and write().
|
protected |
Definition at line 76 of file rtpsink.h.
Referenced by setPayloadInformation(), and write().
|
protected |
Definition at line 73 of file rtpsink.h.
Referenced by RTPSink(), setPayloadInformation(), and write().
|
protected |
Definition at line 82 of file rtpsink.h.
Referenced by addDestination(), deleteDestination(), RTPSink(), setDestination(), setPayloadInformation(), write(), and ~RTPSink().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 78 of file rtpsink.h.
Referenced by setPayloadInformation(), and write().
|
protected |
Definition at line 75 of file rtpsink.h.
Referenced by setPayloadInformation(), and write().
|
protected |
Definition at line 74 of file rtpsink.h.
Referenced by RTPSink(), and setPayloadInformation().
|
protected |