using namespace CEC;
CCECRecordingDevice::CCECRecordingDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress /* = 0 */) :
- CCECBusDevice(processor, address, iPhysicalAddress)
+ CCECPlaybackDevice(processor, address, iPhysicalAddress)
{
m_type = CEC_DEVICE_TYPE_RECORDING_DEVICE;
}
* http://www.pulse-eight.net/
*/
-#include "CECBusDevice.h"
+#include "CECPlaybackDevice.h"
namespace CEC
{
- class CCECRecordingDevice : public CCECBusDevice
+ class CCECRecordingDevice : public CCECPlaybackDevice
{
public:
CCECRecordingDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0);
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;
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;
if (typeList.IsEmpty())
{
if (!bSingleCommand)
- cout << "No device type given. Using 'playback device'" << endl;
- typeList.add(CEC_DEVICE_TYPE_PLAYBACK_DEVICE);
+ cout << "No device type given. Using 'recording device'" << endl;
+ typeList.add(CEC_DEVICE_TYPE_RECORDING_DEVICE);
}
ICECAdapter *parser = LibCecInit("CECTester", typeList);