- statistics improved + allow to use virtual microphone AND/OR speaker + minor cleanups

This commit is contained in:
2026-05-18 10:46:21 +03:00
parent 7cb3b4334f
commit 97c4c3aef0
12 changed files with 381 additions and 308 deletions
+6
View File
@@ -344,14 +344,20 @@ void AudioStream::dataArrived(PDatagramSocket s, const void* buffer, int length,
}
mStat.mReceived += length;
auto& perDst = mStat.mPerDestination[source];
perDst.mReceivedBytes += length;
if (RtpHelper::isRtp(mReceiveBuffer, receiveLength))
{
if (!mStat.mFirstRtpTime)
mStat.mFirstRtpTime = std::chrono::steady_clock::now();
mStat.mReceivedRtp++;
perDst.mReceivedRtp++;
}
else
{
mStat.mReceivedRtcp++;
perDst.mReceivedRtcp++;
}
mRtpSession.Poll(); // maybe it is extra with external transmitter
bool hasData = mRtpSession.GotoFirstSourceWithData();