| 1008 | } |
| 1009 | |
| 1010 | void CCECClient::AddCommand(const cec_command &command) |
| 1011 | { |
| 1012 | // don't forward the standby opcode more than once every 10 seconds |
| 1013 | if (command.opcode == CEC_OPCODE_STANDBY) |
| 1014 | { |
| 1015 | CLockObject lock(m_mutex); |
| 1016 | if (m_iPreventForwardingPowerOffCommand != 0 && |
| 1017 | m_iPreventForwardingPowerOffCommand > GetTimeMs()) |
| 1018 | return; |
| 1019 | else |
| 1020 | m_iPreventForwardingPowerOffCommand = GetTimeMs() + CEC_FORWARD_STANDBY_MIN_INTERVAL; |
| 1021 | } |
| 1022 | |
| 1023 | if (command.destination == CECDEVICE_BROADCAST || GetLogicalAddresses().IsSet(command.destination)) |
| 1024 | { |
| 1025 | LIB_CEC->AddLog(CEC_LOG_DEBUG, ">> %s (%X) -> %s (%X): %s (%2X)", ToString(command.initiator), command.initiator, ToString(command.destination), command.destination, ToString(command.opcode), command.opcode); |
| 1026 | CallbackAddCommand(command); |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | void CCECClient::AddKey(bool bSendComboKey /* = false */, bool bButtonRelease /* = false */) |
| 1031 | { |