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
e5de71d0
Commit
e5de71d0
authored
Jan 13, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: prune expired live timeline elements
parent
5d66046d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
3 deletions
+32
-3
modules/demux/dash/DASHManager.cpp
modules/demux/dash/DASHManager.cpp
+11
-1
modules/demux/dash/SegmentTracker.cpp
modules/demux/dash/SegmentTracker.cpp
+8
-0
modules/demux/dash/SegmentTracker.hpp
modules/demux/dash/SegmentTracker.hpp
+1
-0
modules/demux/dash/Streams.cpp
modules/demux/dash/Streams.cpp
+5
-0
modules/demux/dash/Streams.hpp
modules/demux/dash/Streams.hpp
+1
-0
modules/demux/dash/mpd/MPD.cpp
modules/demux/dash/mpd/MPD.cpp
+5
-1
modules/demux/dash/mpd/MPD.h
modules/demux/dash/mpd/MPD.h
+1
-1
No files found.
modules/demux/dash/DASHManager.cpp
View file @
e5de71d0
...
...
@@ -223,10 +223,20 @@ bool DASHManager::updateMPD()
return
false
;
}
mtime_t
minsegmentTime
=
0
;
for
(
int
type
=
0
;
type
<
Streams
::
count
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
mtime_t
segmentTime
=
streams
[
type
]
->
getPosition
();
if
(
!
minsegmentTime
||
segmentTime
<
minsegmentTime
)
minsegmentTime
=
segmentTime
;
}
MPD
*
newmpd
=
MPDFactory
::
create
(
parser
.
getRootNode
(),
mpdstream
,
parser
.
getProfile
());
if
(
newmpd
)
{
mpd
->
mergeWith
(
newmpd
);
mpd
->
mergeWith
(
newmpd
,
minsegmentTime
);
delete
newmpd
;
}
stream_Delete
(
mpdstream
);
...
...
modules/demux/dash/SegmentTracker.cpp
View file @
e5de71d0
...
...
@@ -108,3 +108,11 @@ bool SegmentTracker::setPosition(mtime_t time, bool tryonly)
}
return
false
;
}
mtime_t
SegmentTracker
::
getSegmentStart
()
const
{
if
(
prevRepresentation
)
return
prevRepresentation
->
getPlaybackTimeBySegmentNumber
(
count
);
else
return
0
;
}
modules/demux/dash/SegmentTracker.hpp
View file @
e5de71d0
...
...
@@ -57,6 +57,7 @@ namespace dash
void
resetCounter
();
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getSegmentStart
()
const
;
private:
bool
initializing
;
...
...
modules/demux/dash/Streams.cpp
View file @
e5de71d0
...
...
@@ -223,6 +223,11 @@ bool Stream::setPosition(mtime_t time, bool tryonly)
return
ret
;
}
mtime_t
Stream
::
getPosition
()
const
{
return
segmentTracker
->
getSegmentStart
();
}
AbstractStreamOutput
::
AbstractStreamOutput
(
demux_t
*
demux
)
{
realdemux
=
demux
;
...
...
modules/demux/dash/Streams.hpp
View file @
e5de71d0
...
...
@@ -56,6 +56,7 @@ namespace dash
bool
seekAble
()
const
;
size_t
read
(
http
::
HTTPConnectionManager
*
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getPosition
()
const
;
private:
http
::
Chunk
*
getChunk
();
...
...
modules/demux/dash/mpd/MPD.cpp
View file @
e5de71d0
...
...
@@ -154,7 +154,7 @@ void MPD::getTimeLinesBoundaries(mtime_t *min, mtime_t *max) const
}
}
void
MPD
::
mergeWith
(
MPD
*
updatedMPD
)
void
MPD
::
mergeWith
(
MPD
*
updatedMPD
,
mtime_t
prunebarrier
)
{
availabilityEndTime
.
Set
(
updatedMPD
->
availabilityEndTime
.
Get
());
/* Only merge timelines for now */
...
...
@@ -166,6 +166,10 @@ void MPD::mergeWith(MPD *updatedMPD)
updatedMPD
->
periods
.
at
(
i
)
->
collectTimelines
(
&
timelinesUpdate
);
for
(
size_t
j
=
0
;
j
<
timelines
.
size
()
&&
j
<
timelinesUpdate
.
size
();
j
++
)
{
timelines
.
at
(
j
)
->
mergeWith
(
*
timelinesUpdate
.
at
(
j
));
if
(
prunebarrier
)
timelines
.
at
(
j
)
->
prune
(
prunebarrier
);
}
}
}
modules/demux/dash/mpd/MPD.h
View file @
e5de71d0
...
...
@@ -60,7 +60,7 @@ namespace dash
virtual
Period
*
getFirstPeriod
();
virtual
Period
*
getNextPeriod
(
Period
*
period
);
void
mergeWith
(
MPD
*
);
void
mergeWith
(
MPD
*
,
mtime_t
=
0
);
void
getTimeLinesBoundaries
(
mtime_t
*
,
mtime_t
*
)
const
;
Property
<
time_t
>
duration
;
...
...
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