Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
77c4f92c
Commit
77c4f92c
authored
Jun 08, 2015
by
François Cartegnie
🤞
Browse files
demux: adaptative: change durations from time to microtime
parent
38664b80
Changes
5
Hide whitespace changes
Inline
Side-by-side
modules/demux/adaptative/PlaylistManager.cpp
View file @
77c4f92c
...
...
@@ -184,7 +184,7 @@ mtime_t PlaylistManager::getDuration() const
if
(
playlist
->
isLive
())
return
0
;
else
return
CLOCK_FREQ
*
playlist
->
duration
.
Get
();
return
playlist
->
duration
.
Get
();
}
bool
PlaylistManager
::
setPosition
(
mtime_t
time
)
...
...
modules/demux/adaptative/playlist/AbstractPlaylist.hpp
View file @
77c4f92c
...
...
@@ -58,12 +58,12 @@ namespace adaptative
void
getTimeLinesBoundaries
(
mtime_t
*
,
mtime_t
*
)
const
;
void
getPlaylistDurationsRange
(
mtime_t
*
,
mtime_t
*
)
const
;
Property
<
time_t
>
duration
;
Property
<
m
time_t
>
duration
;
Property
<
time_t
>
playbackStart
;
Property
<
time_t
>
availabilityEndTime
;
Property
<
time_t
>
availabilityStartTime
;
Property
<
time_t
>
minUpdatePeriod
;
Property
<
time_t
>
maxSegmentDuration
;
Property
<
m
time_t
>
maxSegmentDuration
;
Property
<
time_t
>
minBufferTime
;
Property
<
time_t
>
timeShiftBufferDepth
;
...
...
modules/demux/dash/DASHManager.cpp
View file @
77c4f92c
...
...
@@ -117,15 +117,15 @@ bool DASHManager::updatePlaylist()
mtime_t
maxinterval
=
0
;
playlist
->
getTimeLinesBoundaries
(
&
mininterval
,
&
maxinterval
);
if
(
maxinterval
>
mininterval
)
maxinterval
=
(
maxinterval
-
mininterval
)
/
CLOCK_FREQ
;
maxinterval
=
(
maxinterval
-
mininterval
);
else
maxinterval
=
60
;
maxinterval
=
std
::
max
(
maxinterval
,
(
mtime_t
)
60
);
maxinterval
=
60
*
CLOCK_FREQ
;
maxinterval
=
std
::
max
(
maxinterval
,
(
mtime_t
)
60
*
CLOCK_FREQ
);
mininterval
=
std
::
max
(
playlist
->
minUpdatePeriod
.
Get
(),
mininterval
=
std
::
max
(
playlist
->
minUpdatePeriod
.
Get
()
*
CLOCK_FREQ
,
playlist
->
maxSegmentDuration
.
Get
());
nextPlaylistupdate
=
now
+
(
maxinterval
-
mininterval
)
/
2
;
nextPlaylistupdate
=
now
+
(
maxinterval
-
mininterval
)
/
(
2
*
CLOCK_FREQ
)
;
msg_Dbg
(
stream
,
"Updated MPD, next update in %"
PRId64
"s (%"
PRId64
"..%"
PRId64
")"
,
nextPlaylistupdate
-
now
,
mininterval
,
maxinterval
);
...
...
modules/demux/dash/mpd/IsoffMainParser.cpp
View file @
77c4f92c
...
...
@@ -93,7 +93,7 @@ void IsoffMainParser::setMPDAttributes ()
it
=
attr
.
find
(
"mediaPresentationDuration"
);
if
(
it
!=
attr
.
end
())
this
->
mpd
->
duration
.
Set
(
IsoTime
(
it
->
second
));
this
->
mpd
->
duration
.
Set
(
IsoTime
(
it
->
second
)
*
CLOCK_FREQ
);
it
=
attr
.
find
(
"minBufferTime"
);
if
(
it
!=
attr
.
end
())
...
...
@@ -109,7 +109,7 @@ void IsoffMainParser::setMPDAttributes ()
it
=
attr
.
find
(
"maxSegmentDuration"
);
if
(
it
!=
attr
.
end
())
mpd
->
maxSegmentDuration
.
Set
(
IsoTime
(
it
->
second
));
mpd
->
maxSegmentDuration
.
Set
(
IsoTime
(
it
->
second
)
*
CLOCK_FREQ
);
it
=
attr
.
find
(
"type"
);
if
(
it
!=
attr
.
end
())
...
...
modules/demux/dash/mpd/MPD.cpp
View file @
77c4f92c
...
...
@@ -66,7 +66,7 @@ void MPD::debug()
{
msg_Dbg
(
stream
,
"MPD profile=%s mediaPresentationDuration=%ld minBufferTime=%ld"
,
static_cast
<
std
::
string
>
(
getProfile
()).
c_str
(),
duration
.
Get
(),
duration
.
Get
()
/
CLOCK_FREQ
,
minBufferTime
.
Get
());
msg_Dbg
(
stream
,
"BaseUrl=%s"
,
getUrlSegment
().
toString
().
c_str
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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