Use TtagTimeInterval to determine ttag markers

This is for interlaved mode; sequential mode was already using it
This commit is contained in:
Srivats P 2023-04-29 12:08:26 +05:30
parent d375736a39
commit 650c098370

View File

@ -461,7 +461,7 @@ int AbstractPort::updatePacketListInterleaved()
quint64 minGap = ULLONG_MAX; quint64 minGap = ULLONG_MAX;
quint64 duration = quint64(1e3); // 1000ns (1us) quint64 duration = quint64(1e3); // 1000ns (1us)
// TODO: convert the below to a QList of struct aggregating all list vars // TODO: convert the below to a QVector of struct aggregating all list vars
QList<int> streamId; QList<int> streamId;
QList<quint64> ibg1, ibg2; QList<quint64> ibg1, ibg2;
QList<quint64> nb1, nb2; QList<quint64> nb1, nb2;
@ -658,8 +658,10 @@ int AbstractPort::updatePacketListInterleaved()
// FIXME: Turbo still thinks it has to create implicit packet set for // FIXME: Turbo still thinks it has to create implicit packet set for
// interleaved mode - Turbo code should be changed once this is validated // interleaved mode - Turbo code should be changed once this is validated
quint64 totalPkts = 0; quint64 totalPkts = 0;
QSet<int> ttagMarkerStreams; QVector<ulong> ttagSchedSec(numStreams, 0);
QVector<ulong> ttagSchedNsec(numStreams, 0);
QList<uint> ttagMarkers; QList<uint> ttagMarkers;
do do
{ {
for (int i = 0; i < numStreams; i++) for (int i = 0; i < numStreams; i++)
@ -668,12 +670,14 @@ int AbstractPort::updatePacketListInterleaved()
if ((schedSec.at(i) > sec) || (schedNsec.at(i) > nsec)) if ((schedSec.at(i) > sec) || (schedNsec.at(i) > nsec))
continue; continue;
// One marker per stream // Ttag marker every TtagTimeInterval for each stream
// TODO: We should have a marker every 5s per stream if if (hasTtag.at(i)
// the pktList is > 5s && ((schedSec.at(i) > ttagSchedSec.at(i))
if (hasTtag.at(i) && !ttagMarkerStreams.contains(i)) { || ((schedSec.at(i) == ttagSchedSec.at(i))
ttagMarkerStreams.insert(i); && (schedNsec.at(i) >= ttagSchedNsec.at(i))))) {
ttagMarkers.append(totalPkts); ttagMarkers.append(totalPkts);
ttagSchedSec[i] = schedSec.at(i) + kTtagTimeInterval_;
ttagSchedNsec[i] = schedNsec.at(i);
} }
for (uint j = 0; j < burstSize[i]; j++) for (uint j = 0; j < burstSize[i]; j++)