Removing the "initialized after" warnings.

This CL tweat the order of the initialization in the constructor to adapt to the order of declaration of the members.
Review URL: http://webrtc-codereview.appspot.com/99002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@294 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
xians@google.com 2011-08-03 12:40:23 +00:00
parent e0f7d7b7e8
commit 22963abffe
8 changed files with 74 additions and 77 deletions

View File

@ -1070,22 +1070,15 @@ Channel::Channel(const WebRtc_Word32 channelId,
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_transmitCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _transmitCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_channelId(channelId),
_instanceId(instanceId), _instanceId(instanceId),
_playing(false), _channelId(channelId),
_sending(false),
_receiving(false),
_mixFileWithMicrophone(false),
_timeStamp(0), // This is just an offset, RTP module will add it's own random offset
_rtpRtcpModule(*RtpRtcp::CreateRtpRtcp(VoEModuleId( _rtpRtcpModule(*RtpRtcp::CreateRtpRtcp(VoEModuleId(
instanceId, channelId), true)), instanceId, channelId), true)),
_audioCodingModule(*AudioCodingModule::Create( _audioCodingModule(*AudioCodingModule::Create(
VoEModuleId(instanceId, channelId))), VoEModuleId(instanceId, channelId))),
#ifndef WEBRTC_EXTERNAL_TRANSPORT #ifndef WEBRTC_EXTERNAL_TRANSPORT
_socketTransportModule( _socketTransportModule(*UdpTransport::Create(
*UdpTransport::Create( VoEModuleId(instanceId, channelId), numSocketThreads)),
VoEModuleId(instanceId, channelId),
numSocketThreads)),
#endif #endif
#ifdef WEBRTC_SRTP #ifdef WEBRTC_SRTP
_srtpModule(*SrtpModule::CreateSrtpModule(VoEModuleId(instanceId, _srtpModule(*SrtpModule::CreateSrtpModule(VoEModuleId(instanceId,
@ -1093,30 +1086,9 @@ Channel::Channel(const WebRtc_Word32 channelId,
#endif #endif
_rtpDumpIn(*RtpDump::CreateRtpDump()), _rtpDumpIn(*RtpDump::CreateRtpDump()),
_rtpDumpOut(*RtpDump::CreateRtpDump()), _rtpDumpOut(*RtpDump::CreateRtpDump()),
_transportPtr(NULL),
_encryptionPtr(NULL),
_rxAudioProcessingModulePtr(NULL),
#ifdef WEBRTC_DTMF_DETECTION
_telephoneEventDetectionPtr(NULL),
#endif
_rxVadObserverPtr(NULL),
_oldVadDecision(-1),
_sendFrameType(0),
_outputAudioLevel(), _outputAudioLevel(),
_inbandDtmfQueue(VoEModuleId(instanceId, channelId)),
_inbandDtmfGenerator(VoEModuleId(instanceId, channelId)),
_encrypting(false),
_decrypting(false),
_encryptionRTPBufferPtr(NULL),
_decryptionRTPBufferPtr(NULL),
_encryptionRTCPBufferPtr(NULL),
_decryptionRTCPBufferPtr(NULL),
_externalTransport(false), _externalTransport(false),
_engineStatisticsPtr(NULL), _audioLevel_dBov(100),
_moduleProcessThreadPtr(NULL),
_audioDeviceModulePtr(NULL),
_voiceEngineObserverPtr(NULL),
_callbackCritSectPtr(NULL),
_inputFilePlayerPtr(NULL), _inputFilePlayerPtr(NULL),
_outputFilePlayerPtr(NULL), _outputFilePlayerPtr(NULL),
_outputFileRecorderPtr(NULL), _outputFileRecorderPtr(NULL),
@ -1128,34 +1100,62 @@ Channel::Channel(const WebRtc_Word32 channelId,
_inputFilePlaying(false), _inputFilePlaying(false),
_outputFilePlaying(false), _outputFilePlaying(false),
_outputFileRecording(false), _outputFileRecording(false),
_outputExternalMedia(false), _inbandDtmfQueue(VoEModuleId(instanceId, channelId)),
_inbandDtmfGenerator(VoEModuleId(instanceId, channelId)),
_inputExternalMedia(false), _inputExternalMedia(false),
_outputExternalMedia(false),
_inputExternalMediaCallbackPtr(NULL), _inputExternalMediaCallbackPtr(NULL),
_outputExternalMediaCallbackPtr(NULL), _outputExternalMediaCallbackPtr(NULL),
_encryptionRTPBufferPtr(NULL),
_decryptionRTPBufferPtr(NULL),
_encryptionRTCPBufferPtr(NULL),
_decryptionRTCPBufferPtr(NULL),
_timeStamp(0), // This is just an offset, RTP module will add it's own random offset
_sendTelephoneEventPayloadType(106),
_playoutTimeStampRTP(0),
_playoutTimeStampRTCP(0),
_numberOfDiscardedPackets(0),
_engineStatisticsPtr(NULL),
_moduleProcessThreadPtr(NULL),
_audioDeviceModulePtr(NULL),
_voiceEngineObserverPtr(NULL),
_callbackCritSectPtr(NULL),
_transportPtr(NULL),
_encryptionPtr(NULL),
_rxAudioProcessingModulePtr(NULL),
#ifdef WEBRTC_DTMF_DETECTION
_telephoneEventDetectionPtr(NULL),
#endif
_rxVadObserverPtr(NULL),
_oldVadDecision(-1),
_sendFrameType(0),
_rtpObserverPtr(NULL), _rtpObserverPtr(NULL),
_rtcpObserverPtr(NULL), _rtcpObserverPtr(NULL),
_outputIsOnHold(false),
_externalPlayout(false),
_inputIsOnHold(false),
_playing(false),
_sending(false),
_receiving(false),
_mixFileWithMicrophone(false),
_rtpObserver(false),
_rtcpObserver(false),
_mute(false), _mute(false),
_panLeft(1.0f), _panLeft(1.0f),
_panRight(1.0f), _panRight(1.0f),
_outputGain(1.0f), _outputGain(1.0f),
_encrypting(false),
_decrypting(false),
_playOutbandDtmfEvent(false), _playOutbandDtmfEvent(false),
_playInbandDtmfEvent(false), _playInbandDtmfEvent(false),
_sendTelephoneEventPayloadType(106),
_inbandTelephoneEventDetection(false), _inbandTelephoneEventDetection(false),
_outOfBandTelephoneEventDetecion(false), _outOfBandTelephoneEventDetecion(false),
_rtpObserver(false),
_rtcpObserver(false),
_playoutTimeStampRTP(0),
_playoutTimeStampRTCP(0),
_numberOfDiscardedPackets(0),
_extraPayloadType(0), _extraPayloadType(0),
_insertExtraRTPPacket(false), _insertExtraRTPPacket(false),
_extraMarkerBit(false), _extraMarkerBit(false),
_lastLocalTimeStamp(0), _lastLocalTimeStamp(0),
_lastPayloadType(0), _lastPayloadType(0),
_outputIsOnHold(false), _includeAudioLevelIndication(false),
_externalPlayout(false),
_inputIsOnHold(false),
_rtpPacketTimedOut(false), _rtpPacketTimedOut(false),
_rtpPacketTimeOutIsEnabled(false), _rtpPacketTimeOutIsEnabled(false),
_rtpTimeOutSeconds(0), _rtpTimeOutSeconds(0),
@ -1171,9 +1171,7 @@ Channel::Channel(const WebRtc_Word32 channelId,
_RxVadDetection(false), _RxVadDetection(false),
_rxApmIsEnabled(false), _rxApmIsEnabled(false),
_rxAgcIsEnabled(false), _rxAgcIsEnabled(false),
_rxNsIsEnabled(false), _rxNsIsEnabled(false)
_audioLevel_dBov(100),
_includeAudioLevelIndication(false)
{ {
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,_channelId), WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::Channel() - ctor"); "Channel::Channel() - ctor");

View File

@ -584,8 +584,8 @@ private:
bool _outputFileRecording; bool _outputFileRecording;
DtmfInbandQueue _inbandDtmfQueue; DtmfInbandQueue _inbandDtmfQueue;
DtmfInband _inbandDtmfGenerator; DtmfInband _inbandDtmfGenerator;
bool _outputExternalMedia;
bool _inputExternalMedia; bool _inputExternalMedia;
bool _outputExternalMedia;
VoEMediaProcess* _inputExternalMediaCallbackPtr; VoEMediaProcess* _inputExternalMediaCallbackPtr;
VoEMediaProcess* _outputExternalMediaCallbackPtr; VoEMediaProcess* _outputExternalMediaCallbackPtr;
WebRtc_UWord8* _encryptionRTPBufferPtr; WebRtc_UWord8* _encryptionRTPBufferPtr;

View File

@ -65,17 +65,17 @@ const WebRtc_Word16 Dtmf_dBm0kHz[37]=
DtmfInband::DtmfInband(const WebRtc_Word32 id) : DtmfInband::DtmfInband(const WebRtc_Word32 id) :
_id(id),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
_outputFrequencyHz(8000), _outputFrequencyHz(8000),
_reinit(true),
_remainingSamples(0),
_frameLengthSamples(0), _frameLengthSamples(0),
_remainingSamples(0),
_eventCode(0), _eventCode(0),
_attenuationDb(0), _attenuationDb(0),
_lengthMs(0),
_reinit(true),
_playing(false), _playing(false),
_delaySinceLastToneMS(1000), _delaySinceLastToneMS(1000)
_lengthMs(0)
{ {
memset(_oldOutputLow, 0, sizeof(_oldOutputLow)); memset(_oldOutputLow, 0, sizeof(_oldOutputLow));
memset(_oldOutputHigh, 0, sizeof(_oldOutputHigh)); memset(_oldOutputHigh, 0, sizeof(_oldOutputHigh));

View File

@ -16,8 +16,8 @@ namespace webrtc {
namespace voe { namespace voe {
MonitorModule::MonitorModule() : MonitorModule::MonitorModule() :
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_observerPtr(NULL), _observerPtr(NULL),
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_lastProcessTime(GET_TIME_IN_MS()) _lastProcessTime(GET_TIME_IN_MS())
{ {
} }

View File

@ -120,18 +120,18 @@ OutputMixer::Create(OutputMixer*& mixer, const WebRtc_UWord32 instanceId)
OutputMixer::OutputMixer(const WebRtc_UWord32 instanceId) : OutputMixer::OutputMixer(const WebRtc_UWord32 instanceId) :
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_instanceId(instanceId),
_outputFileRecorderPtr(NULL),
_outputFileRecording(false),
_dtmfGenerator(instanceId),
_mixerModule(*AudioConferenceMixer:: _mixerModule(*AudioConferenceMixer::
CreateAudioConferenceMixer(instanceId)), CreateAudioConferenceMixer(instanceId)),
_externalMediaCallbackPtr(NULL),
_audioLevel(), _audioLevel(),
_dtmfGenerator(instanceId),
_instanceId(instanceId),
_externalMediaCallbackPtr(NULL),
_externalMedia(false), _externalMedia(false),
_panLeft(1.0f), _panLeft(1.0f),
_panRight(1.0f), _panRight(1.0f),
_mixingFrequencyHz(8000) _mixingFrequencyHz(8000),
_outputFileRecorderPtr(NULL),
_outputFileRecording(false)
{ {
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,-1), WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::OutputMixer() - ctor"); "OutputMixer::OutputMixer() - ctor");

View File

@ -25,13 +25,13 @@ static WebRtc_Word32 _gInstanceCounter = 0;
SharedData::SharedData() : SharedData::SharedData() :
_instanceId(++_gInstanceCounter), _instanceId(++_gInstanceCounter),
_apiCritPtr(CriticalSectionWrapper::CreateCriticalSection()),
_channelManager(_gInstanceCounter), _channelManager(_gInstanceCounter),
_engineStatistics(_gInstanceCounter), _engineStatistics(_gInstanceCounter),
_usingExternalAudioDevice(false), _usingExternalAudioDevice(false),
_audioDevicePtr(NULL), _audioDevicePtr(NULL),
_audioProcessingModulePtr(NULL), _audioProcessingModulePtr(NULL),
_moduleProcessThreadPtr(ProcessThread::CreateProcessThread()), _moduleProcessThreadPtr(ProcessThread::CreateProcessThread()),
_apiCritPtr(CriticalSectionWrapper::CreateCriticalSection()),
_externalRecording(false), _externalRecording(false),
_externalPlayout(false) _externalPlayout(false)
{ {

View File

@ -23,8 +23,8 @@ namespace voe {
Statistics::Statistics(const WebRtc_UWord32 instanceId) : Statistics::Statistics(const WebRtc_UWord32 instanceId) :
_critPtr(CriticalSectionWrapper::CreateCriticalSection()), _critPtr(CriticalSectionWrapper::CreateCriticalSection()),
_instanceId(instanceId), _instanceId(instanceId),
_isInitialized(false), _lastError(0),
_lastError(0) _isInitialized(false)
{ {
} }

View File

@ -162,18 +162,11 @@ TransmitMixer::Destroy(TransmitMixer*& mixer)
} }
TransmitMixer::TransmitMixer(const WebRtc_UWord32 instanceId) : TransmitMixer::TransmitMixer(const WebRtc_UWord32 instanceId) :
_instanceId(instanceId),
_engineStatisticsPtr(NULL), _engineStatisticsPtr(NULL),
_channelManagerPtr(NULL), _channelManagerPtr(NULL),
_audioProcessingModulePtr(NULL), _audioProcessingModulePtr(NULL),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _voiceEngineObserverPtr(NULL),
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()), _processThreadPtr(NULL),
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
_timeActive(0),
_penaltyCounter(0),
_typingNoiseWarning(0),
#endif
_filePlayerPtr(NULL), _filePlayerPtr(NULL),
_fileRecorderPtr(NULL), _fileRecorderPtr(NULL),
_fileCallRecorderPtr(NULL), _fileCallRecorderPtr(NULL),
@ -185,18 +178,24 @@ TransmitMixer::TransmitMixer(const WebRtc_UWord32 instanceId) :
_filePlaying(false), _filePlaying(false),
_fileRecording(false), _fileRecording(false),
_fileCallRecording(false), _fileCallRecording(false),
_audioLevel(),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
_timeActive(0),
_penaltyCounter(0),
_typingNoiseWarning(0),
#endif
_saturationWarning(0),
_noiseWarning(0),
_instanceId(instanceId),
_mixFileWithMicrophone(false), _mixFileWithMicrophone(false),
_captureLevel(0), _captureLevel(0),
_audioLevel(),
_externalMedia(false), _externalMedia(false),
_externalMediaCallbackPtr(NULL), _externalMediaCallbackPtr(NULL),
_mute(false), _mute(false),
_remainingMuteMicTimeMs(0), _remainingMuteMicTimeMs(0),
_mixingFrequency(0), _mixingFrequency(0),
_voiceEngineObserverPtr(NULL),
_processThreadPtr(NULL),
_saturationWarning(0),
_noiseWarning(0),
_includeAudioLevelIndication(false), _includeAudioLevelIndication(false),
_audioLevel_dBov(100) _audioLevel_dBov(100)
{ {