Skip to content

Commit 33a9ae1

Browse files
authored
Merge pull request #1908 from CastagnaIT/cleanups_as
[AdaptiveStream] Make consistent methods namespaces
2 parents 7e59060 + 84ae248 commit 33a9ae1

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/common/AdaptiveStream.cpp

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ using namespace ADP;
3535
using namespace PLAYLIST;
3636
using namespace UTILS;
3737

38-
uint32_t AdaptiveStream::globalClsId = 0;
38+
uint32_t adaptive::AdaptiveStream::globalClsId = 0;
3939

40-
AdaptiveStream::AdaptiveStream(AdaptiveTree* tree,
41-
PLAYLIST::CAdaptationSet* adp,
42-
PLAYLIST::CRepresentation* initialRepr)
40+
adaptive::AdaptiveStream::AdaptiveStream(AdaptiveTree* tree,
41+
PLAYLIST::CAdaptationSet* adp,
42+
PLAYLIST::CRepresentation* initialRepr)
4343
: m_tree(tree),
4444
current_period_(m_tree->m_currentPeriod),
4545
current_adp_(adp),
@@ -59,14 +59,14 @@ AdaptiveStream::AdaptiveStream(AdaptiveTree* tree,
5959
adp->GetId().c_str(), StreamTypeToString(adp->GetStreamType()).c_str());
6060
}
6161

62-
AdaptiveStream::~AdaptiveStream()
62+
adaptive::AdaptiveStream::~AdaptiveStream()
6363
{
6464
Stop();
6565
Dispose();
6666
clear();
6767
}
6868

69-
void AdaptiveStream::Reset()
69+
void adaptive::AdaptiveStream::Reset()
7070
{
7171
segment_read_pos_ = 0;
7272
currentPTSOffset_ = 0;
@@ -194,7 +194,7 @@ bool adaptive::AdaptiveStream::DownloadImpl(const DownloadInfo& downloadInfo,
194194
return false;
195195
}
196196

197-
bool AdaptiveStream::PrepareNextDownload(DownloadInfo& downloadInfo)
197+
bool adaptive::AdaptiveStream::PrepareNextDownload(DownloadInfo& downloadInfo)
198198
{
199199
SegmentBuffer* segBuffer = m_segBuffers.GetNextDownload();
200200

@@ -206,9 +206,9 @@ bool AdaptiveStream::PrepareNextDownload(DownloadInfo& downloadInfo)
206206
return PrepareDownload(segBuffer->rep, segBuffer->segment, downloadInfo);
207207
}
208208

209-
bool AdaptiveStream::PrepareDownload(const PLAYLIST::CRepresentation* rep,
210-
const PLAYLIST::CSegment& seg,
211-
DownloadInfo& downloadInfo)
209+
bool adaptive::AdaptiveStream::PrepareDownload(const PLAYLIST::CRepresentation* rep,
210+
const PLAYLIST::CSegment& seg,
211+
DownloadInfo& downloadInfo)
212212
{
213213
std::string streamUrl;
214214

@@ -260,7 +260,7 @@ bool AdaptiveStream::PrepareDownload(const PLAYLIST::CRepresentation* rep,
260260
return true;
261261
}
262262

263-
void AdaptiveStream::ResetSegment(const PLAYLIST::CSegment& segment)
263+
void adaptive::AdaptiveStream::ResetSegment(const PLAYLIST::CSegment& segment)
264264
{
265265
segment_read_pos_ = 0;
266266

@@ -271,7 +271,7 @@ void AdaptiveStream::ResetSegment(const PLAYLIST::CSegment& segment)
271271
}
272272
}
273273

274-
void AdaptiveStream::ResetActiveBuffer()
274+
void adaptive::AdaptiveStream::ResetActiveBuffer()
275275
{
276276
thread_data_->StopDownloads();
277277
{
@@ -284,7 +284,7 @@ void AdaptiveStream::ResetActiveBuffer()
284284
thread_data_->StartDownloads();
285285
}
286286

287-
void AdaptiveStream::worker()
287+
void adaptive::AdaptiveStream::worker()
288288
{
289289
do
290290
{
@@ -369,7 +369,7 @@ void AdaptiveStream::worker()
369369
} while (!thread_data_->IsThreadExit());
370370
}
371371

372-
int AdaptiveStream::SecondsSinceUpdate() const
372+
int adaptive::AdaptiveStream::SecondsSinceUpdate() const
373373
{
374374
const std::chrono::time_point<std::chrono::system_clock>& tPoint(
375375
lastUpdated_ > m_tree->GetLastUpdated() ? lastUpdated_ : m_tree->GetLastUpdated());
@@ -378,7 +378,7 @@ int AdaptiveStream::SecondsSinceUpdate() const
378378
.count());
379379
}
380380

381-
void AdaptiveStream::OnTFRFatom(uint64_t ts, uint64_t duration, uint32_t mediaTimescale)
381+
void adaptive::AdaptiveStream::OnTFRFatom(uint64_t ts, uint64_t duration, uint32_t mediaTimescale)
382382
{
383383
m_tree->InsertLiveFragment(current_adp_, current_rep_, ts, duration, mediaTimescale);
384384
}
@@ -388,8 +388,8 @@ bool adaptive::AdaptiveStream::IsRequiredCreateMovieAtom()
388388
return m_tree->GetTreeType() == TreeType::SMOOTH_STREAMING;
389389
}
390390

