From a91e1ab4ec1af2f10cbfe8d6e9942d224968f3b1 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Fri, 9 Dec 2011 12:06:02 +0100 Subject: [PATCH] cec: added 'as' command to cec-client, to make the CEC adapter the active source --- src/testclient/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) || -- 2.34.1