mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 09:31:10 -05:00
qrtplib: use it for the audio net sink
This commit is contained in:
parent
60568de298
commit
0c861d63e2
@ -174,6 +174,17 @@ int RTPUDPTransmitter::BindSockets()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RTPUDPTransmitter::moveToThread(QThread *thread)
|
||||
{
|
||||
if (m_rtpsock) {
|
||||
m_rtpsock->moveToThread(thread);
|
||||
}
|
||||
|
||||
if (m_rtpsock != m_rtcpsock) {
|
||||
m_rtcpsock->moveToThread(thread);
|
||||
}
|
||||
}
|
||||
|
||||
void RTPUDPTransmitter::Destroy()
|
||||
{
|
||||
if (!m_init) {
|
||||
|
@ -282,6 +282,7 @@ public:
|
||||
virtual int Init();
|
||||
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams);
|
||||
virtual int BindSockets();
|
||||
void moveToThread(QThread *thread);
|
||||
virtual void Destroy();
|
||||
virtual RTPTransmissionInfo *GetTransmissionInfo();
|
||||
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf);
|
||||
@ -314,6 +315,7 @@ public:
|
||||
|
||||
virtual RTPRawPacket *GetNextPacket();
|
||||
|
||||
|
||||
private:
|
||||
bool m_init;
|
||||
bool m_created;
|
||||
|
@ -135,5 +135,9 @@ void AudioNetSink::moveToThread(QThread *thread)
|
||||
if (m_udpBufferAudioStereo) {
|
||||
m_udpBufferAudioMono->moveToThread(thread);
|
||||
}
|
||||
|
||||
if (m_rtpBufferAudio) {
|
||||
m_rtpBufferAudio->moveToThread(thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,10 @@ public:
|
||||
void write(const uint8_t *sampleByte);
|
||||
void write(const uint8_t *sampleByte, int nbSamples);
|
||||
|
||||
void moveToThread(QThread *thread) {
|
||||
m_rtpTransmitter.moveToThread(thread);
|
||||
}
|
||||
|
||||
protected:
|
||||
/** Reverse endianess in destination buffer */
|
||||
static void writeNetBuf(uint8_t *dest, const uint8_t *src, unsigned int elemLen, unsigned int bytesLen, bool endianReverse);
|
||||
|
Loading…
Reference in New Issue
Block a user