cec: add the device type as parameter when sending the physical address. thanks bobo1on1
[deb_libcec.git] / src / lib / CECProcessor.cpp
index bf559065d19941190b74df568270387e299924e9..f9872fce8fd0cae5c8fbe883cfd76880b334af46 100644 (file)
@@ -320,6 +320,7 @@ void CCECProcessor::ReportPhysicalAddress(void)
   cec_command::format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_REPORT_PHYSICAL_ADDRESS);
   command.parameters.push_back((uint8_t) ((m_physicaladdress >> 8) & 0xFF));
   command.parameters.push_back((uint8_t) (m_physicaladdress & 0xFF));
+  command.parameters.push_back((uint8_t) (CEC_DEVICE_TYPE_PLAYBACK_DEVICE));
 
   Transmit(command);
 }
@@ -543,6 +544,9 @@ void CCECProcessor::ParseCommand(cec_command &command)
     case CEC_OPCODE_USER_CONTROL_RELEASE:
       m_controller->AddKey();
       break;
+    case CEC_OPCODE_ROUTING_CHANGE:
+      m_controller->SetActiveView();
+      break;
     default:
       m_controller->AddCommand(command);
       break;
@@ -580,3 +584,14 @@ void CCECProcessor::ParseCommand(cec_command &command)
     m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
   }
 }
+
+const char *CCECProcessor::CECVendorIdToString(const uint64_t iVendorId)
+{
+  switch (iVendorId)
+  {
+  case CEC_VENDOR_SAMSUNG:
+    return "Samsung";
+  default:
+    return "Unknown";
+  }
+}