Commit 82f01112 authored by Jussi Lindgren's avatar Jussi Lindgren

Merge branch 'fix-crio-cue-image-warn' of gitlab.inria.fr:openvibe/extras into...

Merge branch 'fix-crio-cue-image-warn' of gitlab.inria.fr:openvibe/extras into wip-all-openvibe20-base

+ Changed Display Cue Image and Keyboard Stimulator to always send a
stimulation stream header in the beginning
parents f7064e6e e08d04b2
......@@ -60,7 +60,7 @@ namespace OpenViBEPlugins
m_int32DrawnImageID(-1),
m_bFullScreen(false),
m_bScaleImages(false),
m_ui64LastOutputChunkDate(-1),
m_ui64LastOutputChunkDate(0),
m_pStimulusSender(nullptr),
m_visualizationContext(nullptr)
{
......@@ -254,6 +254,13 @@ namespace OpenViBEPlugins
IBoxIO* l_pBoxIO=getBoxAlgorithmContext()->getDynamicBoxContext();
m_oStimulationEncoder.getInputStimulationSet()->clear();
if (this->getPlayerContext().getCurrentTime() == 0)
{
// Always send header first
m_oStimulationEncoder.encodeHeader();
l_pBoxIO->markOutputAsReadyToSend(0, 0, 0);
}
if(m_bImageDrawn)
{
// this is first redraw() for that image or clear screen
......@@ -402,9 +409,7 @@ namespace OpenViBEPlugins
m_oStimulationDecoder.decode(chunk,true);
if(m_oStimulationDecoder.isHeaderReceived())
{
m_ui64LastOutputChunkDate = this->getPlayerContext().getCurrentTime();
m_oStimulationEncoder.encodeHeader();
l_pBoxIO->markOutputAsReadyToSend(0, 0, m_ui64LastOutputChunkDate);
// nop
}
if(m_oStimulationDecoder.isBufferReceived())
{
......
......@@ -172,10 +172,6 @@ namespace OpenViBEPlugins
m_visualizationContext = dynamic_cast<OpenViBEVisualizationToolkit::IVisualizationContext*>(this->createPluginObject(OVP_ClassId_Plugin_VisualizationContext));
m_visualizationContext->setWidget(*this, m_pWidget);
m_oEncoder.encodeHeader();
getBoxAlgorithmContext()->getDynamicBoxContext()->markOutputAsReadyToSend(0, 0, 0);
return true;
}
......@@ -195,7 +191,7 @@ namespace OpenViBEPlugins
boolean CKeyboardStimulator::processClock(CMessageClock &rMessageClock)
{
if(m_bError)
if (m_bError)
{
return false;
}
......@@ -206,7 +202,13 @@ namespace OpenViBEPlugins
m_bUnknownKeyPressed = false;
}
const uint64 l_ui64CurrentTime=rMessageClock.getTime();
const uint64 l_ui64CurrentTime = rMessageClock.getTime();
if (l_ui64CurrentTime == 0)
{
m_oEncoder.encodeHeader();
getBoxAlgorithmContext()->getDynamicBoxContext()->markOutputAsReadyToSend(0, 0, 0);
}
if(l_ui64CurrentTime!=m_ui64PreviousActivationTime)
{
......
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