X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECPlaybackDevice.cpp;h=6f0a8487a8c268a92005691cdd3f96eb2580f228;hb=bca69ca1081e05f4ea6b14bcc0e69921511659a1;hp=f9689cbe81a5ffb8816f12bed4995802f382a5b0;hpb=f00ff009cfc5dfefdf09ca241b9560e74575b3f5;p=deb_libcec.git diff --git a/src/lib/devices/CECPlaybackDevice.cpp b/src/lib/devices/CECPlaybackDevice.cpp index f9689cb..6f0a848 100644 --- a/src/lib/devices/CECPlaybackDevice.cpp +++ b/src/lib/devices/CECPlaybackDevice.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -33,6 +33,7 @@ #include "CECPlaybackDevice.h" #include "../implementations/CECCommandHandler.h" #include "../CECProcessor.h" +#include "../LibCEC.h" using namespace CEC; using namespace PLATFORM; @@ -58,10 +59,7 @@ void CCECPlaybackDevice::SetDeckStatus(cec_deck_info deckStatus) CLockObject lock(m_mutex); if (m_deckStatus != deckStatus && m_deckStatus != CEC_DECK_INFO_OTHER_STATUS_LG) { - CStdString strLog; - strLog.Format(">> %s (%X): deck status changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_deckStatus), ToString(deckStatus)); - AddLog(CEC_LOG_DEBUG, strLog.c_str()); - + CLibCEC::AddLog(CEC_LOG_DEBUG, ">> %s (%X): deck status changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_deckStatus), ToString(deckStatus)); m_deckStatus = deckStatus; } } @@ -77,10 +75,7 @@ void CCECPlaybackDevice::SetDeckControlMode(cec_deck_control_mode mode) CLockObject lock(m_mutex); if (m_deckControlMode != mode) { - CStdString strLog; - strLog.Format(">> %s (%X): deck control mode changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_deckControlMode), ToString(mode)); - AddLog(CEC_LOG_DEBUG, strLog.c_str()); - + CLibCEC::AddLog(CEC_LOG_DEBUG, ">> %s (%X): deck control mode changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_deckControlMode), ToString(mode)); m_deckControlMode = mode; } } @@ -90,9 +85,7 @@ bool CCECPlaybackDevice::TransmitDeckStatus(cec_logical_address dest) cec_deck_info state; { CLockObject lock(m_mutex); - CStdString strLog; - strLog.Format("<< %s (%X) -> %s (%X): deck status '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString(m_deckStatus)); - AddLog(CEC_LOG_NOTICE, strLog); + CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): deck status '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString(m_deckStatus)); state = m_deckStatus; }