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

Method HandleVendorCommand

src/libcec/implementations/VLCommandHandler.cpp:255–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255int CVLCommandHandler::HandleVendorCommand(const cec_command &command)
256{
257 // some vendor command voodoo that will enable more buttons on the remote
258 if (command.parameters.size == 3 &&
259 command.parameters[0] == 0x10 &&
260 command.parameters[1] == 0x01 &&
261 m_processor->IsHandledByLibCEC(command.destination))
262 {
263 // XXX i've seen 0x05 and 0x03 as third param. these probably indicate different types of TVs/capabilities
264 // when we feature abort this, then the TV will try the same thing with a vendor command with id
265 SendVendorCommandCapabilities(m_processor->GetLogicalAddress(), command.initiator);
266
267 CCECBusDevice* dev = m_processor->GetDevice(command.destination);
268 if (dev && dev->IsActiveSource())
269 dev->ActivateSource(500);
270 return COMMAND_HANDLED;
271 }
272
273 return CEC_ABORT_REASON_INVALID_OPERAND;
274}
275
276bool CVLCommandHandler::SourceSwitchAllowed(void)
277{

Callers

nothing calls this directly

Calls 5

IsHandledByLibCECMethod · 0.45
GetLogicalAddressMethod · 0.45
GetDeviceMethod · 0.45
IsActiveSourceMethod · 0.45
ActivateSourceMethod · 0.45

Tested by

no test coverage detected