Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ef001ee4
Commit
ef001ee4
authored
Aug 30, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: merge timelines/segments boundaries
parent
4312d4a1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
29 deletions
+13
-29
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
+0
-18
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
+0
-1
modules/demux/adaptative/playlist/SegmentInformation.cpp
modules/demux/adaptative/playlist/SegmentInformation.cpp
+12
-8
modules/demux/adaptative/playlist/SegmentInformation.hpp
modules/demux/adaptative/playlist/SegmentInformation.hpp
+0
-1
modules/demux/dash/DASHManager.cpp
modules/demux/dash/DASHManager.cpp
+1
-1
No files found.
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
View file @
ef001ee4
...
...
@@ -110,24 +110,6 @@ BasePeriod* AbstractPlaylist::getNextPeriod(BasePeriod *period)
return
NULL
;
}
void
AbstractPlaylist
::
getTimeLinesBoundaries
(
mtime_t
*
min
,
mtime_t
*
max
)
const
{
*
min
=
*
max
=
0
;
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
std
::
vector
<
SegmentTimeline
*>
timelines
;
periods
.
at
(
i
)
->
collectTimelines
(
&
timelines
);
for
(
size_t
j
=
0
;
j
<
timelines
.
size
();
j
++
)
{
const
SegmentTimeline
*
timeline
=
timelines
.
at
(
j
);
if
(
timeline
->
start
()
>
*
min
)
*
min
=
timeline
->
start
();
if
(
!*
max
||
timeline
->
end
()
<
*
max
)
*
max
=
timeline
->
end
();
}
}
}
void
AbstractPlaylist
::
getPlaylistDurationsRange
(
mtime_t
*
min
,
mtime_t
*
max
)
const
{
...
...
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
View file @
ef001ee4
...
...
@@ -55,7 +55,6 @@ namespace adaptative
void
mergeWith
(
AbstractPlaylist
*
,
mtime_t
=
0
);
void
pruneBySegmentNumber
(
uint64_t
);
void
getTimeLinesBoundaries
(
mtime_t
*
,
mtime_t
*
)
const
;
void
getPlaylistDurationsRange
(
mtime_t
*
,
mtime_t
*
)
const
;
Property
<
mtime_t
>
duration
;
...
...
modules/demux/adaptative/playlist/SegmentInformation.cpp
View file @
ef001ee4
...
...
@@ -244,15 +244,7 @@ mtime_t SegmentInformation::getPlaybackTimeBySegmentNumber(uint64_t number) cons
return
time
;
}
void
SegmentInformation
::
collectTimelines
(
std
::
vector
<
SegmentTimeline
*>
*
timelines
)
const
{
if
(
mediaSegmentTemplate
&&
mediaSegmentTemplate
->
segmentTimeline
.
Get
())
timelines
->
push_back
(
mediaSegmentTemplate
->
segmentTimeline
.
Get
());
std
::
vector
<
SegmentInformation
*>::
const_iterator
it
;
for
(
it
=
childs
.
begin
();
it
!=
childs
.
end
();
++
it
)
(
*
it
)
->
collectTimelines
(
timelines
);
}
void
SegmentInformation
::
getDurationsRange
(
mtime_t
*
min
,
mtime_t
*
max
)
const
{
...
...
@@ -276,6 +268,18 @@ void SegmentInformation::getDurationsRange(mtime_t *min, mtime_t *max) const
if
(
total
>
*
max
)
*
max
=
total
;
if
(
mediaSegmentTemplate
&&
mediaSegmentTemplate
->
segmentTimeline
.
Get
())
{
const
mtime_t
duration
=
mediaSegmentTemplate
->
segmentTimeline
.
Get
()
->
start
()
-
mediaSegmentTemplate
->
segmentTimeline
.
Get
()
->
end
();
if
(
!*
min
||
duration
<
*
min
)
*
min
=
duration
;
if
(
duration
>
*
max
)
*
max
=
duration
;
}
for
(
size_t
i
=
0
;
i
<
childs
.
size
();
i
++
)
childs
.
at
(
i
)
->
getDurationsRange
(
min
,
max
);
}
...
...
modules/demux/adaptative/playlist/SegmentInformation.hpp
View file @
ef001ee4
...
...
@@ -80,7 +80,6 @@ namespace adaptative
ISegment
*
getSegment
(
SegmentInfoType
,
uint64_t
=
0
)
const
;
bool
getSegmentNumberByTime
(
mtime_t
,
uint64_t
*
)
const
;
mtime_t
getPlaybackTimeBySegmentNumber
(
uint64_t
)
const
;
void
collectTimelines
(
std
::
vector
<
SegmentTimeline
*>
*
)
const
;
void
getDurationsRange
(
mtime_t
*
,
mtime_t
*
)
const
;
virtual
void
mergeWith
(
SegmentInformation
*
,
mtime_t
);
virtual
void
pruneBySegmentNumber
(
uint64_t
);
...
...
modules/demux/dash/DASHManager.cpp
View file @
ef001ee4
...
...
@@ -133,7 +133,7 @@ bool DASHManager::updatePlaylist()
/* Compute new MPD update time */
mtime_t
mininterval
=
0
;
mtime_t
maxinterval
=
0
;
playlist
->
get
TimeLinesBoundaries
(
&
mininterval
,
&
maxinterval
);
playlist
->
get
PlaylistDurationsRange
(
&
mininterval
,
&
maxinterval
);
if
(
playlist
->
minUpdatePeriod
.
Get
()
>
mininterval
)
mininterval
=
playlist
->
minUpdatePeriod
.
Get
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment