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

Method GetActiveSource

src/libcec/CECProcessor.cpp:429–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429cec_logical_address CCECProcessor::GetActiveSource(bool bRequestActiveSource /* = true */)
430{
431 // get the device that is marked as active source from the device map
432 CCECBusDevice *activeSource = m_busDevices->GetActiveSource();
433 if (activeSource)
434 return activeSource->GetLogicalAddress();
435
436 if (bRequestActiveSource)
437 {
438 // request the active source from the bus
439 CCECBusDevice *primary = GetPrimaryDevice();
440 if (primary)
441 {
442 primary->RequestActiveSource();
443 return GetActiveSource(false);
444 }
445 }
446
447 // unknown or none
448 return CECDEVICE_UNKNOWN;
449}
450
451bool CCECProcessor::IsActiveSource(cec_logical_address iAddress)
452{

Callers

nothing calls this directly

Calls 3

GetActiveSourceFunction · 0.85
RequestActiveSourceMethod · 0.80
GetLogicalAddressMethod · 0.45

Tested by

no test coverage detected