cec: switch to panasonic specific cec implementation if a panasonic device was detected
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index 66916d5af88e00f8d969b1acab2f025f99d6638e..c3e45ec12d068cf5e000717f3643b4ef70444010 100644 (file)
@@ -35,6 +35,7 @@
 #include "../implementations/ANCommandHandler.h"
 #include "../implementations/CECCommandHandler.h"
 #include "../implementations/SLCommandHandler.h"
+#include "../implementations/VLCommandHandler.h"
 #include "../platform/timeutils.h"
 
 using namespace CEC;
@@ -319,6 +320,13 @@ void CCECBusDevice::SetVendorId(uint64_t iVendorId, uint8_t iVendorClass /* = 0
       m_handler = new CSLCommandHandler(this);
     }
     break;
+  case CEC_VENDOR_PANASONIC:
+    if (m_handler->GetVendorId() != CEC_VENDOR_PANASONIC)
+    {
+      delete m_handler;
+      m_handler = new CVLCommandHandler(this);
+    }
+    break;
   default:
     if (m_handler->GetVendorId() != CEC_VENDOR_UNKNOWN)
     {