cec: moved TransmitDeckStatus() to CCECPlaybackDevice
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index bc345a410bb9615079c43ff80e6f9e68480d0c97..2f6dd699dcff1c493d82fc964f007f6e38b8eaca 100644 (file)
@@ -33,6 +33,7 @@
 #include "CECCommandHandler.h"
 #include "../devices/CECBusDevice.h"
 #include "../devices/CECAudioSystem.h"
+#include "../devices/CECPlaybackDevice.h"
 #include "../CECProcessor.h"
 
 using namespace CEC;
@@ -210,8 +211,8 @@ bool CCECCommandHandler::HandleGiveAudioStatus(const cec_command &command)
 bool CCECCommandHandler::HandleGiveDeckStatus(const cec_command &command)
 {
   CCECBusDevice *device = GetDevice(command.destination);
-  if (device)
-    return device->TransmitDeckStatus(command.initiator);
+  if (device && device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE)
+    return ((CCECPlaybackDevice *) device)->TransmitDeckStatus(command.initiator);
 
   return false;
 }