clean up some M17 last-packet errors

unstable
Tom Early 4 years ago
parent 3518f2bcec
commit 36af26a330

@ -178,9 +178,6 @@ void CCodecStream::Task(void)
m_StatsTimer.start();
m_uiTotalPackets++;
m_TCWriter.Send(Frame->GetCodecPacket());
#ifdef DEBUG
std::cout << "Sent a packet to the transcoder from module '" << Frame->GetCodecPacket()->module << "'" << std::endl;
#endif
// and push to our local queue
m_LocalQueue.push(Packet);

@ -73,8 +73,16 @@ void CM17Protocol::Task(void)
{
OnDvHeaderPacketIn(Header, Ip);
// xrf needs a voice frame every 20 ms and an M17 frame is 40 ms, so we need a duplicate
auto secondFrame = std::unique_ptr<CDvFramePacket>(new CDvFramePacket(*Frame.get()));
// This is a "first" packet, so clear the last packet status, since the real last packet it the secondFrame
if (Frame->IsLastPacket())
Frame->SetLastPacket(false);
// push the "first" packet
OnDvFramePacketIn(Frame, &Ip);
// push the "second" packet
OnDvFramePacketIn(secondFrame, &Ip); // push two packet because we need a packet every 20 ms
}
}

@ -67,6 +67,7 @@ public:
// set
void UpdatePids(const uint32_t);
void SetPacketModule(char cMod) { m_cModule = cMod; }
void SetLastPacket(bool value) { m_bLastPacket = value; }
void SetLocalOrigin(void) { m_eOrigin = EOrigin::local; }
void SetRemotePeerOrigin(void) { m_eOrigin = EOrigin::peer; }

Loading…
Cancel
Save

Powered by TurnKey Linux.