Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{FEC} Application support #857

Merged
merged 39 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c0db916
Random refactoring and small bugfixes during FEC works.
Sep 4, 2019
275518d
Added lacking setupCC fix
Sep 4, 2019
73f7a4c
Added changes for packet filter FW and API
Sep 4, 2019
b856a84
Added packetfiler option doc
Sep 4, 2019
4ed2773
Added FEC filter
Sep 4, 2019
7cc342b
Added application support
Sep 5, 2019
b784855
Introduced a capability flag for packet filter. Added standard capabi…
Sep 6, 2019
3d8bd2c
Merge branch 'pr-fec-core-packetfilter-api' into pf-fec-docs-packetfi…
Sep 6, 2019
6a2f264
Merge branch 'pf-fec-docs-packetfilter-api' into pf-fec-core-fec
Sep 6, 2019
1dd599d
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 6, 2019
9d10077
Post-review fixes (docs/comments only)
Sep 6, 2019
7281917
Post-review fixes
Sep 6, 2019
a27b275
Updated from parent
Sep 6, 2019
328d988
Merge branch 'pr-fec-core-packetfilter-api' into pf-fec-docs-packetfi…
Sep 6, 2019
90206c3
Merge branch 'pf-fec-docs-packetfilter-api' into pf-fec-core-fec
Sep 6, 2019
3873f92
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 6, 2019
6d7d265
Fixed automatic merge mistake
Sep 6, 2019
5b8b403
Post-review fixes.
Sep 9, 2019
7a5b060
Merge branch 'pr-fec-core-packetfilter-api' into pf-fec-docs-packetfi…
Sep 9, 2019
c9bd7f3
Merge branch 'pf-fec-docs-packetfilter-api' into pf-fec-core-fec
Sep 9, 2019
076cb4c
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 9, 2019
12b1417
Made extraSize implemented as static. Check filter extra size against…
Sep 9, 2019
c28d2a1
Merge branch 'pr-fec-core-packetfilter-api' into pf-fec-core-fec
Sep 9, 2019
56c6b45
Fixed according to the changes in the packet filter API.
Sep 9, 2019
37ebad4
Backfixes after testing with apps
Sep 9, 2019
e793db7
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 9, 2019
dfc10c4
Fixed design flaw in virtual factory
Sep 9, 2019
db57706
Backfix (ManagedPtr design flaw)
Sep 9, 2019
48ae77a
Merge branch 'pr-fec-core-packetfilter-api' into pf-fec-docs-packetfi…
Sep 9, 2019
e43be24
Updated from parent
Sep 9, 2019
65264f4
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 9, 2019
9cb12fb
Merge branch 'master' into pf-fec-docs-packetfilter-api
Sep 10, 2019
4e5a99f
Merge branch 'pf-fec-docs-packetfilter-api' into pf-fec-core-fec
Sep 10, 2019
958362f
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 10, 2019
4895f5b
Added const where it's due
Sep 10, 2019
1c21e5c
Merge branch 'master' into pf-fec-core-fec
Sep 10, 2019
c8898c9
Merge branch 'pf-fec-core-fec' into pf-fec-apps-support
Sep 10, 2019
a22e7eb
Merge branch 'master' into pf-fec-apps-support
ethouris Sep 10, 2019
7ca61c3
Reverted the extra variable
ethouris Sep 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/socketoptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ const SocketOption srt_options [] {
{ "kmrefreshrate", 0, SRTO_KMREFRESHRATE, SocketOption::PRE, SocketOption::INT, nullptr },
{ "kmpreannounce", 0, SRTO_KMPREANNOUNCE, SocketOption::PRE, SocketOption::INT, nullptr },
{ "strictenc", 0, SRTO_STRICTENC, SocketOption::PRE, SocketOption::BOOL, nullptr },
{ "peeridletimeo", 0, SRTO_PEERIDLETIMEO, SocketOption::PRE, SocketOption::INT, nullptr }
{ "peeridletimeo", 0, SRTO_PEERIDLETIMEO, SocketOption::PRE, SocketOption::INT, nullptr },
{ "packetfilter", 0, SRTO_PACKETFILTER, SocketOption::PRE, SocketOption::STRING, nullptr }
};
}

