mirror of https://github.com/f4exb/sdrangel.git
DATV: DATVDemodSink: rationalize playVideo method
This commit is contained in:
parent
252316f99e
commit
6810990c99
|
@ -80,7 +80,7 @@ public:
|
||||||
bool videoActive() { return m_basebandSink->videoActive(); }
|
bool videoActive() { return m_basebandSink->videoActive(); }
|
||||||
bool videoDecodeOK() { return m_basebandSink->videoDecodeOK(); }
|
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
|
double getMagSq() const { return m_basebandSink->getMagSq(); } //!< Beware this is scaled to 2^30
|
||||||
int getModcodModulation() const { return m_basebandSink->getModcodModulation(); }
|
int getModcodModulation() const { return m_basebandSink->getModcodModulation(); }
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
bool audioDecodeOK() { return m_sink.audioDecodeOK(); }
|
bool audioDecodeOK() { return m_sink.audioDecodeOK(); }
|
||||||
bool videoActive() { return m_sink.videoActive(); }
|
bool videoActive() { return m_sink.videoActive(); }
|
||||||
bool videoDecodeOK() { return m_sink.videoDecodeOK(); }
|
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 getModcodModulation() const { return m_sink.getModcodModulation(); }
|
||||||
int getModcodCodeRate() const { return m_sink.getModcodCodeRate(); }
|
int getModcodCodeRate() const { return m_sink.getModcodCodeRate(); }
|
||||||
|
|
|
@ -546,7 +546,7 @@ void DATVDemodGUI::tick()
|
||||||
m_intPreviousDecodedData = m_intLastDecodedData;
|
m_intPreviousDecodedData = m_intLastDecodedData;
|
||||||
|
|
||||||
//Try to start video rendering
|
//Try to start video rendering
|
||||||
m_objDATVDemod->PlayVideo(false);
|
m_objDATVDemod->playVideo();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ DATVDemodSink::DATVDemodSink() :
|
||||||
m_cnrMeter(nullptr),
|
m_cnrMeter(nullptr),
|
||||||
m_audioFifo(48000),
|
m_audioFifo(48000),
|
||||||
m_blnRenderingVideo(false),
|
m_blnRenderingVideo(false),
|
||||||
m_blnStartStopVideo(false),
|
|
||||||
m_cstlnSetByModcod(false),
|
m_cstlnSetByModcod(false),
|
||||||
m_modcodModulation(-1),
|
m_modcodModulation(-1),
|
||||||
m_modcodCodeRate(-1),
|
m_modcodCodeRate(-1),
|
||||||
|
@ -152,7 +151,7 @@ bool DATVDemodSink::videoDecodeOK()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DATVDemodSink::PlayVideo(bool blnStartStop)
|
bool DATVDemodSink::playVideo()
|
||||||
{
|
{
|
||||||
if (m_objVideoStream == nullptr) {
|
if (m_objVideoStream == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -166,20 +165,7 @@ bool DATVDemodSink::PlayVideo(bool blnStartStop)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_blnStartStopVideo && !blnStartStop) {
|
if (m_objRenderThread->isRunning()) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (blnStartStop == true) {
|
|
||||||
m_blnStartStopVideo = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_objRenderThread->isRunning())
|
|
||||||
{
|
|
||||||
if (blnStartStop == true) {
|
|
||||||
m_objRenderThread->stopRendering();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
bool videoActive();
|
bool videoActive();
|
||||||
bool videoDecodeOK();
|
bool videoDecodeOK();
|
||||||
|
|
||||||
bool PlayVideo(bool blnStartStop);
|
bool playVideo();
|
||||||
|
|
||||||
int GetSampleRate();
|
int GetSampleRate();
|
||||||
double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30
|
double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30
|
||||||
|
@ -302,7 +302,6 @@ private:
|
||||||
|
|
||||||
bool m_blnInitialized;
|
bool m_blnInitialized;
|
||||||
bool m_blnRenderingVideo;
|
bool m_blnRenderingVideo;
|
||||||
bool m_blnStartStopVideo;
|
|
||||||
bool m_cstlnSetByModcod;
|
bool m_cstlnSetByModcod;
|
||||||
int m_modcodModulation;
|
int m_modcodModulation;
|
||||||
int m_modcodCodeRate;
|
int m_modcodCodeRate;
|
||||||
|
|
Loading…
Reference in New Issue