[vlc-commits] [Git][videolan/vlc][master] 3 commits: demux: adaptive: early fail on unsupported format
Jean-Baptiste Kempf
gitlab at videolan.org
Wed May 19 09:56:22 UTC 2021
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
590b7bb1 by Francois Cartegnie at 2021-05-19T08:34:46+00:00
demux: adaptive: early fail on unsupported format
- - - - -
a8d947e5 by Francois Cartegnie at 2021-05-19T08:34:46+00:00
demux: adaptive: add missing TS_0 in Chunkentry
- - - - -
e97d492a by Francois Cartegnie at 2021-05-19T08:34:46+00:00
demux: adaptive: remove unused code
- - - - -
5 changed files:
- modules/demux/adaptive/PlaylistManager.cpp
- modules/demux/adaptive/PlaylistManager.h
- modules/demux/adaptive/SegmentTracker.cpp
- modules/demux/hls/HLSManager.cpp
- modules/demux/hls/HLSManager.hpp
Changes:
=====================================
modules/demux/adaptive/PlaylistManager.cpp
=====================================
@@ -393,11 +393,6 @@ bool PlaylistManager::updatePlaylist()
return true;
}
-vlc_tick_t PlaylistManager::getFirstPlaybackTime() const
-{
- return 0;
-}
-
vlc_tick_t PlaylistManager::getCurrentDemuxTime() const
{
vlc_mutex_locker locker(&demux.lock);
@@ -625,7 +620,7 @@ int PlaylistManager::doControl(int i_query, va_list args)
{
setBufferingRunState(false); /* stop downloader first */
- vlc_tick_t time = va_arg(args, vlc_tick_t);// + getFirstPlaybackTime();
+ vlc_tick_t time = va_arg(args, vlc_tick_t);
if(!setPosition(time))
{
setBufferingRunState(true);
=====================================
modules/demux/adaptive/PlaylistManager.h
=====================================
@@ -82,7 +82,6 @@ namespace adaptive
vlc_tick_t getFirstDTS() const;
unsigned getActiveStreamsCount() const;
- virtual vlc_tick_t getFirstPlaybackTime() const;
vlc_tick_t getCurrentDemuxTime() const;
vlc_tick_t getMinAheadTime() const;
=====================================
modules/demux/adaptive/SegmentTracker.cpp
=====================================
@@ -316,7 +316,7 @@ SegmentTracker::prepareChunk(bool switch_allowed, Position pos,
return ChunkEntry();
const Timescale timescale = pos.rep->inheritTimescale();
- return ChunkEntry(segmentChunk, pos, timescale.ToTime(segment->startTime.Get()),
+ return ChunkEntry(segmentChunk, pos, VLC_TICK_0 + timescale.ToTime(segment->startTime.Get()),
timescale.ToTime(segment->duration.Get()), segment->getDisplayTime());
}
@@ -363,6 +363,9 @@ ChunkInterface * SegmentTracker::getNextChunk(bool switch_allowed,
/* advance or don't trigger duplicate events */
next = current = chunk.pos;
+ if(format == StreamFormat(StreamFormat::UNSUPPORTED))
+ return nullptr; /* Can't return chunk because no demux will be created */
+
/* From this point chunk must be returned */
ChunkInterface *returnedChunk;
StreamFormat chunkformat = chunk.chunk->getStreamFormat();
=====================================
modules/demux/hls/HLSManager.cpp
=====================================
@@ -103,8 +103,3 @@ bool HLSManager::isHTTPLiveStreaming(stream_t *s)
return false;
}
-
-vlc_tick_t HLSManager::getFirstPlaybackTime() const
-{
- return demux.i_firstpcr;
-}
=====================================
modules/demux/hls/HLSManager.hpp
=====================================
@@ -38,9 +38,6 @@ namespace hls
logic::AbstractAdaptationLogic::LogicType type );
virtual ~HLSManager();
static bool isHTTPLiveStreaming(stream_t *);
-
- protected:
- virtual vlc_tick_t getFirstPlaybackTime() const;
};
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/077d5489adfe1288f33e564a420892f9686d40b5...e97d492a8c886ad8a91da419daef088a5ff274fd
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/077d5489adfe1288f33e564a420892f9686d40b5...e97d492a8c886ad8a91da419daef088a5ff274fd
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list