+11
-11
lines changedFilter options
+11
-11
lines changed Original file line number Diff line number Diff line change
@@ -34,10 +34,11 @@
34
34
#include "logging.h"
35
35
36
36
using namespace std;
37
-
using namespace srt;
38
37
using namespace srt::sync;
39
38
using namespace srt_logging;
40
39
40
+
namespace srt {
41
+
41
42
SrtCongestionControlBase::SrtCongestionControlBase(CUDT* parent)
42
43
{
43
44
m_parent = parent;
@@ -399,7 +400,7 @@ class FileCC : public SrtCongestionControlBase
399
400
else
400
401
{
401
402
double inc = 0;
402
-
const int loss_bw = 2 * (1000000 / m_dLastDecPeriod); // 2 times last loss point
403
+
const int loss_bw = static_cast<int>(2 * (1000000 / m_dLastDecPeriod)); // 2 times last loss point
403
404
const int bw_pktps = min(loss_bw, m_parent->bandwidth());
404
405
405
406
int64_t B = (int64_t)(bw_pktps - 1000000.0 / m_dPktSndPeriod);
@@ -500,7 +501,7 @@ class FileCC : public SrtCongestionControlBase
500
501
m_bLoss = true;
501
502
502
503
// TODO: const int pktsInFlight = CSeqNo::seqoff(m_iLastAck, m_parent->sndSeqNo());
503
-
const int pktsInFlight = m_parent->SRTT() / m_dPktSndPeriod;
504
+
const int pktsInFlight = static_cast<int>(m_parent->SRTT() / m_dPktSndPeriod);
504
505
const int numPktsLost = m_parent->sndLossLength();
505
506
const int lost_pcent_x10 = pktsInFlight > 0 ? (numPktsLost * 1000) / pktsInFlight : 0;
506
507
@@ -656,3 +657,5 @@ SrtCongestion::~SrtCongestion()
656
657
{
657
658
dispose();
658
659
}
660
+
661
+
} // namespace srt
Original file line number Diff line number Diff line change
@@ -17,10 +17,9 @@
17
17
#include <utility>
18
18
19
19
namespace srt {
20
-
class CUDT;
21
-
}
22
-
class SrtCongestionControlBase;
23
20
21
+
class CUDT;
22
+
class SrtCongestionControlBase;
24
23
typedef SrtCongestionControlBase* srtcc_create_t(srt::CUDT* parent);
25
24
26
25
class SrtCongestion
@@ -131,9 +130,7 @@ class SrtCongestion
131
130
};
132
131
};
133
132
134
-
namespace srt {
135
-
class CPacket;
136
-
}
133
+
class CPacket;
137
134
138
135
class SrtCongestionControlBase
139
136
{
@@ -224,6 +221,6 @@ class SrtCongestionControlBase
224
221
};
225
222
226
223
227
-
224
+
} // namespace srt
228
225
229
226
#endif
Original file line number Diff line number Diff line change
@@ -570,7 +570,7 @@ struct CSrtConfigSetter<SRTO_CONGESTION>
570
570
if (val == "vod")
571
571
val = "file";
572
572
573
-
bool res = SrtCongestion::exists(val);
573
+
bool res = srt::SrtCongestion::exists(val);
574
574
if (!res)
575
575
throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);
576
576
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4