cec: a recording device inherits all the features of a playback device. changed defau...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index 3c3d84146cf96fc56b48da7c5b2e913542b0d6cd..4446c9d3ed9b4de4ce04f1b2dcbbf6fbb38f944c 100644 (file)
@@ -91,7 +91,11 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command)
       m_busDevice->GetProcessor()->AddCommand(command);
       break;
     case CEC_OPCODE_MENU_REQUEST:
-      HandleMenuRequest(command);
+      if (!HandleMenuRequest(command))
+      {
+        /* pass to listeners */
+        m_busDevice->GetProcessor()->AddCommand(command);
+      }
       break;
     case CEC_OPCODE_GIVE_DEVICE_POWER_STATUS:
       HandleGiveDevicePowerStatus(command);
@@ -190,7 +194,7 @@ bool CCECCommandHandler::HandleActiveSource(const cec_command &command)
 bool CCECCommandHandler::HandleDeckControl(const cec_command &command)
 {
   CCECBusDevice *device = GetDevice(command.destination);
-  if (device && device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE && command.parameters.size > 0)
+  if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) && command.parameters.size > 0)
   {
     ((CCECPlaybackDevice *) device)->SetDeckControlMode((cec_deck_control_mode) command.parameters[0]);
     return true;
@@ -245,7 +249,7 @@ bool CCECCommandHandler::HandleGiveAudioStatus(const cec_command &command)
 bool CCECCommandHandler::HandleGiveDeckStatus(const cec_command &command)
 {
   CCECBusDevice *device = GetDevice(command.destination);
-  if (device && device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE)
+  if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
     return ((CCECPlaybackDevice *) device)->TransmitDeckStatus(command.initiator);
 
   return false;