mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -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;
|
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()
|
void RTPUDPTransmitter::Destroy()
|
||||||
{
|
{
|
||||||
if (!m_init) {
|
if (!m_init) {
|
||||||
|
@ -282,6 +282,7 @@ public:
|
|||||||
virtual int Init();
|
virtual int Init();
|
||||||
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams);
|
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams);
|
||||||
virtual int BindSockets();
|
virtual int BindSockets();
|
||||||
|
void moveToThread(QThread *thread);
|
||||||
virtual void Destroy();
|
virtual void Destroy();
|
||||||
virtual RTPTransmissionInfo *GetTransmissionInfo();
|
virtual RTPTransmissionInfo *GetTransmissionInfo();
|
||||||
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf);
|
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf);
|
||||||
@ -314,6 +315,7 @@ public:
|
|||||||
|
|
||||||
virtual RTPRawPacket *GetNextPacket();
|
virtual RTPRawPacket *GetNextPacket();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_init;
|
bool m_init;
|
||||||
bool m_created;
|
bool m_created;
|
||||||
|
@ -135,5 +135,9 @@ void AudioNetSink::moveToThread(QThread *thread)
|
|||||||
if (m_udpBufferAudioStereo) {
|
if (m_udpBufferAudioStereo) {
|
||||||
m_udpBufferAudioMono->moveToThread(thread);
|
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);
|
||||||
void write(const uint8_t *sampleByte, int nbSamples);
|
void write(const uint8_t *sampleByte, int nbSamples);
|
||||||
|
|
||||||
|
void moveToThread(QThread *thread) {
|
||||||
|
m_rtpTransmitter.moveToThread(thread);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Reverse endianess in destination buffer */
|
/** Reverse endianess in destination buffer */
|
||||||
static void writeNetBuf(uint8_t *dest, const uint8_t *src, unsigned int elemLen, unsigned int bytesLen, bool endianReverse);
|
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