24 m_payloadType(stereo ?
RTPSink::PayloadL16Stereo :
RTPSink::PayloadL16Mono),
25 m_sampleRate(sampleRate),
29 m_sampleBufferIndex(0),
32 m_mutex(QMutex::Recursive)
80 qDebug(
"RTPSink::setPayloadInformation: payloadType: %d sampleRate: %d", payloadType, sampleRate);
144 qDebug(
"RTPSink::setPayloadInformation: timestamp unit set to %f: %s",
145 1.0 / (
double) m_sampleRate,
160 qCritical(
"RTPSink::setPayloadInformation: cannot set default timestamp increment: %s",
qrtplib::RTPGetErrorString(status).c_str());
162 qDebug(
"RTPSink::setPayloadInformation: set default timestamp increment to %d: %s", timestampinc,
qrtplib::RTPGetErrorString(status).c_str());
176 qDebug(
"RTPSink::setPayloadInformation: set maximum packet size to %d bytes: %s", maximumPacketSize,
qrtplib::RTPGetErrorString(status).c_str());
196 QHostAddress destip(address);
207 QHostAddress destip(address);
214 qDebug(
"RTPSink::addDestination: destination address set to %s:%d: %s",
215 address.toStdString().c_str(),
286 int samplesIndex = 0;
293 &samples[samplesIndex*m_sampleBytes],
317 &samples[samplesIndex*m_sampleBytes],
324 for (
unsigned int i = 0;
i < bytesLen;
i += elemLen)
326 memcpy(&dest[
i], &src[i], elemLen);
329 std::reverse(&dest[i], &dest[i+elemLen]);
int SetMaximumPacketSize(std::size_t s)
void setDestination(const QString &address, uint16_t port)
int Create(const RTPSessionParams &sessparams, RTPTransmitter *transmitter)
std::size_t GetMaximumPacketSize() const
void BYEDestroy(const RTPTime &maxwaittime, const void *reason, std::size_t reasonlength)
static void writeNetBuf(uint8_t *dest, const uint8_t *src, unsigned int elemLen, unsigned int bytesLen, bool endianReverse)
int DeleteDestination(const RTPAddress &addr)
qrtplib::RTPUDPTransmitter m_rtpTransmitter
void deleteDestination(const QString &address, uint16_t port)
void SetRTCPMultiplexing(bool f)
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams)
int AddDestination(const RTPAddress &addr)
#define RTP_MINPACKETSIZE
PayloadType m_payloadType
int SetDefaultPayloadType(uint8_t pt)
RTPSink(QUdpSocket *udpSocket, int sampleRate, bool stereo)
qrtplib::RTPSession m_rtpSession
void SetOwnTimestampUnit(double tsunit)
int SetDefaultTimestampIncrement(uint32_t timestampinc)
int SetTimestampUnit(double u)
void addDestination(const QString &address, uint16_t port)
void write(const uint8_t *sampleByte)
qrtplib::RTPUDPTransmissionParams m_rtpTransmissionParams
qrtplib::RTPSessionParams m_rtpSessionParams
std::string RTPGetErrorString(int errcode)
void SetUseExistingSockets(QUdpSocket *rtpsocket, QUdpSocket *rtcpsocket)
static unsigned int elemLength(PayloadType payloadType)
int SendPacket(const void *data, std::size_t len)
int SetDefaultMark(bool m)
void setPayloadInformation(PayloadType payloadType, int sampleRate)