@@ -35,11 +35,11 @@ using namespace ADP;
35
35
using namespace PLAYLIST ;
36
36
using namespace UTILS ;
37
37
38
- uint32_t AdaptiveStream::globalClsId = 0 ;
38
+ uint32_t adaptive:: AdaptiveStream::globalClsId = 0 ;
39
39
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)
43
43
: m_tree(tree),
44
44
current_period_(m_tree->m_currentPeriod),
45
45
current_adp_(adp),
@@ -59,14 +59,14 @@ AdaptiveStream::AdaptiveStream(AdaptiveTree* tree,
59
59
adp->GetId ().c_str (), StreamTypeToString (adp->GetStreamType ()).c_str ());
60
60
}
61
61
62
- AdaptiveStream::~AdaptiveStream ()
62
+ adaptive:: AdaptiveStream::~AdaptiveStream ()
63
63
{
64
64
Stop ();
65
65
Dispose ();
66
66
clear ();
67
67
}
68
68
69
- void AdaptiveStream::Reset ()
69
+ void adaptive:: AdaptiveStream::Reset ()
70
70
{
71
71
segment_read_pos_ = 0 ;
72
72
currentPTSOffset_ = 0 ;
@@ -194,7 +194,7 @@ bool adaptive::AdaptiveStream::DownloadImpl(const DownloadInfo& downloadInfo,
194
194
return false ;
195
195
}
196
196
197
- bool AdaptiveStream::PrepareNextDownload (DownloadInfo& downloadInfo)
197
+ bool adaptive:: AdaptiveStream::PrepareNextDownload (DownloadInfo& downloadInfo)
198
198
{
199
199
SegmentBuffer* segBuffer = m_segBuffers.GetNextDownload ();
200
200
@@ -206,9 +206,9 @@ bool AdaptiveStream::PrepareNextDownload(DownloadInfo& downloadInfo)
206
206
return PrepareDownload (segBuffer->rep , segBuffer->segment , downloadInfo);
207
207
}
208
208
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)
212
212
{
213
213
std::string streamUrl;
214
214
@@ -260,7 +260,7 @@ bool AdaptiveStream::PrepareDownload(const PLAYLIST::CRepresentation* rep,
260
260
return true ;
261
261
}
262
262
263
- void AdaptiveStream::ResetSegment (const PLAYLIST::CSegment& segment)
263
+ void adaptive:: AdaptiveStream::ResetSegment (const PLAYLIST::CSegment& segment)
264
264
{
265
265
segment_read_pos_ = 0 ;
266
266
@@ -271,7 +271,7 @@ void AdaptiveStream::ResetSegment(const PLAYLIST::CSegment& segment)
271
271
}
272
272
}
273
273
274
- void AdaptiveStream::ResetActiveBuffer ()
274
+ void adaptive:: AdaptiveStream::ResetActiveBuffer ()
275
275
{
276
276
thread_data_->StopDownloads ();
277
277
{
@@ -284,7 +284,7 @@ void AdaptiveStream::ResetActiveBuffer()
284
284
thread_data_->StartDownloads ();
285
285
}
286
286
287
- void AdaptiveStream::worker ()
287
+ void adaptive:: AdaptiveStream::worker ()
288
288
{
289
289
do
290
290
{
@@ -369,7 +369,7 @@ void AdaptiveStream::worker()
369
369
} while (!thread_data_->IsThreadExit ());
370
370
}
371
371
372
- int AdaptiveStream::SecondsSinceUpdate () const
372
+ int adaptive:: AdaptiveStream::SecondsSinceUpdate () const
373
373
{
374
374
const std::chrono::time_point<std::chrono::system_clock>& tPoint (
375
375
lastUpdated_ > m_tree->GetLastUpdated () ? lastUpdated_ : m_tree->GetLastUpdated ());
@@ -378,7 +378,7 @@ int AdaptiveStream::SecondsSinceUpdate() const
378
378
.count ());
379
379
}
380
380
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)
382
382
{
383
383
m_tree->InsertLiveFragment (current_adp_, current_rep_, ts, duration, mediaTimescale);
384
384
}
@@ -388,8 +388,8 @@ bool adaptive::AdaptiveStream::IsRequiredCreateMovieAtom()
388
388
return m_tree->GetTreeType () == TreeType::SMOOTH_STREAMING;
389
389
}
390
390
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)
393
393
{
394
394
#ifndef INPUTSTREAM_TEST_BUILD
395
395
LOG::Log (LOGDEBUG, " [AS-%u] Build segments from SIDX atom..." , clsId);
@@ -540,7 +540,7 @@ bool AdaptiveStream::parseIndexRange(PLAYLIST::CRepresentation* rep,
540
540
return false ;
541
541
}
542
542
543
- bool AdaptiveStream::start_stream (const uint64_t startPts)
543
+ bool adaptive:: AdaptiveStream::start_stream (const uint64_t startPts)
544
544
{
545
545
if (!current_rep_ || current_rep_->IsSubtitleFileStream ())
546
546
return false ;
@@ -713,7 +713,7 @@ bool AdaptiveStream::start_stream(const uint64_t startPts)
713
713
return true ;
714
714
}
715
715
716
- bool AdaptiveStream::ensureSegment ()
716
+ bool adaptive:: AdaptiveStream::ensureSegment ()
717
717
{
718
718
// NOTE: Some demuxers may call ensureSegment more times to try make more attempts when it return false.
719
719
@@ -937,7 +937,7 @@ bool AdaptiveStream::ensureSegment()
937
937
return true ;
938
938
}
939
939
940
- uint32_t AdaptiveStream::read (void * buffer, uint32_t bytesToRead)
940
+ uint32_t adaptive:: AdaptiveStream::read (void * buffer, uint32_t bytesToRead)
941
941
{
942
942
if (ensureSegment () && bytesToRead > 0 )
943
943
{
@@ -977,7 +977,7 @@ uint32_t AdaptiveStream::read(void* buffer, uint32_t bytesToRead)
977
977
return 0 ;
978
978
}
979
979
980
- bool AdaptiveStream::ReadFullBuffer (std::vector<uint8_t >& buffer)
980
+ bool adaptive:: AdaptiveStream::ReadFullBuffer (std::vector<uint8_t >& buffer)
981
981
{
982
982
if (ensureSegment ())
983
983
{
@@ -1029,7 +1029,7 @@ bool adaptive::AdaptiveStream::GetBufferSize(uint64_t& size)
1029
1029
return false ;
1030
1030
}
1031
1031
1032
- uint64_t AdaptiveStream::tell ()
1032
+ uint64_t adaptive:: AdaptiveStream::tell ()
1033
1033
{
1034
1034
// if the current segment has already been read completely,
1035
1035
// call "Read" to move on to the next one and so update the absolute position
@@ -1039,7 +1039,7 @@ uint64_t AdaptiveStream::tell()
1039
1039
return absolute_position_;
1040
1040
}
1041
1041
1042
- bool AdaptiveStream::seek (uint64_t const pos)
1042
+ bool adaptive:: AdaptiveStream::seek (uint64_t const pos)
1043
1043
{
1044
1044
if (m_segBuffers.IsEmpty ())
1045
1045
return false ;
@@ -1073,7 +1073,7 @@ bool AdaptiveStream::seek(uint64_t const pos)
1073
1073
return true ;
1074
1074
}
1075
1075
1076
- uint64_t AdaptiveStream::getMaxTimeMs ()
1076
+ uint64_t adaptive:: AdaptiveStream::getMaxTimeMs ()
1077
1077
{
1078
1078
if (current_rep_->Timeline ().IsEmpty ())
1079
1079
return 0 ;
@@ -1106,7 +1106,7 @@ void adaptive::AdaptiveStream::Disable()
1106
1106
m_startEvent = EVENT_TYPE::STREAM_ENABLE;
1107
1107
}
1108
1108
1109
- void AdaptiveStream::ResetCurrentSegment (const PLAYLIST::CSegment& newSegment)
1109
+ void adaptive:: AdaptiveStream::ResetCurrentSegment (const PLAYLIST::CSegment& newSegment)
1110
1110
{
1111
1111
// EnsureSegment always loads the segment following the one specified as current, then sets the previous one
1112
1112
const CSegment* prevSeg = current_rep_->Timeline ().GetPrevious (newSegment);
@@ -1153,7 +1153,7 @@ PLAYLIST::StreamType adaptive::AdaptiveStream::GetStreamType() const
1153
1153
return current_adp_->GetStreamType ();
1154
1154
}
1155
1155
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)
1157
1157
{
1158
1158
if (!current_rep_)
1159
1159
return false ;
@@ -1243,7 +1243,7 @@ bool AdaptiveStream::seek_time(double seek_seconds, bool preceeding, bool& needR
1243
1243
return false ;
1244
1244
}
1245
1245
1246
- bool AdaptiveStream::waitingForSegment () const
1246
+ bool adaptive:: AdaptiveStream::waitingForSegment () const
1247
1247
{
1248
1248
if (m_tree->IsLive () && thread_data_->State () == THREADDATA::ThState::RUNNING)
1249
1249
{
@@ -1260,12 +1260,12 @@ bool AdaptiveStream::waitingForSegment() const
1260
1260
return false ;
1261
1261
}
1262
1262
1263
- void AdaptiveStream::FixateInitialization (bool on)
1263
+ void adaptive:: AdaptiveStream::FixateInitialization (bool on)
1264
1264
{
1265
1265
m_fixateInitialization = on;
1266
1266
}
1267
1267
1268
- bool AdaptiveStream::GenerateSidxSegments (PLAYLIST::CRepresentation* rep)
1268
+ bool adaptive:: AdaptiveStream::GenerateSidxSegments (PLAYLIST::CRepresentation* rep)
1269
1269
{
1270
1270
const ContainerType containerType = rep->GetContainerType ();
1271
1271
if (containerType == ContainerType::NOTYPE)
@@ -1330,7 +1330,7 @@ bool AdaptiveStream::GenerateSidxSegments(PLAYLIST::CRepresentation* rep)
1330
1330
return false ;
1331
1331
}
1332
1332
1333
- void AdaptiveStream::Stop ()
1333
+ void adaptive:: AdaptiveStream::Stop ()
1334
1334
{
1335
1335
if (thread_data_)
1336
1336
{
@@ -1346,7 +1346,7 @@ void AdaptiveStream::Stop()
1346
1346
current_rep_->SetIsEnabled (false );
1347
1347
}
1348
1348
1349
- void AdaptiveStream::clear ()
1349
+ void adaptive:: AdaptiveStream::clear ()
1350
1350
{
1351
1351
current_adp_ = 0 ;
1352
1352
current_rep_ = 0 ;
0 commit comments