[vlc-commits] demux: adaptive: use microsecond for availability times

Francois Cartegnie git at videolan.org
Thu Apr 2 14:31:24 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr  2 09:21:07 2020 +0200| [ecc878bf87681a24f9e3a1db89971b9ffcaeb1ff] | committer: Francois Cartegnie

demux: adaptive: use microsecond for availability times

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecc878bf87681a24f9e3a1db89971b9ffcaeb1ff
---

 modules/demux/adaptive/playlist/AbstractPlaylist.hpp | 4 ++--
 modules/demux/adaptive/playlist/SegmentTemplate.cpp  | 2 +-
 modules/demux/dash/mpd/IsoffMainParser.cpp           | 6 +++++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/demux/adaptive/playlist/AbstractPlaylist.hpp b/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
index a7eb0fda22..3d0e3cf66d 100644
--- a/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
+++ b/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
@@ -69,8 +69,8 @@ namespace adaptive
 
                 Property<vlc_tick_t>                   duration;
                 Property<time_t>                    playbackStart;
-                Property<time_t>                    availabilityEndTime;
-                Property<time_t>                    availabilityStartTime;
+                Property<vlc_tick_t>                   availabilityEndTime;
+                Property<vlc_tick_t>                   availabilityStartTime;
                 Property<vlc_tick_t>                   minUpdatePeriod;
                 Property<vlc_tick_t>                   maxSegmentDuration;
                 Property<vlc_tick_t>                   timeShiftBufferDepth;
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
index b024936763..0760fb5e7b 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -161,7 +161,7 @@ uint64_t MediaSegmentTemplate::getLiveTemplateNumber(vlc_tick_t playbacktime, bo
         if(abs)
         {
             vlc_tick_t streamstart =
-                    vlc_tick_from_sec(parentSegmentInformation->getPlaylist()->availabilityStartTime.Get());
+                    parentSegmentInformation->getPlaylist()->availabilityStartTime.Get();
             streamstart += parentSegmentInformation->getPeriodStart();
             playbacktime -= streamstart;
         }
diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index 3a09354c84..3e8eee2049 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -139,7 +139,11 @@ void    IsoffMainParser::parseMPDAttributes   (MPD *mpd, xml::Node *node)
 
     it = attr.find("availabilityStartTime");
     if(it != attr.end())
-        mpd->availabilityStartTime.Set(UTCTime(it->second).time());
+        mpd->availabilityStartTime.Set(UTCTime(it->second).mtime());
+
+    it = attr.find("availabilityEndTime");
+    if(it != attr.end())
+        mpd->availabilityEndTime.Set(UTCTime(it->second).mtime());
 
     it = attr.find("timeShiftBufferDepth");
         if(it != attr.end())



More information about the vlc-commits mailing list