Expand Down
19 changes: 16 additions & 3 deletions apps/transmitmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class SrtStatsJson : public SrtStatsWriter
output << "\"packets\":" << mon.pktSent << ",";
output << "\"packetsLost\":" << mon.pktSndLoss << ",";
output << "\"packetsDropped\":" << mon.pktSndDrop << ",";
output << "\"packetsRetransmitted\":" << mon.pktRetrans << ",";
output << "\"packetsRetransmitted\":" << mon.pktRetrans << ",";
output << "\"packetsFilterExtra\":" << mon.pktSndFilterExtra << ",";
output << "\"bytes\":" << mon.byteSent << ",";
output << "\"bytesDropped\":" << mon.byteSndDrop << ",";
output << "\"mbitRate\":" << mon.mbpsSendRate;
Expand All @@ -137,6 +138,9 @@ class SrtStatsJson : public SrtStatsWriter
output << "\"packetsDropped\":" << mon.pktRcvDrop << ",";
output << "\"packetsRetransmitted\":" << mon.pktRcvRetrans << ",";
output << "\"packetsBelated\":" << mon.pktRcvBelated << ",";
output << "\"packetsFilterExtra\":" << mon.pktRcvFilterExtra << ",";
output << "\"packetsFilterSupply\":" << mon.pktRcvFilterSupply << ",";
output << "\"packetsFilterLoss\":" << mon.pktRcvFilterLoss << ",";
output << "\"bytes\":" << mon.byteRecv << ",";
output << "\"bytesLost\":" << mon.byteRcvLoss << ",";
output << "\"bytesDropped\":" << mon.byteRcvDrop << ",";
Expand Down Expand Up @@ -171,7 +175,9 @@ class SrtStatsCsv : public SrtStatsWriter
output << "msRTT,mbpsBandwidth,mbpsMaxBW,pktSent,pktSndLoss,pktSndDrop,";
output << "pktRetrans,byteSent,byteSndDrop,mbpsSendRate,usPktSndPeriod,";
output << "pktRecv,pktRcvLoss,pktRcvDrop,pktRcvRetrans,pktRcvBelated,";
output << "byteRecv,byteRcvLoss,byteRcvDrop,mbpsRecvRate,RCVLATENCYms";
output << "byteRecv,byteRcvLoss,byteRcvDrop,mbpsRecvRate,RCVLATENCYms,";
// Filter stats
output << "pktSndFilterExtra,pktRcvFilterExtra,pktRcvFilterSupply,pktRcvFilterLoss";
output << endl;
first_line_printed = true;
}
Expand Down Expand Up @@ -204,7 +210,12 @@ class SrtStatsCsv : public SrtStatsWriter
output << mon.byteRcvLoss << ",";
output << mon.byteRcvDrop << ",";
output << mon.mbpsRecvRate << ",";
output << rcv_latency;
output << rcv_latency << ",";
// Filter stats
output << mon.pktSndFilterExtra << ",";
output << mon.pktRcvFilterExtra << ",";
output << mon.pktRcvFilterSupply << ",";
output << mon.pktRcvFilterLoss; //<< ",";
output << endl;
return output.str();
}
Expand All @@ -228,6 +239,8 @@ class SrtStatsCols : public SrtStatsWriter
output << "LOST PKT SENT: " << setw(11) << mon.pktSndLoss << " RECEIVED: " << setw(11) << mon.pktRcvLoss << endl;
output << "REXMIT SENT: " << setw(11) << mon.pktRetrans << " RECEIVED: " << setw(11) << mon.pktRcvRetrans << endl;
output << "DROP PKT SENT: " << setw(11) << mon.pktSndDrop << " RECEIVED: " << setw(11) << mon.pktRcvDrop << endl;
output << "FILTER EXTRA TX: " << setw(11) << mon.pktSndFilterExtra << " RX: " << setw(11) << mon.pktRcvFilterExtra << endl;
output << "FILTER RX SUPPL: " << setw(11) << mon.pktRcvFilterSupply << " RX LOSS: " << setw(11) << mon.pktRcvFilterLoss << endl;
output << "RATE SENDING: " << setw(11) << mon.mbpsSendRate << " RECEIVING: " << setw(11) << mon.mbpsRecvRate << endl;
output << "BELATED RECEIVED: " << setw(11) << mon.pktRcvBelated << " AVG TIME: " << setw(11) << mon.pktRcvAvgBelatedTime << endl;
output << "REORDER DISTANCE: " << setw(11) << mon.pktReorderDistance << endl;
Expand Down
1 change: 1 addition & 0 deletions configure-data.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ set cmake_options {
enable-static "Should libsrt be built as a static library (default: ON)"
enable-suflip "Should suflip tool be built (default: OFF)"
enable-getnameinfo "In-logs sockaddr-to-string should do rev-dns (default: OFF)"
enable-unittests "Enable unit tests (default: OFF)"
enable-thread-check "Enable #include <threadcheck.h> that implements THREAD_* macros"
openssl-crypto-library=<filepath> "Path to a library."
openssl-include-dir=<path> "Path to a file."
Expand Down
2 changes: 1 addition & 1 deletion docs/API-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ connection parties.

#### SRT_REJ_FILTER

The `SRTO_FILTER` option has been set differently on both connection
The `SRTO_PACKETFILTER` option has been set differently on both connection
parties (NOTE: this flag may not exist yet in this version).


Expand Down
11 changes: 11 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,17 @@ dropped

---

| OptName | Since | Binding | Type | Units | Default | Range |
| --------------------- | ----- | ------- | ------ | ------ | -------- | ------- |
| `SRTO_PACKETFILTER` | 1.4.0 | pre | string | | | [...512]|

- **[SET]** - Setup the packet filter. The string must match appropriate syntax
for packet filter setup.

For details, see [Packet Filtering & FEC](packet-filtering-and-fec.md).

---

| OptName | Since | Binding | Type | Units | Default | Range |
| ------------------- | ----- | ------- | ------ | ----- | -------- | -------- |
| `SRTO_PASSPHRASE` | 0.0.0 | pre | string | | [0] | [10..79] |
Expand Down
2 changes: 2 additions & 0 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ int CUDTUnited::startup()
throw CUDTException(MJ_SETUP, MN_NONE, WSAGetLastError());
#endif

PacketFilter::globalInit();

//init CTimer::EventLock

if (m_bGCStatus)
Expand Down
137 changes: 89 additions & 48 deletions srtcore/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,74 +769,78 @@ int CRcvBuffer::addData(CUnit* unit, int offset)
m_iMaxPos = offset + 1;

if (m_pUnit[pos] != NULL) {
HLOGC(dlog.Debug, log << "addData: unit %" << unit->m_Packet.m_iSeqNo
<< " rejected, already exists");
return -1;
}
m_pUnit[pos] = unit;
countBytes(1, (int) unit->m_Packet.getLength());

m_pUnitQueue->makeUnitGood(unit);

HLOGC(dlog.Debug, log << "addData: unit %" << unit->m_Packet.m_iSeqNo
<< " accepted, off=" << offset << " POS=" << pos);
return 0;
}

