mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
update:VideoBuffer stop重命名为interrupt
This commit is contained in:
parent
83fbdb5c23
commit
667b09259c
3 changed files with 6 additions and 6 deletions
|
@ -235,7 +235,7 @@ void Decoder::stopDecode()
|
|||
{
|
||||
m_quit = true;
|
||||
if (m_vb) {
|
||||
m_vb->stop();
|
||||
m_vb->interrupt();
|
||||
}
|
||||
wait();
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ bool VideoBuffer::offerDecodedFrame()
|
|||
#ifndef SKIP_FRAMES
|
||||
// if SKIP_FRAMES is disabled, then the decoder must wait for the current
|
||||
// frame to be consumed
|
||||
while (!m_renderingFrameConsumed && !m_stopped) {
|
||||
while (!m_renderingFrameConsumed && !m_interrupted) {
|
||||
m_renderingFrameConsumedCond.wait(&m_mutex);
|
||||
}
|
||||
#else
|
||||
|
@ -105,11 +105,11 @@ const AVFrame *VideoBuffer::consumeRenderedFrame()
|
|||
return m_renderingframe;
|
||||
}
|
||||
|
||||
void VideoBuffer::stop()
|
||||
void VideoBuffer::interrupt()
|
||||
{
|
||||
#ifndef SKIP_FRAMES
|
||||
m_mutex.lock();
|
||||
m_stopped = true;
|
||||
m_interrupted = true;
|
||||
m_mutex.unlock();
|
||||
// wake up blocking wait
|
||||
m_renderingFrameConsumedCond.wakeOne();
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
const AVFrame* consumeRenderedFrame();
|
||||
|
||||
// wake up and avoid any blocking call
|
||||
void stop();
|
||||
void interrupt();
|
||||
|
||||
private:
|
||||
void swap();
|
||||
|
@ -47,7 +47,7 @@ private:
|
|||
|
||||
#ifndef SKIP_FRAMES
|
||||
QWaitCondition m_renderingFrameConsumedCond;
|
||||
bool m_stopped = true;
|
||||
bool m_interrupted = true;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue