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
a64f24a7
Commit
a64f24a7
authored
May 27, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: provide playlist duration range for updates
parent
b5ac100f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
+7
-0
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
+1
-0
modules/demux/adaptative/playlist/SegmentInformation.cpp
modules/demux/adaptative/playlist/SegmentInformation.cpp
+25
-0
modules/demux/adaptative/playlist/SegmentInformation.hpp
modules/demux/adaptative/playlist/SegmentInformation.hpp
+1
-0
No files found.
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
View file @
a64f24a7
...
...
@@ -130,6 +130,13 @@ void AbstractPlaylist::getTimeLinesBoundaries(mtime_t *min, mtime_t *max) const
}
}
void
AbstractPlaylist
::
getPlaylistDurationsRange
(
mtime_t
*
min
,
mtime_t
*
max
)
const
{
*
min
=
*
max
=
0
;
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
periods
.
at
(
i
)
->
getDurationsRange
(
min
,
max
);
}
void
AbstractPlaylist
::
mergeWith
(
AbstractPlaylist
*
updatedAbstractPlaylist
,
mtime_t
prunebarrier
)
{
availabilityEndTime
.
Set
(
updatedAbstractPlaylist
->
availabilityEndTime
.
Get
());
...
...
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
View file @
a64f24a7
...
...
@@ -55,6 +55,7 @@ namespace adaptative
void
mergeWith
(
AbstractPlaylist
*
,
mtime_t
=
0
);
void
getTimeLinesBoundaries
(
mtime_t
*
,
mtime_t
*
)
const
;
void
getPlaylistDurationsRange
(
mtime_t
*
,
mtime_t
*
)
const
;
Property
<
time_t
>
duration
;
Property
<
time_t
>
playbackStart
;
...
...
modules/demux/adaptative/playlist/SegmentInformation.cpp
View file @
a64f24a7
...
...
@@ -251,6 +251,31 @@ void SegmentInformation::collectTimelines(std::vector<SegmentTimeline *> *timeli
(
*
it
)
->
collectTimelines
(
timelines
);
}
void
SegmentInformation
::
getDurationsRange
(
mtime_t
*
min
,
mtime_t
*
max
)
const
{
/* FIXME: cache stuff in segment holders */
std
::
vector
<
ISegment
*>
seglist
=
getSegments
(
INFOTYPE_MEDIA
);
std
::
vector
<
ISegment
*>::
const_iterator
it
;
mtime_t
total
=
0
;
for
(
it
=
seglist
.
begin
();
it
!=
seglist
.
end
();
++
it
)
{
const
mtime_t
duration
=
(
*
it
)
->
duration
.
Get
();
if
(
duration
)
{
total
+=
duration
;
if
(
!*
min
||
duration
<
*
min
)
*
min
=
duration
;
}
}
if
(
total
>
*
max
)
*
max
=
total
;
for
(
size_t
i
=
0
;
i
<
childs
.
size
();
i
++
)
childs
.
at
(
i
)
->
getDurationsRange
(
min
,
max
);
}
void
SegmentInformation
::
mergeWith
(
SegmentInformation
*
updated
,
mtime_t
prunetime
)
{
/* Support Segment List for now */
...
...
modules/demux/adaptative/playlist/SegmentInformation.hpp
View file @
a64f24a7
...
...
@@ -78,6 +78,7 @@ namespace adaptative
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
);
protected:
...
...
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