X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECPlaybackDevice.cpp;h=d1b1e5112da13d1e87fd8d3b0a6e6c559f1a1c0e;hb=5e5637c6334af5a4a8f30c8e23f64382a825934f;hp=98ec750a9d51453e83d25d0b7caf2c7b9d8b1b19;hpb=7c63a480cbe63c5c6725b9558ae21acbe427ccc2;p=deb_libcec.git diff --git a/src/lib/devices/CECPlaybackDevice.cpp b/src/lib/devices/CECPlaybackDevice.cpp index 98ec750..d1b1e51 100644 --- a/src/lib/devices/CECPlaybackDevice.cpp +++ b/src/lib/devices/CECPlaybackDevice.cpp @@ -44,8 +44,15 @@ CCECPlaybackDevice::CCECPlaybackDevice(CCECProcessor *processor, cec_logical_add m_type = CEC_DEVICE_TYPE_PLAYBACK_DEVICE; } +cec_deck_info CCECPlaybackDevice::GetDeckStatus(void) +{ + CLockObject lock(&m_mutex); + return m_deckStatus; +} + void CCECPlaybackDevice::SetDeckStatus(cec_deck_info deckStatus) { + CLockObject lock(&m_writeMutex); if (m_deckStatus != deckStatus) { CStdString strLog; @@ -56,8 +63,15 @@ void CCECPlaybackDevice::SetDeckStatus(cec_deck_info deckStatus) } } +cec_deck_control_mode CCECPlaybackDevice::GetDeckControlMode(void) +{ + CLockObject lock(&m_mutex); + return m_deckControlMode; +} + void CCECPlaybackDevice::SetDeckControlMode(cec_deck_control_mode mode) { + CLockObject lock(&m_writeMutex); if (m_deckControlMode != mode) { CStdString strLog; @@ -70,6 +84,7 @@ void CCECPlaybackDevice::SetDeckControlMode(cec_deck_control_mode mode) bool CCECPlaybackDevice::TransmitDeckStatus(cec_logical_address dest) { + CLockObject lock(&m_writeMutex); CStdString strLog; strLog.Format("<< %s (%X) -> %s (%X): deck status '%s'", GetLogicalAddressName(), m_iLogicalAddress, CCECCommandHandler::ToString(dest), dest, CCECCommandHandler::ToString(m_deckStatus)); AddLog(CEC_LOG_NOTICE, strLog);