int CRcvBuffer::readBuffer(char* data, int len)
{
int p = m_iStartPos;
int lastack = m_iLastAckPos;
int rs = len;
int p = m_iStartPos;
int lastack = m_iLastAckPos;
int rs = len;
#if ENABLE_HEAVY_LOGGING
char* begin = data;
char* begin = data;
#endif

const uint64_t now = (m_bTsbPdMode ? CTimer::getTime() : uint64_t());
const uint64_t now = (m_bTsbPdMode ? CTimer::getTime() : uint64_t());

HLOGC(dlog.Debug, log << CONID() << "readBuffer: start=" << p << " lastack=" << lastack);
while ((p != lastack) && (rs > 0))
{
if (m_pUnit[p] == NULL)
{
LOGC(dlog.Error, log << CONID() << " IPE readBuffer on null packet pointer");
return -1;
}
HLOGC(dlog.Debug, log << CONID() << "readBuffer: start=" << p << " lastack=" << lastack);
while ((p != lastack) && (rs > 0))
{
if (m_pUnit[p] == NULL)
{
LOGC(dlog.Error, log << CONID() << " IPE readBuffer on null packet pointer");
return -1;
}

if (m_bTsbPdMode)
{
HLOGC(dlog.Debug, log << CONID() << "readBuffer: chk if time2play: NOW=" << now << " PKT TS=" << getPktTsbPdTime(m_pUnit[p]->m_Packet.getMsgTimeStamp()));
if ((getPktTsbPdTime(m_pUnit[p]->m_Packet.getMsgTimeStamp()) > now))
break; /* too early for this unit, return whatever was copied */
}
if (m_bTsbPdMode)
{
HLOGC(dlog.Debug, log << CONID() << "readBuffer: chk if time2play: NOW=" << now << " PKT TS=" << getPktTsbPdTime(m_pUnit[p]->m_Packet.getMsgTimeStamp()));
if ((getPktTsbPdTime(m_pUnit[p]->m_Packet.getMsgTimeStamp()) > now))
break; /* too early for this unit, return whatever was copied */
}

int unitsize = (int) m_pUnit[p]->m_Packet.getLength() - m_iNotch;
if (unitsize > rs)
unitsize = rs;
int unitsize = (int) m_pUnit[p]->m_Packet.getLength() - m_iNotch;
if (unitsize > rs)
unitsize = rs;

HLOGC(dlog.Debug, log << CONID() << "readBuffer: copying buffer #" << p
<< " targetpos=" << int(data-begin) << " sourcepos=" << m_iNotch << " size=" << unitsize << " left=" << (unitsize-rs));
memcpy(data, m_pUnit[p]->m_Packet.m_pcData + m_iNotch, unitsize);
data += unitsize;
HLOGC(dlog.Debug, log << CONID() << "readBuffer: copying buffer #" << p
<< " targetpos=" << int(data-begin) << " sourcepos=" << m_iNotch << " size=" << unitsize << " left=" << (unitsize-rs));
memcpy(data, m_pUnit[p]->m_Packet.m_pcData + m_iNotch, unitsize);
data += unitsize;

if ((rs > unitsize) || (rs == int(m_pUnit[p]->m_Packet.getLength()) - m_iNotch))
{
CUnit* tmp = m_pUnit[p];
m_pUnit[p] = NULL;
m_pUnitQueue->makeUnitFree(tmp);
if ((rs > unitsize) || (rs == int(m_pUnit[p]->m_Packet.getLength()) - m_iNotch))
{
CUnit* tmp = m_pUnit[p];
m_pUnit[p] = NULL;
m_pUnitQueue->makeUnitFree(tmp);

if (++ p == m_iSize)
p = 0;
if (++ p == m_iSize)
p = 0;

m_iNotch = 0;
}
else
m_iNotch += rs;
m_iNotch = 0;
}
else
m_iNotch += rs;

rs -= unitsize;
}
rs -= unitsize;
}

/* we removed acked bytes form receive buffer */
countBytes(-1, -(len - rs), true);
m_iStartPos = p;
/* we removed acked bytes form receive buffer */
countBytes(-1, -(len - rs), true);
m_iStartPos = p;

return len - rs;
return len - rs;
}

