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

Method InitHandler

src/libcec/implementations/RLCommandHandler.cpp:59–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool CRLCommandHandler::InitHandler(void)
60{
61 if (m_bHandlerInited)
62 return true;
63 m_bHandlerInited = true;
64
65 if (m_busDevice->GetLogicalAddress() != CECDEVICE_TV)
66 return true;
67
68 CCECBusDevice *primary = m_processor->GetPrimaryDevice();
69 if (primary && primary->GetLogicalAddress() != CECDEVICE_UNREGISTERED)
70 {
71 /* imitate Toshiba devices */
72 if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
73 {
74 primary->SetVendorId(CEC_VENDOR_TOSHIBA);
75 primary->ReplaceHandler(false);
76 }
77
78 if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
79 {
80 /* send the vendor id */
81 primary->TransmitVendorID(CECDEVICE_BROADCAST, false, false);
82 }
83 }
84
85 return true;
86}
87
88int CRLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &command)
89{

Callers 2

RegisterClientMethod · 0.45
ReplaceHandlerMethod · 0.45

Calls 5

ReplaceHandlerMethod · 0.80
GetLogicalAddressMethod · 0.45
GetPrimaryDeviceMethod · 0.45
SetVendorIdMethod · 0.45
TransmitVendorIDMethod · 0.45

Tested by

no test coverage detected