From: Lars Op den Kamp Date: Fri, 9 Dec 2011 11:06:02 +0000 (+0100) Subject: cec: added 'as' command to cec-client, to make the CEC adapter the active source X-Git-Tag: upstream/2.2.0~1^2~44^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a91e1ab4ec1af2f10cbfe8d6e9942d224968f3b1;p=deb_libcec.git cec: added 'as' command to cec-client, to make the CEC adapter the active source --- diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index fafd204..9a0bf3a 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -236,6 +236,7 @@ void ShowHelpConsole(void) "[la] {logical address} change the logical address of the CEC adapter." << endl << "[p] {device} {port} change the HDMI port number of the CEC adapter." << endl << "[pa] {physical address} change the physical address of the CEC adapter." << endl << + "[as] make the CEC adapter the active source." << endl << "[osd] {addr} {string} set OSD message on the specified device." << endl << "[ver] {addr} get the CEC version of the specified device." << endl << "[ven] {addr} get the vendor ID of the specified device." << endl << @@ -422,6 +423,18 @@ bool ProcessCommandOSD(ICECAdapter *parser, const string &command, string &argum return false; } +bool ProcessCommandAS(ICECAdapter *parser, const string &command, string &arguments) +{ + if (command == "as") + { + parser->SetActiveView(); + return true; + } + + return false; +} + + bool ProcessCommandPING(ICECAdapter *parser, const string &command, string &arguments) { if (command == "ping") @@ -770,6 +783,7 @@ bool ProcessConsoleCommand(ICECAdapter *parser, string &input) ProcessCommandLA(parser, command, input) || ProcessCommandP(parser, command, input) || ProcessCommandPA(parser, command, input) || + ProcessCommandAS(parser, command, input) || ProcessCommandOSD(parser, command, input) || ProcessCommandPING(parser, command, input) || ProcessCommandVOLUP(parser, command, input) ||