[vlc-commits] demux: adaptive: s/flush/drain
Francois Cartegnie
git at videolan.org
Thu Jul 13 15:20:51 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 12 17:20:21 2017 +0200| [f3068ce6ba66449e49cf9cd010ece72e0d4f3d2e] | committer: Francois Cartegnie
demux: adaptive: s/flush/drain
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3068ce6ba66449e49cf9cd010ece72e0d4f3d2e
---
modules/demux/adaptive/Streams.cpp | 14 +++++++-------
modules/demux/adaptive/plumbing/CommandsQueue.cpp | 18 +++++++++---------
modules/demux/adaptive/plumbing/CommandsQueue.hpp | 6 +++---
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 00bf83bc63..bfa754c6c4 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -187,7 +187,7 @@ bool AbstractStream::seekAble() const
return (demuxer &&
!fakeesout->restarting() &&
!discontinuity &&
- !commandsqueue->isFlushing() );
+ !commandsqueue->isDraining() );
}
bool AbstractStream::isSelected() const
@@ -311,7 +311,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
return AbstractStream::buffering_end;
}
- if(commandsqueue->isFlushing())
+ if(commandsqueue->isDraining())
{
vlc_mutex_unlock(&lock);
return AbstractStream::buffering_suspended;
@@ -325,10 +325,10 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
/* If demux fails because of probing failure / wrong format*/
if(discontinuity)
{
- msg_Dbg( p_realdemux, "Flushing on format change" );
+ msg_Dbg( p_realdemux, "Draining on format change" );
prepareRestart();
discontinuity = false;
- commandsqueue->setFlush();
+ commandsqueue->setDraining();
vlc_mutex_unlock(&lock);
return AbstractStream::buffering_ongoing;
}
@@ -367,8 +367,8 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
prepareRestart(discontinuity);
if(discontinuity)
{
- msg_Dbg(p_realdemux, "Flushing on discontinuity");
- commandsqueue->setFlush();
+ msg_Dbg(p_realdemux, "Draining on discontinuity");
+ commandsqueue->setDraining();
discontinuity = false;
}
needrestart = false;
@@ -399,7 +399,7 @@ AbstractStream::status AbstractStream::dequeue(mtime_t nz_deadline, mtime_t *pi_
*pi_pcr = nz_deadline;
- if(commandsqueue->isFlushing())
+ if(commandsqueue->isDraining())
{
*pi_pcr = commandsqueue->Process(p_realdemux->out, VLC_TS_0 + nz_deadline);
if(!commandsqueue->isEmpty())
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
index 26ac9aa166..219d0052c5 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
@@ -228,7 +228,7 @@ CommandsQueue::CommandsQueue( CommandsFactory *f )
bufferinglevel = VLC_TS_INVALID;
pcr = VLC_TS_INVALID;
b_drop = false;
- b_flushing = false;
+ b_draining = false;
b_eof = false;
commandsFactory = f;
vlc_mutex_init(&lock);
@@ -300,8 +300,8 @@ mtime_t CommandsQueue::Process( es_out_t *out, mtime_t barrier )
}
pcr = lastdts;
- if(commands.empty() && b_flushing)
- b_flushing = false;
+ if(commands.empty() && b_draining)
+ b_draining = false;
vlc_mutex_unlock(&lock);
@@ -336,7 +336,7 @@ void CommandsQueue::Abort( bool b_reset )
{
bufferinglevel = VLC_TS_INVALID;
pcr = VLC_TS_INVALID;
- b_flushing = false;
+ b_draining = false;
b_eof = false;
}
vlc_mutex_unlock(&lock);
@@ -357,18 +357,18 @@ void CommandsQueue::setDrop( bool b )
vlc_mutex_unlock(&lock);
}
-void CommandsQueue::setFlush()
+void CommandsQueue::setDraining()
{
vlc_mutex_lock(&lock);
LockedCommit();
- b_flushing = !commands.empty();
+ b_draining = !commands.empty();
vlc_mutex_unlock(&lock);
}
-bool CommandsQueue::isFlushing() const
+bool CommandsQueue::isDraining() const
{
vlc_mutex_lock(const_cast<vlc_mutex_t *>(&lock));
- bool b = b_flushing;
+ bool b = b_draining;
vlc_mutex_unlock(const_cast<vlc_mutex_t *>(&lock));
return b;
}
@@ -378,7 +378,7 @@ void CommandsQueue::setEOF()
vlc_mutex_lock(&lock);
b_eof = true;
LockedCommit();
- b_flushing = !commands.empty();
+ b_draining = !commands.empty();
vlc_mutex_unlock(&lock);
}
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.hpp b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
index f1b781140f..a1a68a344d 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.hpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
@@ -159,9 +159,9 @@ namespace adaptive
void Commit();
bool isEmpty() const;
void setDrop( bool );
- void setFlush();
+ void setDraining();
void setEOF();
- bool isFlushing() const;
+ bool isDraining() const;
bool isEOF() const;
mtime_t getDemuxedAmount() const;
mtime_t getBufferingLevel() const;
@@ -176,7 +176,7 @@ namespace adaptive
std::list<AbstractCommand *> commands;
mtime_t bufferinglevel;
mtime_t pcr;
- bool b_flushing;
+ bool b_draining;
bool b_drop;
bool b_eof;
};
More information about the vlc-commits
mailing list