Commit 9569a528 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: smooth: refresh playlist on stream reactivation

Since smooth adds new segments from segments data,
we need to resync for unselected streams.
parent 1b740048
......@@ -68,7 +68,7 @@ namespace adaptative
int esCount() const;
bool seekAble() const;
bool isSelected() const;
bool reactivate(mtime_t);
virtual bool reactivate(mtime_t);
bool isDisabled() const;
typedef enum {status_eof, status_eop, status_dis, status_buffering, status_demuxed} status;
status demux(mtime_t, bool);
......
......@@ -88,6 +88,11 @@ Manifest * SmoothManager::fetchManifest()
}
bool SmoothManager::updatePlaylist()
{
return updatePlaylist(false);
}
bool SmoothManager::updatePlaylist(bool forcemanifest)
{
/* FIXME: do update from manifest after resuming from pause */
if(!playlist->isLive() || !playlist->minUpdatePeriod.Get())
......@@ -107,8 +112,8 @@ bool SmoothManager::updatePlaylist()
/* Timelines updates should be inlined in tfrf atoms.
We'll just care about pruning live timeline then. */
#if 0
if(nextPlaylistupdate)
if(forcemanifest && nextPlaylistupdate)
{
Manifest *newManifest = fetchManifest();
if(newManifest)
......@@ -125,7 +130,6 @@ bool SmoothManager::updatePlaylist()
#endif
}
}
#endif
/* Compute new Manifest update time */
if(!mininterval && !maxinterval)
......@@ -148,6 +152,13 @@ bool SmoothManager::updatePlaylist()
return true;
}
bool SmoothManager::reactivateStream(AbstractStream *stream)
{
if(playlist->isLive())
updatePlaylist(true);
return PlaylistManager::reactivateStream(stream);
}
bool SmoothManager::isSmoothStreaming(xml::Node *root)
{
return root->getName() == "SmoothStreamingMedia";
......
......@@ -48,7 +48,11 @@ namespace smooth
static bool isSmoothStreaming(xml::Node *);
static bool mimeMatched(const std::string &);
protected:
virtual bool reactivateStream(AbstractStream *); /* reimpl */
private:
bool updatePlaylist(bool);
playlist::Manifest * fetchManifest();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment