DATV: DATVDemodSink: rationalize playVideo method

This commit is contained in:
f4exb 2021-03-22 19:47:47 +01:00
parent 252316f99e
commit 6810990c99
5 changed files with 6 additions and 21 deletions

View File

@ -80,7 +80,7 @@ public:
bool videoActive() { return m_basebandSink->videoActive(); }
bool videoDecodeOK() { return m_basebandSink->videoDecodeOK(); }
bool PlayVideo(bool blnStartStop) { return m_basebandSink->PlayVideo(blnStartStop); }
bool playVideo() { return m_basebandSink->playVideo(); }
double getMagSq() const { return m_basebandSink->getMagSq(); } //!< Beware this is scaled to 2^30
int getModcodModulation() const { return m_basebandSink->getModcodModulation(); }

View File

@ -97,7 +97,7 @@ public:
bool audioDecodeOK() { return m_sink.audioDecodeOK(); }
bool videoActive() { return m_sink.videoActive(); }
bool videoDecodeOK() { return m_sink.videoDecodeOK(); }
bool PlayVideo(bool blnStartStop) { return m_sink.PlayVideo(blnStartStop); }
bool playVideo() { return m_sink.playVideo(); }
int getModcodModulation() const { return m_sink.getModcodModulation(); }
int getModcodCodeRate() const { return m_sink.getModcodCodeRate(); }

View File

@ -546,7 +546,7 @@ void DATVDemodGUI::tick()
m_intPreviousDecodedData = m_intLastDecodedData;
//Try to start video rendering
m_objDATVDemod->PlayVideo(false);
m_objDATVDemod->playVideo();
return;
}

View File

@ -44,7 +44,6 @@ DATVDemodSink::DATVDemodSink() :
m_cnrMeter(nullptr),
m_audioFifo(48000),
m_blnRenderingVideo(false),
m_blnStartStopVideo(false),
m_cstlnSetByModcod(false),
m_modcodModulation(-1),
m_modcodCodeRate(-1),
@ -152,7 +151,7 @@ bool DATVDemodSink::videoDecodeOK()
}
}
bool DATVDemodSink::PlayVideo(bool blnStartStop)
bool DATVDemodSink::playVideo()
{
if (m_objVideoStream == nullptr) {
return false;
@ -166,20 +165,7 @@ bool DATVDemodSink::PlayVideo(bool blnStartStop)
return false;
}
if (m_blnStartStopVideo && !blnStartStop) {
return true;
}
if (blnStartStop == true) {
m_blnStartStopVideo = true;
}
if (m_objRenderThread->isRunning())
{
if (blnStartStop == true) {
m_objRenderThread->stopRendering();
}
if (m_objRenderThread->isRunning()) {
return true;
}

View File

@ -69,7 +69,7 @@ public:
bool videoActive();
bool videoDecodeOK();
bool PlayVideo(bool blnStartStop);
bool playVideo();
int GetSampleRate();
double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30
@ -302,7 +302,6 @@ private:
bool m_blnInitialized;
bool m_blnRenderingVideo;
bool m_blnStartStopVideo;
bool m_cstlnSetByModcod;
int m_modcodModulation;
int m_modcodCodeRate;