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

Function ProcessCommandAS

src/cec-client/cec-client.cpp:635–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635bool ProcessCommandAS(ICECAdapter *parser, const std::string &command, std::string & UNUSED(arguments))
636{
637 if (command == "as")
638 {
639 parser->SetActiveSource();
640 // wait for the source switch to finish for 15 seconds tops
641 if (g_bSingleCommand)
642 {
643 CTimeout timeout(15000);
644 bool bActiveSource(false);
645 while (timeout.TimeLeft() > 0 && !bActiveSource)
646 {
647 bActiveSource = parser->IsLibCECActiveSource();
648 if (!bActiveSource)
649 CEvent::Sleep(100);
650 }
651 }
652 return true;
653 }
654
655 return false;
656}
657
658bool ProcessCommandIS(ICECAdapter *parser, const std::string &command, std::string & UNUSED(arguments))
659{

Callers 1

ProcessConsoleCommandFunction · 0.85

Calls 2

SetActiveSourceMethod · 0.45
IsLibCECActiveSourceMethod · 0.45

Tested by

no test coverage detected