diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp index 865514d94dc5214df2da160c8fc3d5a59930b399..c7f6880d14ecd5e2e1ee95c2f2f274ebd014f0bc 100644 --- a/modules/demux/adaptive/PlaylistManager.cpp +++ b/modules/demux/adaptive/PlaylistManager.cpp @@ -158,6 +158,8 @@ bool PlaylistManager::init(bool b_preparsing) playlist->playbackStart.Set(time(nullptr)); nextPlaylistupdate = playlist->playbackStart.Get(); + if(b_preparsing) + preparsePlaylist(); updateControlsPosition(); return true; @@ -413,6 +415,11 @@ bool PlaylistManager::updatePlaylist() return true; } +void PlaylistManager::preparsePlaylist() +{ + +} + Times PlaylistManager::getTimes(bool b_first) const { vlc_mutex_locker locker(&demux.lock); diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h index e70ec668b9c60e11c33e670cdcefd2081ab5aa1b..23a9879b9599f43ecf1ad733f6fc3a0845fd6022 100644 --- a/modules/demux/adaptive/PlaylistManager.h +++ b/modules/demux/adaptive/PlaylistManager.h @@ -68,6 +68,7 @@ namespace adaptive virtual bool needsUpdate() const; virtual bool updatePlaylist(); virtual void scheduleNextUpdate(); + virtual void preparsePlaylist(); /* static callbacks */ static int control_callback(demux_t *, int, va_list); @@ -107,6 +108,7 @@ namespace adaptive demux_t *p_demux; std::vector<AbstractStream *> streams; BasePeriod *currentPeriod; + bool b_preparsing; enum class TimestampSynchronizationPoint { @@ -154,7 +156,6 @@ namespace adaptive bool b_buffering; bool b_canceled; vlc_tick_t pause_start; - bool b_preparsing; }; } diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp index 4f61e40a3dc8efa806bdcbe1dc6fe5c408498e20..2ab7da625b45f1d3e9be8ccadab9f8fb13f43365 100644 --- a/modules/demux/adaptive/Streams.cpp +++ b/modules/demux/adaptive/Streams.cpp @@ -724,7 +724,7 @@ bool AbstractStream::getMediaAdvanceAmount(vlc_tick_t *duration) const return true; } -bool AbstractStream::runUpdates() +bool AbstractStream::runUpdates(bool b_preparsing) { if(!valid) return false; diff --git a/modules/demux/adaptive/Streams.hpp b/modules/demux/adaptive/Streams.hpp index 027653c6d7564528f7374060f4a87d826da92683..f9ee7837c05570501370599d72f71f8558ab5563 100644 --- a/modules/demux/adaptive/Streams.hpp +++ b/modules/demux/adaptive/Streams.hpp @@ -101,7 +101,7 @@ namespace adaptive virtual bool setPosition(const StreamPosition &, bool); bool getMediaPlaybackTimes(vlc_tick_t *, vlc_tick_t *, vlc_tick_t *) const; bool getMediaAdvanceAmount(vlc_tick_t *) const; - bool runUpdates(); + bool runUpdates(bool = false); /* Used by demuxers fake streams */ virtual block_t *readNextBlock() override;