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

Method HandleActiveSource

src/libcec/implementations/CECCommandHandler.cpp:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210int CCECCommandHandler::HandleActiveSource(const cec_command &command)
211{
212 if (command.parameters.size == 2)
213 {
214 uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
215 CCECBusDevice *device = m_processor->GetDevice(command.initiator);
216 if (device)
217 {
218 device->SetPhysicalAddress(iAddress);
219 device->MarkAsActiveSource();
220 }
221
222 m_processor->GetDevices()->SignalAll(command.opcode);
223 return COMMAND_HANDLED;
224 }
225
226 return CEC_ABORT_REASON_INVALID_OPERAND;
227}
228
229int CCECCommandHandler::HandleDeckControl(const cec_command &command)
230{

Callers

nothing calls this directly

Calls 5

MarkAsActiveSourceMethod · 0.80
SignalAllMethod · 0.80
GetDevicesMethod · 0.80
GetDeviceMethod · 0.45
SetPhysicalAddressMethod · 0.45

Tested by

no test coverage detected