repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: don't respond with a feature abort to opcode play messages. bugzid: 873
[deb_libcec.git]
/
src
/
testclient
/
main.cpp
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 39b7ff47df5ca8e761aa3235adc7feffc9db02e9..57f61974c725d9e7e54e461fbe5e83b146e03b57 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-249,6
+249,7
@@
void ShowHelpCommandLine(const char* strExec)
" -s --single-command Execute a single command and exit. Does not power" << endl <<
" on devices on startup and power them off on exit." << endl <<
" -o --osd-name {osd name} Use a custom osd name." << endl <<
" -s --single-command Execute a single command and exit. Does not power" << endl <<
" on devices on startup and power them off on exit." << endl <<
" -o --osd-name {osd name} Use a custom osd name." << endl <<
+ " -m --monitor Start a monitor-only client." << endl <<
" [COM PORT] The com port to connect to. If no COM" << endl <<
" port is given, the client tries to connect to the" << endl <<
" first device that is detected." << endl <<
" [COM PORT] The com port to connect to. If no COM" << endl <<
" port is given, the client tries to connect to the" << endl <<
" first device that is detected." << endl <<
@@
-773,14
+774,19
@@
bool ProcessCommandR(ICECAdapter *parser, const string &command, string & UNUSED
{
if (command == "r")
{
{
if (command == "r")
{
+ bool bReactivate = parser->IsLibCECActiveSource();
+
PrintToStdOut("closing the connection");
parser->Close();
PrintToStdOut("opening a new connection");
parser->Open(g_strPort.c_str());
PrintToStdOut("closing the connection");
parser->Close();
PrintToStdOut("opening a new connection");
parser->Open(g_strPort.c_str());
- PrintToStdOut("setting active source");
- parser->SetActiveSource();
+ if (bReactivate)
+ {
+ PrintToStdOut("setting active source");
+ parser->SetActiveSource();
+ }
return true;
}
return true;
}
@@
-1072,6
+1078,13
@@
bool ProcessCommandLineArguments(int argc, char *argv[])
}
++iArgPtr;
}
}
++iArgPtr;
}
+ else if (!strcmp(argv[iArgPtr], "-m") ||
+ !strcmp(argv[iArgPtr], "--monitor"))
+ {
+ cout << "starting a monitor-only client. use 'mon 0' to switch to normal mode" << endl;
+ g_config.bMonitorOnly = 1;
+ ++iArgPtr;
+ }
else
{
g_strPort = argv[iArgPtr++];
else
{
g_strPort = argv[iArgPtr++];
@@
-1086,7
+1099,7
@@
int main (int argc, char *argv[])
{
g_config.Clear();
snprintf(g_config.strDeviceName, 13, "CECTester");
{
g_config.Clear();
snprintf(g_config.strDeviceName, 13, "CECTester");
- g_config.clientVersion = CEC_CLIENT_VERSION_1_6_
2
;
+ g_config.clientVersion = CEC_CLIENT_VERSION_1_6_
3
;
g_config.bActivateSource = 0;
g_callbacks.CBCecLogMessage = &CecLogMessage;
g_callbacks.CBCecKeyPress = &CecKeyPress;
g_config.bActivateSource = 0;
g_callbacks.CBCecLogMessage = &CecLogMessage;
g_callbacks.CBCecKeyPress = &CecKeyPress;