MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / ProcessCommandOSD

Function ProcessCommandOSD

src/cec-client/cec-client.cpp:609–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607}
608
609bool ProcessCommandOSD(ICECAdapter *parser, const std::string &command, std::string &arguments)
610{
611 if (command == "osd")
612 {
613 bool bFirstWord(false);
614 std::string strAddr, strMessage, strWord;
615 uint8_t iAddr;
616 if (GetWord(arguments, strAddr) && HexStrToInt(strAddr, iAddr) && iAddr < 0xF)
617 {
618 while (GetWord(arguments, strWord))
619 {
620 if (bFirstWord)
621 {
622 bFirstWord = false;
623 strMessage.append(" ");
624 }
625 strMessage.append(strWord);
626 }
627 parser->SetOSDString((cec_logical_address) iAddr, CEC_DISPLAY_CONTROL_DISPLAY_FOR_DEFAULT_TIME, strMessage.c_str());
628 return true;
629 }
630 }
631
632 return false;
633}
634
635bool ProcessCommandAS(ICECAdapter *parser, const std::string &command, std::string & UNUSED(arguments))
636{

Callers 1

ProcessConsoleCommandFunction · 0.85

Calls 3

GetWordFunction · 0.85
SetOSDStringMethod · 0.80
HexStrToIntFunction · 0.70

Tested by

no test coverage detected