391-
bool AdaptiveStream::parseIndexRange(PLAYLIST::CRepresentation* rep,
392-
const std::vector<uint8_t>& buffer)
391+
bool adaptive::AdaptiveStream::parseIndexRange(PLAYLIST::CRepresentation* rep,
392+
const std::vector<uint8_t>& buffer)
393393
{
394394
#ifndef INPUTSTREAM_TEST_BUILD
395395
LOG::Log(LOGDEBUG, "[AS-%u] Build segments from SIDX atom...", clsId);
@@ -540,7 +540,7 @@ bool AdaptiveStream::parseIndexRange(PLAYLIST::CRepresentation* rep,
540540
return false;
541541
}
542542

543-
bool AdaptiveStream::start_stream(const uint64_t startPts)
543+
bool adaptive::AdaptiveStream::start_stream(const uint64_t startPts)
544544
{
545545
if (!current_rep_ || current_rep_->IsSubtitleFileStream())
546546
return false;
@@ -713,7 +713,7 @@ bool AdaptiveStream::start_stream(const uint64_t startPts)
713713
return true;
714714
}
715715

716-
bool AdaptiveStream::ensureSegment()
716+
bool adaptive::AdaptiveStream::ensureSegment()
717717
{
718718
// NOTE: Some demuxers may call ensureSegment more times to try make more attempts when it return false.
719719

@@ -937,7 +937,7 @@ bool AdaptiveStream::ensureSegment()
937937
return true;
938938
}
939939

940-
uint32_t AdaptiveStream::read(void* buffer, uint32_t bytesToRead)
940+
uint32_t adaptive::AdaptiveStream::read(void* buffer, uint32_t bytesToRead)
941941
{
942942
if (ensureSegment() && bytesToRead > 0)
943943
{
@@ -977,7 +977,7 @@ uint32_t AdaptiveStream::read(void* buffer, uint32_t bytesToRead)
977977
return 0;
978978
}
979979

980-
bool AdaptiveStream::ReadFullBuffer(std::vector<uint8_t>& buffer)
980+
bool adaptive::AdaptiveStream::ReadFullBuffer(std::vector<uint8_t>& buffer)
981981
{
982982
if (ensureSegment())
983983
{
@@ -1029,7 +1029,7 @@ bool adaptive::AdaptiveStream::GetBufferSize(uint64_t& size)
10291029
return false;
10301030
}
10311031

1032-
uint64_t AdaptiveStream::tell()
1032+
uint64_t adaptive::AdaptiveStream::tell()
10331033
{
10341034
// if the current segment has already been read completely,
10351035
// call "Read" to move on to the next one and so update the absolute position
@@ -1039,7 +1039,7 @@ uint64_t AdaptiveStream::tell()
10391039
return absolute_position_;
10401040
}
10411041

1042-
bool AdaptiveStream::seek(uint64_t const pos)
1042+
bool adaptive::AdaptiveStream::seek(uint64_t const pos)
10431043
{
10441044
if (m_segBuffers.IsEmpty())
10451045
return false;
@@ -1073,7 +1073,7 @@ bool AdaptiveStream::seek(uint64_t const pos)
10731073
return true;
10741074
}
10751075

1076-
uint64_t AdaptiveStream::getMaxTimeMs()
1076+
uint64_t adaptive::AdaptiveStream::getMaxTimeMs()
10771077
{
10781078
if (current_rep_->Timeline().IsEmpty())
10791079
return 0;
@@ -1106,7 +1106,7 @@ void adaptive::AdaptiveStream::Disable()
11061106
m_startEvent = EVENT_TYPE::STREAM_ENABLE;
11071107
}
11081108

1109-
void AdaptiveStream::ResetCurrentSegment(const PLAYLIST::CSegment& newSegment)
1109+
void adaptive::AdaptiveStream::ResetCurrentSegment(const PLAYLIST::CSegment& newSegment)
11101110
{
11111111
// EnsureSegment always loads the segment following the one specified as current, then sets the previous one
11121112
const CSegment* prevSeg = current_rep_->Timeline().GetPrevious(newSegment);
@@ -1153,7 +1153,7 @@ PLAYLIST::StreamType adaptive::AdaptiveStream::GetStreamType() const
11531153
return current_adp_->GetStreamType();
11541154
}
11551155

1156-
bool AdaptiveStream::seek_time(double seek_seconds, bool preceeding, bool& needReset)
1156+
bool adaptive::AdaptiveStream::seek_time(double seek_seconds, bool preceeding, bool& needReset)
11571157
{
11581158
if (!current_rep_)
11591159
return false;
@@ -1243,7 +1243,7 @@ bool AdaptiveStream::seek_time(double seek_seconds, bool preceeding, bool& needR
12431243
return false;
12441244
}
12451245

1246-
bool AdaptiveStream::waitingForSegment() const
1246+
bool adaptive::AdaptiveStream::waitingForSegment() const
12471247
{
12481248
if (m_tree->IsLive() && thread_data_->State() == THREADDATA::ThState::RUNNING)
12491249
{
@@ -1260,12 +1260,12 @@ bool AdaptiveStream::waitingForSegment() const
12601260
return false;
12611261
}
12621262

1263-
void AdaptiveStream::FixateInitialization(bool on)
1263+
void adaptive::AdaptiveStream::FixateInitialization(bool on)
12641264
{
12651265
m_fixateInitialization = on;
12661266
}
12671267

1268-
bool AdaptiveStream::GenerateSidxSegments(PLAYLIST::CRepresentation* rep)
1268+
bool adaptive::AdaptiveStream::GenerateSidxSegments(PLAYLIST::CRepresentation* rep)
12691269
{
12701270
const ContainerType containerType = rep->GetContainerType();
12711271
if (containerType == ContainerType::NOTYPE)
@@ -1330,7 +1330,7 @@ bool AdaptiveStream::GenerateSidxSegments(PLAYLIST::CRepresentation* rep)
13301330
return false;
13311331
}
13321332

1333-
void AdaptiveStream::Stop()
1333+
void adaptive::AdaptiveStream::Stop()
13341334
{
13351335
if (thread_data_)
13361336
{
@@ -1346,7 +1346,7 @@ void AdaptiveStream::Stop()
13461346
current_rep_->SetIsEnabled(false);
13471347
}
13481348

1349-
void AdaptiveStream::clear()
1349+
void adaptive::AdaptiveStream::clear()
13501350
{
13511351
current_adp_ = 0;
13521352
current_rep_ = 0;

0 commit comments

Comments
 (0)