int CRcvBuffer::readBufferToFile(fstream& ofs, int len)
Expand Down Expand Up @@ -936,10 +940,12 @@ bool CRcvBuffer::getRcvFirstMsg(ref_t<uint64_t> r_tsbpdtime, ref_t<bool> r_passa
/* Check the acknowledged packets */
if (getRcvReadyMsg(r_tsbpdtime, r_curpktseq))
{
HLOGC(dlog.Debug, log << "getRcvFirstMsg: ready CONTIG packet: %" << (*r_curpktseq));
return true;
}
else if (*r_tsbpdtime != 0)
{
HLOGC(dlog.Debug, log << "getRcvFirstMsg: no packets found");
return false;
}

Expand Down Expand Up @@ -993,6 +999,7 @@ bool CRcvBuffer::getRcvFirstMsg(ref_t<uint64_t> r_tsbpdtime, ref_t<bool> r_passa
{
/* There are packets in the sequence not received yet */
haslost = true;
HLOGC(dlog.Debug, log << "getRcvFirstMsg: empty hole at *" << i);
}
else
{
Expand All @@ -1011,13 +1018,18 @@ bool CRcvBuffer::getRcvFirstMsg(ref_t<uint64_t> r_tsbpdtime, ref_t<bool> r_passa
*r_curpktseq = skipseqno;
}

HLOGC(dlog.Debug, log << "getRcvFirstMsg: found ready packet, nSKIPPED: "
<< ((i - m_iLastAckPos + m_iSize) % m_iSize));

// NOTE: if haslost is not set, it means that this is the VERY FIRST
// packet, that is, packet currently at pos = m_iLastAckPos. There's no
// possibility that it is so otherwise because:
// - if this first good packet is ready to play, THIS HERE RETURNS NOW.
// ...
return true;
}
HLOGC(dlog.Debug, log << "getRcvFirstMsg: found NOT READY packet, nSKIPPED: "
<< ((i - m_iLastAckPos + m_iSize) % m_iSize));
// ... and if this first good packet WASN'T ready to play, THIS HERE RETURNS NOW, TOO,
// just states that there's no ready packet to play.
// ...
Expand All @@ -1027,6 +1039,7 @@ bool CRcvBuffer::getRcvFirstMsg(ref_t<uint64_t> r_tsbpdtime, ref_t<bool> r_passa
// the 'haslost' is set, which means that it continues only to find the first valid
// packet after stating that the very first packet isn't valid.
}
HLOGC(dlog.Debug, log << "getRcvFirstMsg: found NO PACKETS");
return false;
}

Expand All @@ -1048,6 +1061,9 @@ bool CRcvBuffer::getRcvReadyMsg(ref_t<uint64_t> tsbpdtime, ref_t<int32_t> curpkt
/* Skip any invalid skipped/dropped packets */
if (m_pUnit[i] == NULL)
{
HLOGC(mglog.Debug, log << "getRcvReadyMsg: POS=" << i
<< " +" << ((i - m_iStartPos + m_iSize) % m_iSize)
<< " SKIPPED - no unit there");
if (++ m_iStartPos == m_iSize)
m_iStartPos = 0;
continue;
Expand All @@ -1057,6 +1073,9 @@ bool CRcvBuffer::getRcvReadyMsg(ref_t<uint64_t> tsbpdtime, ref_t<int32_t> curpkt

if (m_pUnit[i]->m_iFlag != CUnit::GOOD)
{
HLOGC(mglog.Debug, log << "getRcvReadyMsg: POS=" << i
<< " +" << ((i - m_iStartPos + m_iSize) % m_iSize)
<< " SKIPPED - unit not good");
freeunit = true;
}
else
Expand All @@ -1065,7 +1084,10 @@ bool CRcvBuffer::getRcvReadyMsg(ref_t<uint64_t> tsbpdtime, ref_t<int32_t> curpkt
int64_t towait = (*tsbpdtime - CTimer::getTime());
if (towait > 0)
{
HLOGC(mglog.Debug, log << "getRcvReadyMsg: found packet, but not ready to play (only in " << (towait/1000.0) << "ms)");
HLOGC(mglog.Debug, log << "getRcvReadyMsg: POS=" << i
<< " +" << ((i - m_iStartPos + m_iSize) % m_iSize)
<< " pkt %" << curpktseq.get()
<< " NOT ready to play (only in " << (towait/1000.0) << "ms)");
return false;
}

Expand All @@ -1076,13 +1098,17 @@ bool CRcvBuffer::getRcvReadyMsg(ref_t<uint64_t> tsbpdtime, ref_t<int32_t> curpkt
}
else
{
HLOGC(mglog.Debug, log << "getRcvReadyMsg: packet seq=" << curpktseq.get() << " ready to play (delayed " << (-towait/1000.0) << "ms)");
HLOGC(mglog.Debug, log << "getRcvReadyMsg: POS=" << i
<< " +" << ((i - m_iStartPos + m_iSize) % m_iSize)
<< " pkt %" << curpktseq.get()
<< " ready to play (delayed " << (-towait/1000.0) << "ms)");
return true;
}
}

if (freeunit)
{
HLOGC(mglog.Debug, log << "getRcvReadyMsg: POS=" << i << " FREED");
/* removed skipped, dropped, undecryptable bytes from rcv buffer */
const int rmbytes = (int)m_pUnit[i]->m_Packet.getLength();
countBytes(-1, -rmbytes, true);
Expand Down Expand Up @@ -1598,6 +1624,8 @@ int CRcvBuffer::readMsg(char* data, int len, ref_t<SRT_MSGCTRL> r_msgctl)

const int unitsize = ((rs >= 0) && (unitsize > rs)) ? rs : pktlen;

HLOGC(mglog.Debug, log << "readMsg: checking unit POS=" << p);

if (unitsize > 0)
{
memcpy(data, m_pUnit[p]->m_Packet.m_pcData, unitsize);
Expand All @@ -1611,8 +1639,9 @@ int CRcvBuffer::readMsg(char* data, int len, ref_t<SRT_MSGCTRL> r_msgctl)
{
static uint64_t prev_now;
static uint64_t prev_srctime;
CPacket& pkt = m_pUnit[p]->m_Packet;

int32_t seq = m_pUnit[p]->m_Packet.m_iSeqNo;
int32_t seq = pkt.m_iSeqNo;

uint64_t nowtime = CTimer::getTime();
//CTimer::rdtsc(nowtime);
Expand All @@ -1622,23 +1651,35 @@ int CRcvBuffer::readMsg(char* data, int len, ref_t<SRT_MSGCTRL> r_msgctl)
int64_t nowdiff = prev_now ? (nowtime - prev_now) : 0;
uint64_t srctimediff = prev_srctime ? (srctime - prev_srctime) : 0;

HLOGC(dlog.Debug, log << CONID() << "readMsg: DELIVERED seq=" << seq << " T=" << FormatTime(srctime) << " in " << (timediff/1000.0) << "ms - "
"TIME-PREVIOUS: PKT: " << (srctimediff/1000.0) << " LOCAL: " << (nowdiff/1000.0));
HLOGC(dlog.Debug, log << CONID() << "readMsg: DELIVERED seq=" << seq
<< " from POS=" << p << " T="
<< FormatTime(srctime) << " in " << (timediff/1000.0)
<< "ms - TIME-PREVIOUS: PKT: " << (srctimediff/1000.0)
<< " LOCAL: " << (nowdiff/1000.0)
<< " !" << BufferStamp(pkt.data(), pkt.size()));

prev_now = nowtime;
prev_srctime = srctime;
}
#endif
}
else
{
HLOGC(dlog.Debug, log << CONID() << "readMsg: SKIPPED POS=" << p << " - ZERO SIZE UNIT");
}

if (!passack)
{
HLOGC(dlog.Debug, log << CONID() << "readMsg: FREEING UNIT POS=" << p);
CUnit* tmp = m_pUnit[p];
m_pUnit[p] = NULL;
m_pUnitQueue->makeUnitFree(tmp);
}
else
{
HLOGC(dlog.Debug, log << CONID() << "readMsg: PASSACK UNIT POS=" << p);
m_pUnit[p]->m_iFlag = CUnit::PASSACK;
}

if (++ p == m_iSize)
p = 0;
Expand Down
Loading