From: Lars Op den Kamp Date: Tue, 26 Jun 2012 23:45:24 +0000 (+0200) Subject: cec: fixed - copy the class member values of the old handler when creating a new... X-Git-Tag: upstream/2.2.0~1^2~22^2^2~1 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=060a7b5eaa3b6cb10afce2c7273a5c021f4fea2e cec: fixed - copy the class member values of the old handler when creating a new command handler, or a delayed activate source will get lost when the handler is switched --- diff --git a/src/lib/CECClient.cpp b/src/lib/CECClient.cpp index e403360..b0d7e18 100644 --- a/src/lib/CECClient.cpp +++ b/src/lib/CECClient.cpp @@ -125,7 +125,7 @@ bool CCECClient::OnRegister(void) // make the primary device the active source if the option is set if (m_configuration.bActivateSource == 1) - GetPrimaryDevice()->ActivateSource(); + GetPrimaryDevice()->ActivateSource(500); return true; } diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index f01d47c..91dd835 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -72,7 +72,8 @@ CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogi m_deviceStatus (CEC_DEVICE_STATUS_UNKNOWN), m_iHandlerUseCount (0), m_bAwaitingReceiveFailed(false), - m_bVendorIdRequested (false) + m_bVendorIdRequested (false), + m_waitForResponse (new CWaitForResponse) { m_handler = new CCECCommandHandler(this); @@ -87,6 +88,7 @@ CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogi CCECBusDevice::~CCECBusDevice(void) { DELETE_AND_NULL(m_handler); + DELETE_AND_NULL(m_waitForResponse); } bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */) @@ -108,21 +110,27 @@ bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */) if (CCECCommandHandler::HasSpecificHandler(m_vendor)) { LIB_CEC->AddLog(CEC_LOG_DEBUG, "replacing the command handler for device '%s' (%x)", GetLogicalAddressName(), GetLogicalAddress()); + + int32_t iTransmitTimeout = m_handler->m_iTransmitTimeout; + int32_t iTransmitWait = m_handler->m_iTransmitWait; + int8_t iTransmitRetries = m_handler->m_iTransmitRetries; + int64_t iActiveSourcePending = m_handler->m_iActiveSourcePending; + DELETE_AND_NULL(m_handler); switch (m_vendor) { case CEC_VENDOR_SAMSUNG: - m_handler = new CANCommandHandler(this); + m_handler = new CANCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending); break; case CEC_VENDOR_LG: - m_handler = new CSLCommandHandler(this); + m_handler = new CSLCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending); break; case CEC_VENDOR_PANASONIC: - m_handler = new CVLCommandHandler(this); + m_handler = new CVLCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending); break; default: - m_handler = new CCECCommandHandler(this); + m_handler = new CCECCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending); break; } @@ -231,7 +239,7 @@ void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode) // signal threads that are waiting for a reponse MarkBusy(); - m_handler->SignalOpcode(cec_command::GetResponseOpcode(opcode)); + SignalOpcode(cec_command::GetResponseOpcode(opcode)); MarkReady(); } @@ -801,6 +809,7 @@ void CCECBusDevice::ResetDeviceStatus(void) m_iLastActive = 0; m_bVendorIdRequested = false; m_unsupportedFeatures.clear(); + m_waitForResponse->Clear(); if (m_deviceStatus != CEC_DEVICE_STATUS_UNKNOWN) LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): device status changed into 'unknown'", GetLogicalAddressName(), m_iLogicalAddress); @@ -890,12 +899,21 @@ bool CCECBusDevice::TransmitMenuState(const cec_logical_address dest) return bReturn; } -bool CCECBusDevice::ActivateSource(void) +bool CCECBusDevice::ActivateSource(uint64_t iDelay /* = 0 */) { MarkAsActiveSource(); - LIB_CEC->AddLog(CEC_LOG_DEBUG, "activating source '%s'", ToString(m_iLogicalAddress)); MarkBusy(); - bool bReturn = m_handler->ActivateSource(); + bool bReturn(true); + if (iDelay == 0) + { + LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending active source message for '%s'", ToString(m_iLogicalAddress)); + bReturn = m_handler->ActivateSource(); + } + else + { + LIB_CEC->AddLog(CEC_LOG_DEBUG, "scheduling active source message for '%s'", ToString(m_iLogicalAddress)); + m_handler->ScheduleActivateSource(iDelay); + } MarkReady(); return bReturn; } @@ -1282,3 +1300,13 @@ CCECClient *CCECBusDevice::GetClient(void) { return m_processor->GetClient(m_iLogicalAddress); } + +void CCECBusDevice::SignalOpcode(cec_opcode opcode) +{ + m_waitForResponse->Received(opcode); +} + +bool CCECBusDevice::WaitForOpcode(cec_opcode opcode) +{ + return m_waitForResponse->Wait(opcode); +} diff --git a/src/lib/devices/CECBusDevice.h b/src/lib/devices/CECBusDevice.h index dcfbbbc..89fb690 100644 --- a/src/lib/devices/CECBusDevice.h +++ b/src/lib/devices/CECBusDevice.h @@ -33,6 +33,7 @@ #include "../../../include/cectypes.h" #include +#include #include "../platform/threads/mutex.h" #include "../platform/util/StdString.h" @@ -47,6 +48,85 @@ namespace CEC class CCECTuner; class CCECTV; + class CResponse + { + public: + CResponse(cec_opcode opcode) : + m_opcode(opcode){} + ~CResponse(void) + { + Broadcast(); + } + + bool Wait(uint32_t iTimeout) + { + return m_event.Wait(iTimeout); + } + + void Broadcast(void) + { + m_event.Broadcast(); + } + + private: + cec_opcode m_opcode; + PLATFORM::CEvent m_event; + }; + + class CWaitForResponse + { + public: + CWaitForResponse(void) {} + ~CWaitForResponse(void) + { + Clear(); + } + + void Clear() + { + PLATFORM::CLockObject lock(m_mutex); + for (std::map::iterator it = m_waitingFor.begin(); it != m_waitingFor.end(); it++) + it->second->Broadcast(); + m_waitingFor.clear(); + } + + bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT) + { + CResponse *response = GetEvent(opcode); + return response ? response->Wait(iTimeout) : false; + } + + void Received(cec_opcode opcode) + { + CResponse *response = GetEvent(opcode); + if (response) + response->Broadcast(); + } + + private: + CResponse *GetEvent(cec_opcode opcode) + { + CResponse *retVal(NULL); + { + PLATFORM::CLockObject lock(m_mutex); + std::map::iterator it = m_waitingFor.find(opcode); + if (it != m_waitingFor.end()) + { + retVal = it->second; + } + else + { + retVal = new CResponse(opcode); + m_waitingFor[opcode] = retVal; + } + return retVal; + } + } + + PLATFORM::CMutex m_mutex; + std::map m_waitingFor; + }; + class CCECBusDevice { friend class CCECProcessor; @@ -136,7 +216,7 @@ namespace CEC virtual void SetMenuState(const cec_menu_state state); virtual bool TransmitMenuState(const cec_logical_address destination); - virtual bool ActivateSource(void); + virtual bool ActivateSource(uint64_t iDelay = 0); virtual bool IsActiveSource(void) const { return m_bActiveSource; } virtual bool RequestActiveSource(bool bWaitForResponse = true); virtual void MarkAsActiveSource(void); @@ -153,6 +233,8 @@ namespace CEC virtual bool TryLogicalAddress(void); CCECClient * GetClient(void); + void SignalOpcode(cec_opcode opcode); + bool WaitForOpcode(cec_opcode opcode); CCECAudioSystem * AsAudioSystem(void); static CCECAudioSystem * AsAudioSystem(CCECBusDevice *device); @@ -196,5 +278,6 @@ namespace CEC unsigned m_iHandlerUseCount; bool m_bAwaitingReceiveFailed; bool m_bVendorIdRequested; + CWaitForResponse *m_waitForResponse; }; }; diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 554b637..8eccf88 100644 --- a/src/lib/implementations/ANCommandHandler.cpp +++ b/src/lib/implementations/ANCommandHandler.cpp @@ -41,8 +41,12 @@ using namespace CEC; #define LIB_CEC m_busDevice->GetProcessor()->GetLib() #define ToString(p) LIB_CEC->ToString(p) -CANCommandHandler::CANCommandHandler(CCECBusDevice *busDevice) : - CCECCommandHandler(busDevice) +CANCommandHandler::CANCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout /* = CEC_DEFAULT_TRANSMIT_TIMEOUT */, + int32_t iTransmitWait /* = CEC_DEFAULT_TRANSMIT_WAIT */, + int8_t iTransmitRetries /* = CEC_DEFAULT_TRANSMIT_RETRIES */, + int64_t iActiveSourcePending /* = 0 */) : + CCECCommandHandler(busDevice, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending) { m_vendorId = CEC_VENDOR_SAMSUNG; m_bOPTSendDeckStatusUpdateOnActiveSource = false; diff --git a/src/lib/implementations/ANCommandHandler.h b/src/lib/implementations/ANCommandHandler.h index 7a9d9e4..3b08cbd 100644 --- a/src/lib/implementations/ANCommandHandler.h +++ b/src/lib/implementations/ANCommandHandler.h @@ -38,7 +38,11 @@ namespace CEC class CANCommandHandler : public CCECCommandHandler { public: - CANCommandHandler(CCECBusDevice *busDevice); + CANCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT, + int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT, + int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES, + int64_t iActiveSourcePending = 0); virtual ~CANCommandHandler(void) {}; int HandleVendorRemoteButtonDown(const cec_command &command); diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 03165e9..ffe78b8 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -47,25 +47,23 @@ using namespace PLATFORM; #define LIB_CEC m_busDevice->GetProcessor()->GetLib() #define ToString(p) CCECTypeUtils::ToString(p) -CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice) : +CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout /* = CEC_DEFAULT_TRANSMIT_TIMEOUT */, + int32_t iTransmitWait /* = CEC_DEFAULT_TRANSMIT_WAIT */, + int8_t iTransmitRetries /* = CEC_DEFAULT_TRANSMIT_RETRIES */, + int64_t iActiveSourcePending /* = 0 */) : m_busDevice(busDevice), m_processor(m_busDevice->GetProcessor()), - m_iTransmitTimeout(CEC_DEFAULT_TRANSMIT_TIMEOUT), - m_iTransmitWait(CEC_DEFAULT_TRANSMIT_WAIT), - m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES), + m_iTransmitTimeout(iTransmitTimeout), + m_iTransmitWait(iTransmitWait), + m_iTransmitRetries(iTransmitRetries), m_bHandlerInited(false), m_bOPTSendDeckStatusUpdateOnActiveSource(false), m_vendorId(CEC_VENDOR_UNKNOWN), - m_waitForResponse(new CWaitForResponse), - m_iActiveSourcePending(0) + m_iActiveSourcePending(iActiveSourcePending) { } -CCECCommandHandler::~CCECCommandHandler(void) -{ - DELETE_AND_NULL(m_waitForResponse); -} - bool CCECCommandHandler::HandleCommand(const cec_command &command) { if (command.opcode_set == 0) @@ -195,7 +193,7 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) } if (iHandled == COMMAND_HANDLED) - m_waitForResponse->Received((command.opcode == CEC_OPCODE_FEATURE_ABORT && command.parameters.size > 0) ? (cec_opcode)command.parameters[0] : command.opcode); + m_busDevice->SignalOpcode((command.opcode == CEC_OPCODE_FEATURE_ABORT && command.parameters.size > 0) ? (cec_opcode)command.parameters[0] : command.opcode); else UnhandledCommand(command, (cec_abort_reason)iHandled); @@ -1077,7 +1075,7 @@ bool CCECCommandHandler::Transmit(cec_command &command, bool bSuppressWait /* = LIB_CEC->AddLog(CEC_LOG_DEBUG, "command transmitted"); if (bExpectResponse) { - bReturn = m_waitForResponse->Wait(expectedResponse); + bReturn = m_busDevice->WaitForOpcode(expectedResponse); LIB_CEC->AddLog(CEC_LOG_DEBUG, bReturn ? "expected response received (%X: %s)" : "expected response not received (%X: %s)", (int)expectedResponse, ToString(expectedResponse)); } } @@ -1150,7 +1148,8 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f return true; } -void CCECCommandHandler::SignalOpcode(cec_opcode opcode) +void CCECCommandHandler::ScheduleActivateSource(uint64_t iDelay) { - m_waitForResponse->Received(opcode); + CLockObject lock(m_mutex); + m_iActiveSourcePending = GetTimeMs() + iDelay; } diff --git a/src/lib/implementations/CECCommandHandler.h b/src/lib/implementations/CECCommandHandler.h index b6be4e7..bc42128 100644 --- a/src/lib/implementations/CECCommandHandler.h +++ b/src/lib/implementations/CECCommandHandler.h @@ -33,7 +33,6 @@ #include "../../../include/cectypes.h" #include -#include #include "../platform/threads/mutex.h" #include "../platform/util/StdString.h" @@ -44,83 +43,17 @@ namespace CEC class CCECProcessor; class CCECBusDevice; - class CResponse - { - public: - CResponse(cec_opcode opcode) : - m_opcode(opcode){} - ~CResponse(void) - { - Broadcast(); - } - - bool Wait(uint32_t iTimeout) - { - return m_event.Wait(iTimeout); - } - - void Broadcast(void) - { - m_event.Broadcast(); - } - - private: - cec_opcode m_opcode; - PLATFORM::CEvent m_event; - }; - - class CWaitForResponse - { - public: - CWaitForResponse(void) {} - ~CWaitForResponse(void) - { - PLATFORM::CLockObject lock(m_mutex); - m_waitingFor.clear(); - } - - bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT) - { - CResponse *response = GetEvent(opcode); - return response ? response->Wait(iTimeout) : false; - } - - void Received(cec_opcode opcode) - { - CResponse *response = GetEvent(opcode); - if (response) - response->Broadcast(); - } - - private: - CResponse *GetEvent(cec_opcode opcode) - { - CResponse *retVal(NULL); - { - PLATFORM::CLockObject lock(m_mutex); - std::map::iterator it = m_waitingFor.find(opcode); - if (it != m_waitingFor.end()) - { - retVal = it->second; - } - else - { - retVal = new CResponse(opcode); - m_waitingFor[opcode] = retVal; - } - return retVal; - } - } - - PLATFORM::CMutex m_mutex; - std::map m_waitingFor; - }; - class CCECCommandHandler { + friend class CCECBusDevice; + public: - CCECCommandHandler(CCECBusDevice *busDevice); - virtual ~CCECCommandHandler(void); + CCECCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT, + int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT, + int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES, + int64_t iActiveSourcePending = 0); + virtual ~CCECCommandHandler(void) {}; virtual bool HandleCommand(const cec_command &command); virtual cec_vendor_id GetVendorId(void) { return m_vendorId; }; @@ -161,7 +94,7 @@ namespace CEC virtual bool TransmitSetStreamPath(uint16_t iStreamPath); virtual bool SendDeckStatusUpdateOnActiveSource(void) const { return m_bOPTSendDeckStatusUpdateOnActiveSource; }; - virtual void SignalOpcode(cec_opcode opcode); + virtual void ScheduleActivateSource(uint64_t iDelay); virtual bool SupportsDeviceType(const cec_device_type UNUSED(type)) const { return true; }; virtual cec_device_type GetReplacementDeviceType(const cec_device_type type) const { return type; } @@ -225,7 +158,6 @@ namespace CEC bool m_bHandlerInited; bool m_bOPTSendDeckStatusUpdateOnActiveSource; cec_vendor_id m_vendorId; - CWaitForResponse *m_waitForResponse; int64_t m_iActiveSourcePending; PLATFORM::CMutex m_mutex; }; diff --git a/src/lib/implementations/RLCommandHandler.cpp b/src/lib/implementations/RLCommandHandler.cpp index b913c32..5653137 100644 --- a/src/lib/implementations/RLCommandHandler.cpp +++ b/src/lib/implementations/RLCommandHandler.cpp @@ -38,8 +38,12 @@ using namespace CEC; using namespace PLATFORM; -CRLCommandHandler::CRLCommandHandler(CCECBusDevice *busDevice) : - CCECCommandHandler(busDevice) +CRLCommandHandler::CRLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout /* = CEC_DEFAULT_TRANSMIT_TIMEOUT */, + int32_t iTransmitWait /* = CEC_DEFAULT_TRANSMIT_WAIT */, + int8_t iTransmitRetries /* = CEC_DEFAULT_TRANSMIT_RETRIES */, + int64_t iActiveSourcePending /* = 0 */) : + CCECCommandHandler(busDevice, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending) { m_vendorId = CEC_VENDOR_TOSHIBA; } diff --git a/src/lib/implementations/RLCommandHandler.h b/src/lib/implementations/RLCommandHandler.h index 9766827..ec9edd9 100644 --- a/src/lib/implementations/RLCommandHandler.h +++ b/src/lib/implementations/RLCommandHandler.h @@ -39,7 +39,11 @@ namespace CEC class CRLCommandHandler : public CCECCommandHandler { public: - CRLCommandHandler(CCECBusDevice *busDevice); + CRLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT, + int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT, + int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES, + int64_t iActiveSourcePending = 0); virtual ~CRLCommandHandler(void) {}; bool InitHandler(void); diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 8ddac56..222fc95 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -56,8 +56,12 @@ using namespace PLATFORM; #define LIB_CEC m_busDevice->GetProcessor()->GetLib() #define ToString(p) LIB_CEC->ToString(p) -CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : - CCECCommandHandler(busDevice), +CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout /* = CEC_DEFAULT_TRANSMIT_TIMEOUT */, + int32_t iTransmitWait /* = CEC_DEFAULT_TRANSMIT_WAIT */, + int8_t iTransmitRetries /* = CEC_DEFAULT_TRANSMIT_RETRIES */, + int64_t iActiveSourcePending /* = 0 */) : + CCECCommandHandler(busDevice, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending), m_bSLEnabled(false), m_bActiveSourceSent(false) { diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index a59a2f2..8c6902d 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -39,7 +39,11 @@ namespace CEC class CSLCommandHandler : public CCECCommandHandler { public: - CSLCommandHandler(CCECBusDevice *busDevice); + CSLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT, + int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT, + int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES, + int64_t iActiveSourcePending = 0); virtual ~CSLCommandHandler(void) {}; bool InitHandler(void); diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index d8d7f6c..97d06a2 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -52,8 +52,12 @@ using namespace PLATFORM; // wait this amount of ms before trying to switch sources after receiving the message from the TV that it's powered on #define SOURCE_SWITCH_DELAY_MS 1000 -CVLCommandHandler::CVLCommandHandler(CCECBusDevice *busDevice) : - CCECCommandHandler(busDevice), +CVLCommandHandler::CVLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout /* = CEC_DEFAULT_TRANSMIT_TIMEOUT */, + int32_t iTransmitWait /* = CEC_DEFAULT_TRANSMIT_WAIT */, + int8_t iTransmitRetries /* = CEC_DEFAULT_TRANSMIT_RETRIES */, + int64_t iActiveSourcePending /* = 0 */) : + CCECCommandHandler(busDevice, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending), m_iPowerUpEventReceived(0) { m_vendorId = CEC_VENDOR_PANASONIC; diff --git a/src/lib/implementations/VLCommandHandler.h b/src/lib/implementations/VLCommandHandler.h index 6f417e8..d1b25d2 100644 --- a/src/lib/implementations/VLCommandHandler.h +++ b/src/lib/implementations/VLCommandHandler.h @@ -38,7 +38,11 @@ namespace CEC class CVLCommandHandler : public CCECCommandHandler { public: - CVLCommandHandler(CCECBusDevice *busDevice); + CVLCommandHandler(CCECBusDevice *busDevice, + int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT, + int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT, + int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES, + int64_t iActiveSourcePending = 0); virtual ~CVLCommandHandler(void) {}; bool InitHandler(void);