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
7e1aa3a3
Commit
7e1aa3a3
authored
Apr 30, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: don't expect new segment on end of timeline
static live with template+timeline never ended
parent
a53fc8ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
modules/demux/adaptative/playlist/SegmentInformation.cpp
modules/demux/adaptative/playlist/SegmentInformation.cpp
+5
-3
modules/demux/adaptative/playlist/SegmentTimeline.cpp
modules/demux/adaptative/playlist/SegmentTimeline.cpp
+11
-0
modules/demux/adaptative/playlist/SegmentTimeline.h
modules/demux/adaptative/playlist/SegmentTimeline.h
+1
-0
No files found.
modules/demux/adaptative/playlist/SegmentInformation.cpp
View file @
7e1aa3a3
...
...
@@ -147,9 +147,11 @@ ISegment * SegmentInformation::getSegment(SegmentInfoType type, uint64_t pos) co
if
(
size
)
{
/* check if that's a template (fixme: find a better way) */
Base
SegmentTemplate
*
templ
;
if
(
size
==
1
&&
(
templ
=
dynamic_cast
<
Base
SegmentTemplate
*>
(
retSegments
[
0
]))
)
Media
SegmentTemplate
*
templ
;
if
(
size
==
1
&&
(
templ
=
dynamic_cast
<
Media
SegmentTemplate
*>
(
retSegments
[
0
]))
)
{
if
(
templ
->
segmentTimeline
.
Get
()
==
NULL
||
templ
->
segmentTimeline
.
Get
()
->
maxElementNumber
()
>
pos
)
return
templ
;
}
else
if
(
pos
<
size
)
...
...
modules/demux/adaptative/playlist/SegmentTimeline.cpp
View file @
7e1aa3a3
...
...
@@ -108,6 +108,17 @@ mtime_t SegmentTimeline::getScaledPlaybackTimeByElementNumber(uint64_t number) c
return
totalscaledtime
;
}
size_t
SegmentTimeline
::
maxElementNumber
()
const
{
size_t
count
=
0
;
std
::
list
<
Element
*>::
const_iterator
it
;
for
(
it
=
elements
.
begin
();
it
!=
elements
.
end
();
it
++
)
count
+=
(
*
it
)
->
r
+
1
;
return
pruned
+
count
-
1
;
}
size_t
SegmentTimeline
::
prune
(
mtime_t
time
)
{
mtime_t
scaled
=
time
*
inheritTimescale
()
/
CLOCK_FREQ
;
...
...
modules/demux/adaptative/playlist/SegmentTimeline.h
View file @
7e1aa3a3
...
...
@@ -46,6 +46,7 @@ namespace adaptative
void
addElement
(
mtime_t
d
,
uint64_t
r
=
0
,
mtime_t
t
=
0
);
uint64_t
getElementNumberByScaledPlaybackTime
(
time_t
)
const
;
mtime_t
getScaledPlaybackTimeByElementNumber
(
uint64_t
)
const
;
size_t
maxElementNumber
()
const
;
size_t
prune
(
mtime_t
);
void
mergeWith
(
SegmentTimeline
&
);
mtime_t
start
()
const
;
...
...
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