repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: give priority to messages from the TV. removed the global lock in CCECProcessor...
[deb_libcec.git]
/
src
/
lib
/
CECProcessor.cpp
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 378b221910dff99e0430d21e7f711271386bb6cf..96b5c7349db3a7253250d172f0fc87970ed638c0 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-456,23
+456,27
@@
void CCECProcessor::ReplaceHandlers(void)
bool CCECProcessor::OnCommandReceived(const cec_command &command)
{
bool CCECProcessor::OnCommandReceived(const cec_command &command)
{
- ParseCommand(command);
- return true;
+ return m_inBuffer.Push(command);
}
void *CCECProcessor::Process(void)
{
CLibCEC::AddLog(CEC_LOG_DEBUG, "processor thread started");
}
void *CCECProcessor::Process(void)
{
CLibCEC::AddLog(CEC_LOG_DEBUG, "processor thread started");
+ cec_command command;
+ command.Clear();
+
while (!IsStopped() && m_communication->IsOpen())
{
while (!IsStopped() && m_communication->IsOpen())
{
+ if (m_inBuffer.Pop(command, 500))
+ ParseCommand(command);
+
if (IsInitialised())
{
ReplaceHandlers();
m_controller->CheckKeypressTimeout();
}
if (IsInitialised())
{
ReplaceHandlers();
m_controller->CheckKeypressTimeout();
}
- Sleep(5);
}
return NULL;
}
return NULL;