| 567 | } |
| 568 | |
| 569 | CCECPlaybackDevice *CCECClient::GetPlaybackDevice(void) |
| 570 | { |
| 571 | CCECPlaybackDevice *device(NULL); |
| 572 | CECDEVICEVEC devices; |
| 573 | |
| 574 | // get the playback devices |
| 575 | m_processor->GetDevices()->GetByLogicalAddresses(devices, m_configuration.logicalAddresses); |
| 576 | CCECDeviceMap::FilterType(CEC_DEVICE_TYPE_PLAYBACK_DEVICE, devices); |
| 577 | |
| 578 | // no matches, get the recording devices |
| 579 | if (devices.empty()) |
| 580 | { |
| 581 | m_processor->GetDevices()->GetByLogicalAddresses(devices, m_configuration.logicalAddresses); |
| 582 | CCECDeviceMap::FilterType(CEC_DEVICE_TYPE_RECORDING_DEVICE, devices); |
| 583 | } |
| 584 | |
| 585 | // get the first device that matches, and cast it to CCECPlaybackDevice |
| 586 | if (!devices.empty()) |
| 587 | device = (*devices.begin())->AsPlaybackDevice(); |
| 588 | |
| 589 | return device; |
| 590 | } |
| 591 | |
| 592 | cec_logical_address CCECClient::GetPrimaryLogicalAddress(void) |
| 593 | { |
nothing calls this directly
no test coverage detected