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
d7ace43f
Commit
d7ace43f
authored
Jan 10, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: add MPD merging for updates
parent
ec5b75ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
modules/demux/dash/mpd/MPD.cpp
modules/demux/dash/mpd/MPD.cpp
+19
-2
modules/demux/dash/mpd/MPD.h
modules/demux/dash/mpd/MPD.h
+4
-2
No files found.
modules/demux/dash/mpd/MPD.cpp
View file @
d7ace43f
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "MPD.h"
#include "MPD.h"
#include "Helper.h"
#include "Helper.h"
#include "dash.hpp"
#include "dash.hpp"
#include "SegmentTimeline.h"
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_stream.h>
#include <vlc_stream.h>
...
@@ -59,7 +60,7 @@ MPD::~MPD ()
...
@@ -59,7 +60,7 @@ MPD::~MPD ()
delete
(
programInfo
.
Get
());
delete
(
programInfo
.
Get
());
}
}
const
std
::
vector
<
Period
*>&
MPD
::
getPeriods
()
const
const
std
::
vector
<
Period
*>&
MPD
::
getPeriods
()
{
{
return
this
->
periods
;
return
this
->
periods
;
}
}
...
@@ -110,7 +111,7 @@ vlc_object_t * MPD::getVLCObject() const
...
@@ -110,7 +111,7 @@ vlc_object_t * MPD::getVLCObject() const
return
VLC_OBJECT
(
stream
);
return
VLC_OBJECT
(
stream
);
}
}
Period
*
MPD
::
getFirstPeriod
()
const
Period
*
MPD
::
getFirstPeriod
()
{
{
std
::
vector
<
Period
*>
periods
=
getPeriods
();
std
::
vector
<
Period
*>
periods
=
getPeriods
();
...
@@ -132,3 +133,19 @@ Period* MPD::getNextPeriod(Period *period)
...
@@ -132,3 +133,19 @@ Period* MPD::getNextPeriod(Period *period)
return
NULL
;
return
NULL
;
}
}
void
MPD
::
mergeWith
(
MPD
*
updatedMPD
)
{
availabilityEndTime
.
Set
(
updatedMPD
->
availabilityEndTime
.
Get
());
/* Only merge timelines for now */
for
(
size_t
i
=
0
;
i
<
periods
.
size
()
&&
i
<
updatedMPD
->
periods
.
size
();
i
++
)
{
std
::
vector
<
SegmentTimeline
*>
timelines
;
std
::
vector
<
SegmentTimeline
*>
timelinesUpdate
;
periods
.
at
(
i
)
->
collectTimelines
(
&
timelines
);
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
));
}
}
modules/demux/dash/mpd/MPD.h
View file @
d7ace43f
...
@@ -56,10 +56,12 @@ namespace dash
...
@@ -56,10 +56,12 @@ namespace dash
virtual
Url
getUrlSegment
()
const
;
/* impl */
virtual
Url
getUrlSegment
()
const
;
/* impl */
vlc_object_t
*
getVLCObject
()
const
;
vlc_object_t
*
getVLCObject
()
const
;
virtual
const
std
::
vector
<
Period
*>&
getPeriods
()
const
;
virtual
const
std
::
vector
<
Period
*>&
getPeriods
();
virtual
Period
*
getFirstPeriod
()
const
;
virtual
Period
*
getFirstPeriod
();
virtual
Period
*
getNextPeriod
(
Period
*
period
);
virtual
Period
*
getNextPeriod
(
Period
*
period
);
void
mergeWith
(
MPD
*
);
Property
<
time_t
>
duration
;
Property
<
time_t
>
duration
;
Property
<
time_t
>
playbackStart
;
Property
<
time_t
>
playbackStart
;
Property
<
time_t
>
availabilityEndTime
;
Property
<
time_t
>
availabilityEndTime
;
...
...
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