repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11bd2bd
)
cec-client: fixed - wait for the source switch to finish when cec-client is called...
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:13:22 +0000
(14:13 +0200)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:13:22 +0000
(14:13 +0200)
src/testclient/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index d170bfa44a791be7606384ef6f2bc8cbfb7d5c8b..986884ee9276188a0a5ba273da4bf7d30ea33aa1 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-537,6
+537,18
@@
bool ProcessCommandAS(ICECAdapter *parser, const string &command, string & UNUSE
if (command == "as")
{
parser->SetActiveSource();
+ // wait for the source switch to finish for 15 seconds tops
+ if (g_bSingleCommand)
+ {
+ CTimeout timeout(15000);
+ bool bActiveSource(false);
+ while (timeout.TimeLeft() > 0 && !bActiveSource)
+ {
+ bActiveSource = parser->IsLibCECActiveSource();
+ if (!bActiveSource)
+ CEvent::Sleep(100);
+ }
+ }
return true;
}