diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.cc b/talk/app/webrtc/test/fakeaudiocapturemodule.cc index 28dd9fe2dd..934af441dd 100644 --- a/talk/app/webrtc/test/fakeaudiocapturemodule.cc +++ b/talk/app/webrtc/test/fakeaudiocapturemodule.cc @@ -112,11 +112,6 @@ int32_t FakeAudioCaptureModule::Process() { return 0; } -int32_t FakeAudioCaptureModule::ChangeUniqueId(const int32_t /*id*/) { - ASSERT(false); - return 0; -} - int32_t FakeAudioCaptureModule::ActiveAudioLayer( AudioLayer* /*audio_layer*/) const { ASSERT(false); diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.h b/talk/app/webrtc/test/fakeaudiocapturemodule.h index 0428a242a4..1c54a0431d 100644 --- a/talk/app/webrtc/test/fakeaudiocapturemodule.h +++ b/talk/app/webrtc/test/fakeaudiocapturemodule.h @@ -78,7 +78,6 @@ class FakeAudioCaptureModule // PeerConnection an assertion is triggered if it is in fact called. virtual int64_t TimeUntilNextProcess() OVERRIDE; virtual int32_t Process() OVERRIDE; - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const OVERRIDE; diff --git a/talk/media/webrtc/fakewebrtcvideocapturemodule.h b/talk/media/webrtc/fakewebrtcvideocapturemodule.h index e8d254bed6..7085a3d7f4 100644 --- a/talk/media/webrtc/fakewebrtcvideocapturemodule.h +++ b/talk/media/webrtc/fakewebrtcvideocapturemodule.h @@ -52,10 +52,6 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule { virtual int32_t Process() OVERRIDE { return 0; } - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE { - id_ = id; - return 0; - } virtual void RegisterCaptureDataCallback( webrtc::VideoCaptureDataCallback& callback) OVERRIDE { callback_ = &callback; diff --git a/talk/media/webrtc/webrtcpassthroughrender.h b/talk/media/webrtc/webrtcpassthroughrender.h index 5d2c7029e2..af5cb21e82 100644 --- a/talk/media/webrtc/webrtcpassthroughrender.h +++ b/talk/media/webrtc/webrtcpassthroughrender.h @@ -41,10 +41,6 @@ class WebRtcPassthroughRender : public webrtc::VideoRender { WebRtcPassthroughRender(); virtual ~WebRtcPassthroughRender(); - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE { - return 0; - } - virtual int64_t TimeUntilNextProcess() OVERRIDE { return 0; } virtual int32_t Process() OVERRIDE { return 0; } diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc index c9139bdbec..b59d301462 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc @@ -222,22 +222,6 @@ AudioCodingModuleImpl::~AudioCodingModuleImpl() { "Destroyed"); } -int32_t AudioCodingModuleImpl::ChangeUniqueId(const int32_t id) { - { - CriticalSectionScoped lock(acm_crit_sect_); - id_ = id; - - for (int i = 0; i < ACMCodecDB::kMaxNumCodecs; i++) { - if (codecs_[i] != NULL) { - codecs_[i]->SetUniqueID(id); - } - } - } - - receiver_.set_id(id_); - return 0; -} - // Returns the number of milliseconds until the module want a // worker thread to call Process. int64_t AudioCodingModuleImpl::TimeUntilNextProcess() { diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h index d393427342..bbcb0b76be 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h @@ -35,9 +35,6 @@ class AudioCodingModuleImpl : public AudioCodingModule { explicit AudioCodingModuleImpl(const AudioCodingModule::Config& config); ~AudioCodingModuleImpl(); - // Change the unique identifier of this object. - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; - // Returns the number of milliseconds until the module want a worker thread // to call Process. virtual int64_t TimeUntilNextProcess() OVERRIDE; diff --git a/webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h b/webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h index efcd59b415..c9cc6ef719 100644 --- a/webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h +++ b/webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h @@ -40,7 +40,6 @@ public: virtual ~AudioConferenceMixer() {} // Module functions - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0; virtual int64_t TimeUntilNextProcess() OVERRIDE = 0; virtual int32_t Process() OVERRIDE = 0; diff --git a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc index c65cee45db..3ee2a08634 100644 --- a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc +++ b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc @@ -191,11 +191,6 @@ AudioConferenceMixerImpl::~AudioConferenceMixerImpl() { assert(_audioFramePool == NULL); } -int32_t AudioConferenceMixerImpl::ChangeUniqueId(const int32_t id) { - _id = id; - return 0; -} - // Process should be called every kProcessPeriodicityInMs ms int64_t AudioConferenceMixerImpl::TimeUntilNextProcess() { int64_t timeUntilNextProcess = 0; diff --git a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h index 9591e429af..2a37abf599 100644 --- a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h +++ b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h @@ -64,7 +64,6 @@ public: bool Init(); // Module functions - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; virtual int64_t TimeUntilNextProcess() OVERRIDE; virtual int32_t Process() OVERRIDE; diff --git a/webrtc/modules/audio_device/android/audio_record_jni.cc b/webrtc/modules/audio_device/android/audio_record_jni.cc index 6a51bc3621..068678362c 100644 --- a/webrtc/modules/audio_device/android/audio_record_jni.cc +++ b/webrtc/modules/audio_device/android/audio_record_jni.cc @@ -18,6 +18,7 @@ #include "webrtc/modules/audio_device/android/audio_record_jni.h" #include +#include #include #include "webrtc/modules/audio_device/android/audio_common.h" diff --git a/webrtc/modules/audio_device/android/audio_track_jni.cc b/webrtc/modules/audio_device/android/audio_track_jni.cc index f425df0c80..8b6a52dbe5 100644 --- a/webrtc/modules/audio_device/android/audio_track_jni.cc +++ b/webrtc/modules/audio_device/android/audio_track_jni.cc @@ -18,6 +18,7 @@ #include "webrtc/modules/audio_device/android/audio_track_jni.h" #include +#include #include #include "webrtc/modules/audio_device/audio_device_config.h" diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc index a2b09715d7..86bd848b39 100644 --- a/webrtc/modules/audio_device/audio_device_impl.cc +++ b/webrtc/modules/audio_device/audio_device_impl.cc @@ -463,16 +463,6 @@ AudioDeviceModuleImpl::~AudioDeviceModuleImpl() // Module // ============================================================================ -// ---------------------------------------------------------------------------- -// Module::ChangeUniqueId -// ---------------------------------------------------------------------------- - -int32_t AudioDeviceModuleImpl::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - // ---------------------------------------------------------------------------- // Module::TimeUntilNextProcess // diff --git a/webrtc/modules/audio_device/audio_device_impl.h b/webrtc/modules/audio_device/audio_device_impl.h index ab9ddbb33b..010d6439b7 100644 --- a/webrtc/modules/audio_device/audio_device_impl.h +++ b/webrtc/modules/audio_device/audio_device_impl.h @@ -43,7 +43,6 @@ public: virtual ~AudioDeviceModuleImpl(); public: // RefCountedModule - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; virtual int64_t TimeUntilNextProcess() OVERRIDE; virtual int32_t Process() OVERRIDE; diff --git a/webrtc/modules/interface/module.h b/webrtc/modules/interface/module.h index ccaee8bb68..c3e3030397 100644 --- a/webrtc/modules/interface/module.h +++ b/webrtc/modules/interface/module.h @@ -11,51 +11,38 @@ #ifndef MODULES_INTERFACE_MODULE_H_ #define MODULES_INTERFACE_MODULE_H_ -#include - #include "webrtc/typedefs.h" namespace webrtc { class Module { public: - // TODO(henrika): Remove this when chrome is updated. - // DEPRICATED Change the unique identifier of this object. - virtual int32_t ChangeUniqueId(const int32_t id) { return 0; } - - // Returns the number of milliseconds until the module want a worker + // Returns the number of milliseconds until the module wants a worker // thread to call Process. + // This method is called on the same worker thread as Process will + // be called on. virtual int64_t TimeUntilNextProcess() = 0; // Process any pending tasks such as timeouts. + // Called on a worker thread. virtual int32_t Process() = 0; protected: virtual ~Module() {} }; -// Reference counted version of the module interface. +// Reference counted version of the Module interface. class RefCountedModule : public Module { public: // Increase the reference count by one. // Returns the incremented reference count. - // TODO(perkj): Make this pure virtual when Chromium have implemented - // reference counting ADM and Video capture module. - virtual int32_t AddRef() { - assert(false && "Not implemented."); - return 1; - } + virtual int32_t AddRef() = 0; // Decrease the reference count by one. // Returns the decreased reference count. // Returns 0 if the last reference was just released. - // When the reference count reach 0 the object will self-destruct. - // TODO(perkj): Make this pure virtual when Chromium have implemented - // reference counting ADM and Video capture module. - virtual int32_t Release() { - assert(false && "Not implemented."); - return 1; - } + // When the reference count reaches 0 the object will self-destruct. + virtual int32_t Release() = 0; protected: virtual ~RefCountedModule() {} diff --git a/webrtc/modules/media_file/interface/media_file.h b/webrtc/modules/media_file/interface/media_file.h index 3fb849f259..0179ee6330 100644 --- a/webrtc/modules/media_file/interface/media_file.h +++ b/webrtc/modules/media_file/interface/media_file.h @@ -26,9 +26,6 @@ public: static MediaFile* CreateMediaFile(const int32_t id); static void DestroyMediaFile(MediaFile* module); - // Set the MediaFile instance identifier. - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0; - // Put 10-60ms of audio data from file into the audioBuffer depending on // codec frame size. dataLengthInBytes is both an input and output // parameter. As input parameter it indicates the size of audioBuffer. diff --git a/webrtc/modules/media_file/source/media_file_impl.cc b/webrtc/modules/media_file/source/media_file_impl.cc index b669ab6bcb..60aeefe617 100644 --- a/webrtc/modules/media_file/source/media_file_impl.cc +++ b/webrtc/modules/media_file/source/media_file_impl.cc @@ -85,12 +85,6 @@ MediaFileImpl::~MediaFileImpl() delete _callbackCrit; } -int32_t MediaFileImpl::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - int64_t MediaFileImpl::TimeUntilNextProcess() { WEBRTC_TRACE( diff --git a/webrtc/modules/media_file/source/media_file_impl.h b/webrtc/modules/media_file/source/media_file_impl.h index 17391a5049..388da348ca 100644 --- a/webrtc/modules/media_file/source/media_file_impl.h +++ b/webrtc/modules/media_file/source/media_file_impl.h @@ -26,7 +26,6 @@ public: MediaFileImpl(const int32_t id); ~MediaFileImpl(); - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; virtual int32_t Process() OVERRIDE; virtual int64_t TimeUntilNextProcess() OVERRIDE; diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h index 4ded6d0c42..3ce74147f3 100644 --- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -32,8 +32,6 @@ class MockRtpData : public RtpData { class MockRtpRtcp : public RtpRtcp { public: - MOCK_METHOD1(ChangeUniqueId, - int32_t(const int32_t id)); MOCK_METHOD1(RegisterDefaultModule, int32_t(RtpRtcp* module)); MOCK_METHOD0(DeRegisterDefaultModule, diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc index 95ba287b5b..8dc728c184 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc @@ -30,7 +30,6 @@ const int kRrTimeoutIntervals = 3; RTCPReceiver::RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner) : TMMBRHelp(), - _id(id), _clock(clock), _method(kRtcpOff), _lastReceived(0), @@ -84,10 +83,6 @@ RTCPReceiver::~RTCPReceiver() { } } -void RTCPReceiver::ChangeUniqueId(int32_t id) { - _id = id; -} - RTCPMethod RTCPReceiver::Status() const { CriticalSectionScoped lock(_criticalSectionRTCPReceiver); return _method; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h index f8fd2e85d8..a52e8101d6 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h @@ -32,8 +32,6 @@ public: RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner); virtual ~RTCPReceiver(); - void ChangeUniqueId(int32_t id); - RTCPMethod Status() const; void SetRTCPStatus(RTCPMethod method); @@ -233,7 +231,6 @@ protected: uint32_t remote_ssrc, uint32_t source_ssrc) const EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); - int32_t _id; Clock* _clock; RTCPMethod _method; int64_t _lastReceived; diff --git a/webrtc/modules/video_capture/video_capture_impl.cc b/webrtc/modules/video_capture/video_capture_impl.cc index 16b2b458c2..d7a6642044 100644 --- a/webrtc/modules/video_capture/video_capture_impl.cc +++ b/webrtc/modules/video_capture/video_capture_impl.cc @@ -82,12 +82,6 @@ int32_t VideoCaptureImpl::RotationInDegrees(VideoCaptureRotation rotation, return -1; } -int32_t VideoCaptureImpl::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - // returns the number of milliseconds until the module want a worker thread to call Process int64_t VideoCaptureImpl::TimeUntilNextProcess() { diff --git a/webrtc/modules/video_capture/video_capture_impl.h b/webrtc/modules/video_capture/video_capture_impl.h index 6f0291e454..75fe7e5bae 100644 --- a/webrtc/modules/video_capture/video_capture_impl.h +++ b/webrtc/modules/video_capture/video_capture_impl.h @@ -58,9 +58,6 @@ public: static int32_t RotationInDegrees(VideoCaptureRotation rotation, int* degrees); - // Implements Module declared functions. - virtual int32_t ChangeUniqueId(const int32_t id); - //Call backs virtual void RegisterCaptureDataCallback( VideoCaptureDataCallback& dataCallback); diff --git a/webrtc/modules/video_processing/main/source/brightness_detection.cc b/webrtc/modules/video_processing/main/source/brightness_detection.cc index f33117d137..77cdc52cee 100644 --- a/webrtc/modules/video_processing/main/source/brightness_detection.cc +++ b/webrtc/modules/video_processing/main/source/brightness_detection.cc @@ -15,18 +15,12 @@ namespace webrtc { -VPMBrightnessDetection::VPMBrightnessDetection() : - id_(0) { +VPMBrightnessDetection::VPMBrightnessDetection() { Reset(); } VPMBrightnessDetection::~VPMBrightnessDetection() {} -int32_t VPMBrightnessDetection::ChangeUniqueId(const int32_t id) { - id_ = id; - return VPM_OK; -} - void VPMBrightnessDetection::Reset() { frame_cnt_bright_ = 0; frame_cnt_dark_ = 0; diff --git a/webrtc/modules/video_processing/main/source/brightness_detection.h b/webrtc/modules/video_processing/main/source/brightness_detection.h index dcb366b8bf..f2600c0bfe 100644 --- a/webrtc/modules/video_processing/main/source/brightness_detection.h +++ b/webrtc/modules/video_processing/main/source/brightness_detection.h @@ -22,15 +22,12 @@ class VPMBrightnessDetection { public: VPMBrightnessDetection(); ~VPMBrightnessDetection(); - int32_t ChangeUniqueId(int32_t id); void Reset(); int32_t ProcessFrame(const I420VideoFrame& frame, const VideoProcessingModule::FrameStats& stats); private: - int32_t id_; - uint32_t frame_cnt_bright_; uint32_t frame_cnt_dark_; }; diff --git a/webrtc/modules/video_processing/main/source/deflickering.cc b/webrtc/modules/video_processing/main/source/deflickering.cc index 95755c22ef..d845dbbea0 100644 --- a/webrtc/modules/video_processing/main/source/deflickering.cc +++ b/webrtc/modules/video_processing/main/source/deflickering.cc @@ -51,18 +51,12 @@ const uint16_t VPMDeflickering::prob_uw16_[kNumProbs] = {102, 205, 410, 614, const uint16_t VPMDeflickering::weight_uw16_[kNumQuants - kMaxOnlyLength] = {16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720, 32768}; // -VPMDeflickering::VPMDeflickering() - : id_(0) { +VPMDeflickering::VPMDeflickering() { Reset(); } VPMDeflickering::~VPMDeflickering() {} -int32_t VPMDeflickering::ChangeUniqueId(const int32_t id) { - id_ = id; - return 0; -} - void VPMDeflickering::Reset() { mean_buffer_length_ = 0; detection_state_ = 0; diff --git a/webrtc/modules/video_processing/main/source/deflickering.h b/webrtc/modules/video_processing/main/source/deflickering.h index 53ffebed5f..aeb4fe6a78 100644 --- a/webrtc/modules/video_processing/main/source/deflickering.h +++ b/webrtc/modules/video_processing/main/source/deflickering.h @@ -23,8 +23,6 @@ class VPMDeflickering { VPMDeflickering(); ~VPMDeflickering(); - int32_t ChangeUniqueId(int32_t id); - void Reset(); int32_t ProcessFrame(I420VideoFrame* frame, VideoProcessingModule::FrameStats* stats); @@ -41,8 +39,6 @@ class VPMDeflickering { enum { kNumQuants = kNumProbs + 2 }; enum { kMaxOnlyLength = 5 }; - int32_t id_; - uint32_t mean_buffer_length_; uint8_t detection_state_; // 0: No flickering // 1: Flickering detected diff --git a/webrtc/modules/video_processing/main/source/frame_preprocessor.cc b/webrtc/modules/video_processing/main/source/frame_preprocessor.cc index e1cd04ff71..6eff69c041 100644 --- a/webrtc/modules/video_processing/main/source/frame_preprocessor.cc +++ b/webrtc/modules/video_processing/main/source/frame_preprocessor.cc @@ -13,8 +13,7 @@ namespace webrtc { VPMFramePreprocessor::VPMFramePreprocessor() - : id_(0), - content_metrics_(NULL), + : content_metrics_(NULL), resampled_frame_(), enable_ca_(false), frame_cnt_(0) { @@ -30,11 +29,6 @@ VPMFramePreprocessor::~VPMFramePreprocessor() { delete vd_; } -int32_t VPMFramePreprocessor::ChangeUniqueId(const int32_t id) { - id_ = id; - return VPM_OK; -} - void VPMFramePreprocessor::Reset() { ca_->Release(); vd_->Reset(); diff --git a/webrtc/modules/video_processing/main/source/frame_preprocessor.h b/webrtc/modules/video_processing/main/source/frame_preprocessor.h index 64a5797b9b..44c057b56a 100644 --- a/webrtc/modules/video_processing/main/source/frame_preprocessor.h +++ b/webrtc/modules/video_processing/main/source/frame_preprocessor.h @@ -27,8 +27,6 @@ class VPMFramePreprocessor { VPMFramePreprocessor(); ~VPMFramePreprocessor(); - int32_t ChangeUniqueId(const int32_t id); - void Reset(); // Enable temporal decimation. @@ -63,7 +61,6 @@ class VPMFramePreprocessor { // we can compute new content metrics every |kSkipFrameCA| frames. enum { kSkipFrameCA = 2 }; - int32_t id_; VideoContentMetrics* content_metrics_; I420VideoFrame resampled_frame_; VPMSpatialResampler* spatial_resampler_; diff --git a/webrtc/modules/video_processing/main/source/video_processing_impl.cc b/webrtc/modules/video_processing/main/source/video_processing_impl.cc index 8bc5bf0da1..6e7808ede3 100644 --- a/webrtc/modules/video_processing/main/source/video_processing_impl.cc +++ b/webrtc/modules/video_processing/main/source/video_processing_impl.cc @@ -46,26 +46,8 @@ void VideoProcessingModule::Destroy(VideoProcessingModule* module) { delete static_cast(module); } -int32_t VideoProcessingModuleImpl::ChangeUniqueId(const int32_t id) { - CriticalSectionScoped mutex(&mutex_); - id_ = id; - brightness_detection_.ChangeUniqueId(id); - deflickering_.ChangeUniqueId(id); - frame_pre_processor_.ChangeUniqueId(id); - return VPM_OK; -} - -int32_t VideoProcessingModuleImpl::Id() const { - CriticalSectionScoped mutex(&mutex_); - return id_; -} - VideoProcessingModuleImpl::VideoProcessingModuleImpl(const int32_t id) - : id_(id), - mutex_(*CriticalSectionWrapper::CreateCriticalSection()) { - brightness_detection_.ChangeUniqueId(id); - deflickering_.ChangeUniqueId(id); - frame_pre_processor_.ChangeUniqueId(id); + : mutex_(*CriticalSectionWrapper::CreateCriticalSection()) { } VideoProcessingModuleImpl::~VideoProcessingModuleImpl() { diff --git a/webrtc/modules/video_processing/main/source/video_processing_impl.h b/webrtc/modules/video_processing/main/source/video_processing_impl.h index 95e41bd48f..69dcec4e12 100644 --- a/webrtc/modules/video_processing/main/source/video_processing_impl.h +++ b/webrtc/modules/video_processing/main/source/video_processing_impl.h @@ -27,10 +27,6 @@ class VideoProcessingModuleImpl : public VideoProcessingModule { virtual ~VideoProcessingModuleImpl(); - int32_t Id() const; - - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; - virtual void Reset() OVERRIDE; virtual int32_t Deflickering(I420VideoFrame* frame, @@ -70,11 +66,10 @@ class VideoProcessingModuleImpl : public VideoProcessingModule { virtual VideoContentMetrics* ContentMetrics() const OVERRIDE; private: - int32_t id_; CriticalSectionWrapper& mutex_; VPMDeflickering deflickering_; VPMBrightnessDetection brightness_detection_; - VPMFramePreprocessor frame_pre_processor_; + VPMFramePreprocessor frame_pre_processor_; }; } // namespace diff --git a/webrtc/modules/video_render/android/video_render_android_impl.cc b/webrtc/modules/video_render/android/video_render_android_impl.cc index 20694b6565..485df8a426 100644 --- a/webrtc/modules/video_render/android/video_render_android_impl.cc +++ b/webrtc/modules/video_render/android/video_render_android_impl.cc @@ -70,13 +70,6 @@ VideoRenderAndroid::~VideoRenderAndroid() { delete &_critSect; } -int32_t VideoRenderAndroid::ChangeUniqueId(const int32_t id) { - CriticalSectionScoped cs(&_critSect); - _id = id; - - return 0; -} - int32_t VideoRenderAndroid::ChangeWindow(void* /*window*/) { return -1; } diff --git a/webrtc/modules/video_render/android/video_render_android_impl.h b/webrtc/modules/video_render/android/video_render_android_impl.h index 1541148a6c..6d58c56b4c 100644 --- a/webrtc/modules/video_render/android/video_render_android_impl.h +++ b/webrtc/modules/video_render/android/video_render_android_impl.h @@ -49,8 +49,6 @@ class VideoRenderAndroid: IVideoRender { virtual int32_t Init()=0; - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); virtual VideoRenderCallback* AddIncomingRenderStream( diff --git a/webrtc/modules/video_render/external/video_render_external_impl.cc b/webrtc/modules/video_render/external/video_render_external_impl.cc index 7a590bef6f..04ae205b17 100644 --- a/webrtc/modules/video_render/external/video_render_external_impl.cc +++ b/webrtc/modules/video_render/external/video_render_external_impl.cc @@ -17,8 +17,8 @@ VideoRenderExternalImpl::VideoRenderExternalImpl( const VideoRenderType videoRenderType, void* window, const bool fullscreen) : - _id(id), _critSect(*CriticalSectionWrapper::CreateCriticalSection()), - _fullscreen(fullscreen) + _critSect(*CriticalSectionWrapper::CreateCriticalSection()), + _fullscreen(fullscreen) { } @@ -32,13 +32,6 @@ int32_t VideoRenderExternalImpl::Init() return 0; } -int32_t VideoRenderExternalImpl::ChangeUniqueId(const int32_t id) -{ - CriticalSectionScoped cs(&_critSect); - _id = id; - return 0; -} - int32_t VideoRenderExternalImpl::ChangeWindow(void* window) { CriticalSectionScoped cs(&_critSect); diff --git a/webrtc/modules/video_render/external/video_render_external_impl.h b/webrtc/modules/video_render/external/video_render_external_impl.h index 46ad739abd..e83d842d11 100644 --- a/webrtc/modules/video_render/external/video_render_external_impl.h +++ b/webrtc/modules/video_render/external/video_render_external_impl.h @@ -33,8 +33,6 @@ public: virtual int32_t Init(); - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); /************************************************************************** @@ -120,7 +118,6 @@ public: I420VideoFrame& videoFrame); private: - int32_t _id; CriticalSectionWrapper& _critSect; bool _fullscreen; }; diff --git a/webrtc/modules/video_render/i_video_render.h b/webrtc/modules/video_render/i_video_render.h index 86e364377e..ff1cce782e 100644 --- a/webrtc/modules/video_render/i_video_render.h +++ b/webrtc/modules/video_render/i_video_render.h @@ -23,14 +23,10 @@ public: * Constructor/destructor */ - virtual ~IVideoRender() - { - }; + virtual ~IVideoRender() {} virtual int32_t Init() = 0; - virtual int32_t ChangeUniqueId(const int32_t id) = 0; - virtual int32_t ChangeWindow(void* window) = 0; /************************************************************************** diff --git a/webrtc/modules/video_render/include/video_render.h b/webrtc/modules/video_render/include/video_render.h index 772395058e..494c3f3268 100644 --- a/webrtc/modules/video_render/include/video_render.h +++ b/webrtc/modules/video_render/include/video_render.h @@ -52,13 +52,6 @@ public: */ static void DestroyVideoRender(VideoRender* module); - /* - * Change the unique identifier of this object - * - * id - new unique identifier of this video render module object - */ - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0; - virtual int64_t TimeUntilNextProcess() OVERRIDE = 0; virtual int32_t Process() OVERRIDE = 0; diff --git a/webrtc/modules/video_render/ios/video_render_ios_gles20.h b/webrtc/modules/video_render/ios/video_render_ios_gles20.h index ef91e71a92..c4d87f027f 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_gles20.h +++ b/webrtc/modules/video_render/ios/video_render_ios_gles20.h @@ -51,7 +51,6 @@ class VideoRenderIosGles20 { const float bottom); int ChangeWindow(void* new_window); - int ChangeUniqueID(int unique_id); int StartRender(); int StopRender(); @@ -81,7 +80,6 @@ class VideoRenderIosGles20 { std::multimap z_order_to_channel_; EAGLContext* gles_context_; bool is_rendering_; - int id_; }; } // namespace webrtc diff --git a/webrtc/modules/video_render/ios/video_render_ios_gles20.mm b/webrtc/modules/video_render/ios/video_render_ios_gles20.mm index bbada099ed..f97ababdbe 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_gles20.mm +++ b/webrtc/modules/video_render/ios/video_render_ios_gles20.mm @@ -33,8 +33,7 @@ VideoRenderIosGles20::VideoRenderIosGles20(VideoRenderIosView* view, agl_channels_(), z_order_to_channel_(), gles_context_([view context]), - is_rendering_(true), - id_(render_id) { + is_rendering_(true) { screen_update_thread_ = ThreadWrapper::CreateThread( ScreenUpdateThreadProc, this, kRealtimePriority); screen_update_event_ = EventWrapper::Create(); @@ -255,14 +254,6 @@ int VideoRenderIosGles20::ChangeWindow(void* new_window) { return 0; } -int VideoRenderIosGles20::ChangeUniqueID(int unique_id) { - CriticalSectionScoped cs(gles_crit_sec_.get()); - - id_ = unique_id; - - return 0; -} - int VideoRenderIosGles20::StartRender() { is_rendering_ = true; return 0; diff --git a/webrtc/modules/video_render/ios/video_render_ios_impl.h b/webrtc/modules/video_render/ios/video_render_ios_impl.h index e38ed7ae4b..fdcfe3445c 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_impl.h +++ b/webrtc/modules/video_render/ios/video_render_ios_impl.h @@ -31,7 +31,6 @@ class VideoRenderIosImpl : IVideoRender { // Implementation of IVideoRender. int32_t Init() OVERRIDE; - int32_t ChangeUniqueId(const int32_t id) OVERRIDE; int32_t ChangeWindow(void* window) OVERRIDE; VideoRenderCallback* AddIncomingRenderStream(const uint32_t stream_id, diff --git a/webrtc/modules/video_render/ios/video_render_ios_impl.mm b/webrtc/modules/video_render/ios/video_render_ios_impl.mm index 9b8e1d6243..49bae089a7 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_impl.mm +++ b/webrtc/modules/video_render/ios/video_render_ios_impl.mm @@ -49,13 +49,6 @@ int32_t VideoRenderIosImpl::Init() { ; } -int32_t VideoRenderIosImpl::ChangeUniqueId(const int32_t id) { - CriticalSectionScoped cs(crit_sec_); - id_ = id; - - return ptr_ios_render_->ChangeUniqueID(id_); -} - int32_t VideoRenderIosImpl::ChangeWindow(void* window) { CriticalSectionScoped cs(crit_sec_); if (window == NULL) { diff --git a/webrtc/modules/video_render/linux/video_render_linux_impl.cc b/webrtc/modules/video_render/linux/video_render_linux_impl.cc index c961780531..af0e9acb9b 100644 --- a/webrtc/modules/video_render/linux/video_render_linux_impl.cc +++ b/webrtc/modules/video_render/linux/video_render_linux_impl.cc @@ -61,14 +61,6 @@ int32_t VideoRenderLinuxImpl::Init() } -int32_t VideoRenderLinuxImpl::ChangeUniqueId(const int32_t id) -{ - CriticalSectionScoped cs(&_renderLinuxCritsect); - - _id = id; - return 0; -} - int32_t VideoRenderLinuxImpl::ChangeWindow(void* window) { WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s", diff --git a/webrtc/modules/video_render/linux/video_render_linux_impl.h b/webrtc/modules/video_render/linux/video_render_linux_impl.h index 0ee0d578b3..0e9ae54c18 100644 --- a/webrtc/modules/video_render/linux/video_render_linux_impl.h +++ b/webrtc/modules/video_render/linux/video_render_linux_impl.h @@ -34,8 +34,6 @@ public: virtual int32_t Init(); - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); /************************************************************************** diff --git a/webrtc/modules/video_render/mac/video_render_agl.cc b/webrtc/modules/video_render/mac/video_render_agl.cc index edaae973b4..5b87794503 100644 --- a/webrtc/modules/video_render/mac/video_render_agl.cc +++ b/webrtc/modules/video_render/mac/video_render_agl.cc @@ -554,7 +554,7 @@ _threadID( ) #endif -#ifdef NEW_HIVIEW_EVENT_HANDLER +#ifdef NEW_HIVIEW_EVENT_HANDLER //WEBRTC_TRACE(kTraceDebug, "%s:%d Installing Eventhandler for hiviewRef", __FUNCTION__, __LINE__); static const EventTypeSpec hiviewEventTypes[] = @@ -668,7 +668,7 @@ VideoRenderAGL::~VideoRenderAGL() } #endif -#ifdef NEW_HIVIEW_EVENT_HANDLER +#ifdef NEW_HIVIEW_EVENT_HANDLER if(_hiviewEventHandlerRef) { status = RemoveEventHandler(_hiviewEventHandlerRef); @@ -1278,7 +1278,7 @@ int VideoRenderAGL::CreateMixingContext() //WEBRTC_LOG(kTraceDebug, "Entering CreateMixingContext()"); - // Use both AGL_ACCELERATED and AGL_NO_RECOVERY to make sure + // Use both AGL_ACCELERATED and AGL_NO_RECOVERY to make sure // a hardware renderer is used and not a software renderer. GLint attributes[] = @@ -1872,13 +1872,6 @@ int VideoRenderAGL::ChangeWindow(void* newWindowRef) UnlockAGLCntx(); return -1; } -int32_t VideoRenderAGL::ChangeUniqueID(int32_t id) -{ - LockAGLCntx(); - - UnlockAGLCntx(); - return -1; -} int32_t VideoRenderAGL::StartRender() { diff --git a/webrtc/modules/video_render/mac/video_render_agl.h b/webrtc/modules/video_render/mac/video_render_agl.h index 5336705a8d..1520b1eb0f 100644 --- a/webrtc/modules/video_render/mac/video_render_agl.h +++ b/webrtc/modules/video_render/mac/video_render_agl.h @@ -110,7 +110,6 @@ class VideoRenderAGL { // ********** new module functions ************ // int ChangeWindow(void* newWindowRef); - int32_t ChangeUniqueID(int32_t id); int32_t StartRender(); int32_t StopRender(); int32_t DeleteAGLChannel(const uint32_t streamID); diff --git a/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.cc b/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.cc index 66b4906951..dbb09a35f5 100644 --- a/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.cc +++ b/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.cc @@ -96,23 +96,6 @@ VideoRenderMacCarbonImpl::Init() return 0; } -int32_t -VideoRenderMacCarbonImpl::ChangeUniqueId(const int32_t id) -{ - return -1; - - CriticalSectionScoped cs(&_renderMacCarbonCritsect); - WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s", __FUNCTION__); - _id = id; - - if(_ptrCarbonRender) - { - _ptrCarbonRender->ChangeUniqueID(_id); - } - - return 0; -} - int32_t VideoRenderMacCarbonImpl::ChangeWindow(void* window) { diff --git a/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h b/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h index 245476a1f0..9ad3a6cdd1 100644 --- a/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h +++ b/webrtc/modules/video_render/mac/video_render_mac_carbon_impl.h @@ -38,8 +38,6 @@ public: virtual int32_t Init(); - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); /************************************************************************** diff --git a/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h b/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h index 33e4289191..21add272bb 100644 --- a/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h +++ b/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.h @@ -38,8 +38,6 @@ public: virtual int32_t Init(); - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); /************************************************************************** diff --git a/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.mm b/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.mm index bdab72bd27..561d71fc37 100644 --- a/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.mm +++ b/webrtc/modules/video_render/mac/video_render_mac_cocoa_impl.mm @@ -67,21 +67,6 @@ VideoRenderMacCocoaImpl::Init() return 0; } -int32_t -VideoRenderMacCocoaImpl::ChangeUniqueId(const int32_t id) -{ - CriticalSectionScoped cs(&_renderMacCocoaCritsect); - WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s", __FUNCTION__); - _id = id; - - if(_ptrCocoaRender) - { - _ptrCocoaRender->ChangeUniqueID(_id); - } - - return 0; -} - int32_t VideoRenderMacCocoaImpl::ChangeWindow(void* window) { diff --git a/webrtc/modules/video_render/mac/video_render_nsopengl.h b/webrtc/modules/video_render/mac/video_render_nsopengl.h index 90e3d3f075..66887f8154 100644 --- a/webrtc/modules/video_render/mac/video_render_nsopengl.h +++ b/webrtc/modules/video_render/mac/video_render_nsopengl.h @@ -78,7 +78,7 @@ public: private: NSOpenGLContext* _nsglContext; - int _id; + const int _id; VideoRenderNSOpenGL* _owner; int32_t _width; int32_t _height; @@ -125,7 +125,6 @@ public: // methods // ********** new module functions ************ // int ChangeWindow(CocoaRenderView* newWindowRef); - int32_t ChangeUniqueID(int32_t id); int32_t StartRender(); int32_t StopRender(); int32_t DeleteNSGLChannel(const uint32_t streamID); diff --git a/webrtc/modules/video_render/mac/video_render_nsopengl.mm b/webrtc/modules/video_render/mac/video_render_nsopengl.mm index 39ed95aa19..a4a90a39c5 100644 --- a/webrtc/modules/video_render/mac/video_render_nsopengl.mm +++ b/webrtc/modules/video_render/mac/video_render_nsopengl.mm @@ -1176,14 +1176,6 @@ int VideoRenderNSOpenGL::GetWindowRect(Rect& rect) } } -int32_t VideoRenderNSOpenGL::ChangeUniqueID(int32_t id) -{ - - CriticalSectionScoped cs(&_nsglContextCritSec); - _id = id; - return 0; -} - int32_t VideoRenderNSOpenGL::SetText(const uint8_t /*textId*/, const uint8_t* /*text*/, const int32_t /*textLength*/, diff --git a/webrtc/modules/video_render/video_render_impl.cc b/webrtc/modules/video_render/video_render_impl.cc index bcf9d81902..409bbf44f6 100644 --- a/webrtc/modules/video_render/video_render_impl.cc +++ b/webrtc/modules/video_render/video_render_impl.cc @@ -114,21 +114,6 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl() } } -int32_t ModuleVideoRenderImpl::ChangeUniqueId(const int32_t id) -{ - - CriticalSectionScoped cs(&_moduleCrit); - - _id = id; - - if (_ptrRenderer) - { - _ptrRenderer->ChangeUniqueId(_id); - } - - return 0; -} - int64_t ModuleVideoRenderImpl::TimeUntilNextProcess() { // Not used diff --git a/webrtc/modules/video_render/video_render_impl.h b/webrtc/modules/video_render/video_render_impl.h index cf0265291e..de0ecd22a4 100644 --- a/webrtc/modules/video_render/video_render_impl.h +++ b/webrtc/modules/video_render/video_render_impl.h @@ -34,11 +34,6 @@ public: virtual ~ModuleVideoRenderImpl(); - /* - * Change the unique identifier of this object - */ - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int64_t TimeUntilNextProcess(); virtual int32_t Process(); diff --git a/webrtc/modules/video_render/video_render_internal_impl.cc b/webrtc/modules/video_render/video_render_internal_impl.cc index 963cd11d94..902a4842e4 100644 --- a/webrtc/modules/video_render/video_render_internal_impl.cc +++ b/webrtc/modules/video_render/video_render_internal_impl.cc @@ -294,21 +294,6 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl() } } -int32_t ModuleVideoRenderImpl::ChangeUniqueId(const int32_t id) -{ - - CriticalSectionScoped cs(&_moduleCrit); - - _id = id; - - if (_ptrRenderer) - { - _ptrRenderer->ChangeUniqueId(_id); - } - - return 0; -} - int64_t ModuleVideoRenderImpl::TimeUntilNextProcess() { // Not used diff --git a/webrtc/modules/video_render/windows/video_render_windows_impl.cc b/webrtc/modules/video_render/windows/video_render_windows_impl.cc index 7b5f763b42..38d897c0d3 100644 --- a/webrtc/modules/video_render/windows/video_render_windows_impl.cc +++ b/webrtc/modules/video_render/windows/video_render_windows_impl.cc @@ -23,8 +23,7 @@ namespace webrtc { VideoRenderWindowsImpl::VideoRenderWindowsImpl(const int32_t id, const VideoRenderType videoRenderType, void* window, const bool fullscreen) - : _id(id), - _renderWindowsCritsect(*CriticalSectionWrapper::CreateCriticalSection()), + : _renderWindowsCritsect(*CriticalSectionWrapper::CreateCriticalSection()), _prtWindow(window), _fullscreen(fullscreen), _renderMethod(kVideoRenderWinD3D9), @@ -72,13 +71,6 @@ int32_t VideoRenderWindowsImpl::Init() return -1; } -int32_t VideoRenderWindowsImpl::ChangeUniqueId(const int32_t id) -{ - CriticalSectionScoped cs(&_renderWindowsCritsect); - _id = id; - return 0; -} - int32_t VideoRenderWindowsImpl::ChangeWindow(void* window) { CriticalSectionScoped cs(&_renderWindowsCritsect); diff --git a/webrtc/modules/video_render/windows/video_render_windows_impl.h b/webrtc/modules/video_render/windows/video_render_windows_impl.h index 703e1660dc..aaa3f81fc7 100644 --- a/webrtc/modules/video_render/windows/video_render_windows_impl.h +++ b/webrtc/modules/video_render/windows/video_render_windows_impl.h @@ -42,8 +42,6 @@ public: virtual int32_t Init(); - virtual int32_t ChangeUniqueId(const int32_t id); - virtual int32_t ChangeWindow(void* window); /************************************************************************** @@ -125,7 +123,6 @@ public: const float right, const float bottom); private: - int32_t _id; CriticalSectionWrapper& _renderWindowsCritsect; void* _prtWindow; diff --git a/webrtc/test/channel_transport/traffic_control_win.cc b/webrtc/test/channel_transport/traffic_control_win.cc index 103412f0ba..9aeda75b03 100644 --- a/webrtc/test/channel_transport/traffic_control_win.cc +++ b/webrtc/test/channel_transport/traffic_control_win.cc @@ -20,7 +20,7 @@ namespace test { TrafficControlWindows* TrafficControlWindows::instance = NULL; uint32_t TrafficControlWindows::refCounter = 0; -TrafficControlWindows::TrafficControlWindows(const int32_t id) : _id(id) +TrafficControlWindows::TrafficControlWindows(const int32_t id) { } @@ -154,22 +154,17 @@ void TrafficControlWindows::Release(TrafficControlWindows* gtc) return; } - WEBRTC_TRACE(kTraceDebug, kTraceTransport, gtc->_id, + WEBRTC_TRACE(kTraceDebug, kTraceTransport, -1, "TrafficControlWindows - Releasing object"); refCounter--; if ((0 == refCounter) && instance) { - WEBRTC_TRACE(kTraceMemory, kTraceTransport, gtc->_id, + WEBRTC_TRACE(kTraceMemory, kTraceTransport, -1, "TrafficControlWindows - Deleting object"); delete instance; instance = NULL; } } -int32_t TrafficControlWindows::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} ULONG TrafficControlWindows::TcRegisterClient( ULONG TciVersion, diff --git a/webrtc/test/channel_transport/traffic_control_win.h b/webrtc/test/channel_transport/traffic_control_win.h index 63085cf0a9..acd625ffdc 100644 --- a/webrtc/test/channel_transport/traffic_control_win.h +++ b/webrtc/test/channel_transport/traffic_control_win.h @@ -49,8 +49,6 @@ class TrafficControlWindows static TrafficControlWindows* GetInstance(const int32_t id); static void Release(TrafficControlWindows* gtc); - int32_t ChangeUniqueId(const int32_t id); - ULONG TcRegisterClient(ULONG TciVersion, HANDLE ClRegCtx, PTCI_CLIENT_FUNC_LIST ClientHandlerList, PHANDLE pClientHandle); @@ -75,7 +73,6 @@ class TrafficControlWindows ULONG TcDeleteFilter(HANDLE FilterHandle); private: TrafficControlWindows(const int32_t id); - int32_t _id; TCI_CLIENT_FUNC_LIST QoSFunctions; static TrafficControlWindows* instance; diff --git a/webrtc/test/channel_transport/udp_socket2_manager_win.cc b/webrtc/test/channel_transport/udp_socket2_manager_win.cc index bfab51e6c4..695c866dfa 100644 --- a/webrtc/test/channel_transport/udp_socket2_manager_win.cc +++ b/webrtc/test/channel_transport/udp_socket2_manager_win.cc @@ -108,12 +108,6 @@ bool UdpSocket2ManagerWindows::Init(int32_t id, return true; } -int32_t UdpSocket2ManagerWindows::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - bool UdpSocket2ManagerWindows::Start() { WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id, diff --git a/webrtc/test/channel_transport/udp_socket2_manager_win.h b/webrtc/test/channel_transport/udp_socket2_manager_win.h index d3b8aed2d3..42c45113d4 100644 --- a/webrtc/test/channel_transport/udp_socket2_manager_win.h +++ b/webrtc/test/channel_transport/udp_socket2_manager_win.h @@ -120,7 +120,6 @@ public: virtual ~UdpSocket2ManagerWindows(); virtual bool Init(int32_t id, uint8_t& numOfWorkThreads); - virtual int32_t ChangeUniqueId(const int32_t id); virtual bool Start(); virtual bool Stop(); diff --git a/webrtc/test/channel_transport/udp_socket2_win.cc b/webrtc/test/channel_transport/udp_socket2_win.cc index 1d5234c165..6bcb551012 100644 --- a/webrtc/test/channel_transport/udp_socket2_win.cc +++ b/webrtc/test/channel_transport/udp_socket2_win.cc @@ -216,16 +216,6 @@ UdpSocket2Windows::~UdpSocket2Windows() } } -int32_t UdpSocket2Windows::ChangeUniqueId(const int32_t id) -{ - _id = id; - if (_gtc) - { - _gtc->ChangeUniqueId(id); - } - return 0; -} - bool UdpSocket2Windows::ValidHandle() { return GetFd() != INVALID_SOCKET; diff --git a/webrtc/test/channel_transport/udp_socket2_win.h b/webrtc/test/channel_transport/udp_socket2_win.h index 7dec1eda99..697115440e 100644 --- a/webrtc/test/channel_transport/udp_socket2_win.h +++ b/webrtc/test/channel_transport/udp_socket2_win.h @@ -42,8 +42,6 @@ public: bool ipV6Enable = false, bool disableGQOS = false); virtual ~UdpSocket2Windows(); - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; - virtual bool ValidHandle() OVERRIDE; virtual bool SetCallback(CallbackObj, IncomingSocketCallback) OVERRIDE; diff --git a/webrtc/test/channel_transport/udp_socket_manager_posix.cc b/webrtc/test/channel_transport/udp_socket_manager_posix.cc index 1e13475ac4..ad6ffa4a5c 100644 --- a/webrtc/test/channel_transport/udp_socket_manager_posix.cc +++ b/webrtc/test/channel_transport/udp_socket_manager_posix.cc @@ -73,12 +73,6 @@ UdpSocketManagerPosix::~UdpSocketManagerPosix() delete _critSect; } -int32_t UdpSocketManagerPosix::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - bool UdpSocketManagerPosix::Start() { WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id, diff --git a/webrtc/test/channel_transport/udp_socket_manager_posix.h b/webrtc/test/channel_transport/udp_socket_manager_posix.h index cbcb47967f..478d76bc60 100644 --- a/webrtc/test/channel_transport/udp_socket_manager_posix.h +++ b/webrtc/test/channel_transport/udp_socket_manager_posix.h @@ -40,8 +40,6 @@ public: virtual bool Init(int32_t id, uint8_t& numOfWorkThreads) OVERRIDE; - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; - virtual bool Start() OVERRIDE; virtual bool Stop() OVERRIDE; diff --git a/webrtc/test/channel_transport/udp_socket_manager_wrapper.h b/webrtc/test/channel_transport/udp_socket_manager_wrapper.h index 5d5572be19..123db42983 100644 --- a/webrtc/test/channel_transport/udp_socket_manager_wrapper.h +++ b/webrtc/test/channel_transport/udp_socket_manager_wrapper.h @@ -30,8 +30,6 @@ public: // already initialized. virtual bool Init(int32_t id, uint8_t& numOfWorkThreads) = 0; - virtual int32_t ChangeUniqueId(const int32_t id) = 0; - // Start listening to sockets that have been registered via the // AddSocket(..) API. virtual bool Start() = 0; diff --git a/webrtc/test/channel_transport/udp_socket_posix.cc b/webrtc/test/channel_transport/udp_socket_posix.cc index 43f75b4b1d..a2c84e5651 100644 --- a/webrtc/test/channel_transport/udp_socket_posix.cc +++ b/webrtc/test/channel_transport/udp_socket_posix.cc @@ -27,7 +27,7 @@ namespace webrtc { namespace test { UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr, - bool ipV6Enable) + bool ipV6Enable) : _id(id) { WEBRTC_TRACE(kTraceMemory, kTraceTransport, id, "UdpSocketPosix::UdpSocketPosix()"); @@ -35,7 +35,6 @@ UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr, _wantsIncoming = false; _mgr = mgr; - _id = id; _obj = NULL; _incomingCb = NULL; _readyForDeletionCond = ConditionVariableWrapper::CreateConditionVariable(); @@ -92,12 +91,6 @@ UdpSocketPosix::~UdpSocketPosix() } } -int32_t UdpSocketPosix::ChangeUniqueId(const int32_t id) -{ - _id = id; - return 0; -} - bool UdpSocketPosix::SetCallback(CallbackObj obj, IncomingSocketCallback cb) { _obj = obj; diff --git a/webrtc/test/channel_transport/udp_socket_posix.h b/webrtc/test/channel_transport/udp_socket_posix.h index c503636c3b..15fdca4d9f 100644 --- a/webrtc/test/channel_transport/udp_socket_posix.h +++ b/webrtc/test/channel_transport/udp_socket_posix.h @@ -33,8 +33,6 @@ public: virtual ~UdpSocketPosix(); - virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; - virtual bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) OVERRIDE; @@ -72,7 +70,7 @@ public: private: friend class UdpSocketManagerPosix; - int32_t _id; + const int32_t _id; IncomingSocketCallback _incomingCb; CallbackObj _obj; diff --git a/webrtc/test/channel_transport/udp_socket_wrapper.h b/webrtc/test/channel_transport/udp_socket_wrapper.h index d14fcfddc5..d2a1ce6b61 100644 --- a/webrtc/test/channel_transport/udp_socket_wrapper.h +++ b/webrtc/test/channel_transport/udp_socket_wrapper.h @@ -50,9 +50,6 @@ public: bool ipV6Enable = false, bool disableGQOS = false); - // Set the unique identifier of this class to id. - virtual int32_t ChangeUniqueId(const int32_t id) = 0; - // Register cb for receiving callbacks when there are incoming packets. // Register obj so that it will be passed in calls to cb. virtual bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) = 0; diff --git a/webrtc/test/channel_transport/udp_socket_wrapper_unittest.cc b/webrtc/test/channel_transport/udp_socket_wrapper_unittest.cc index 12fb6fa582..885e19c237 100644 --- a/webrtc/test/channel_transport/udp_socket_wrapper_unittest.cc +++ b/webrtc/test/channel_transport/udp_socket_wrapper_unittest.cc @@ -39,7 +39,6 @@ class MockSocketManager : public UdpSocketManager { delete this; } MOCK_METHOD2(Init, bool(int32_t, uint8_t&)); - MOCK_METHOD1(ChangeUniqueId, int32_t(const int32_t)); MOCK_METHOD0(Start, bool()); MOCK_METHOD0(Stop, bool()); MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*)); diff --git a/webrtc/test/channel_transport/udp_transport_unittest.cc b/webrtc/test/channel_transport/udp_transport_unittest.cc index 862ebf9cb6..975f52b756 100644 --- a/webrtc/test/channel_transport/udp_transport_unittest.cc +++ b/webrtc/test/channel_transport/udp_transport_unittest.cc @@ -28,7 +28,6 @@ namespace test { class MockUdpSocketWrapper : public UdpSocketWrapper { public: // The following methods have to be mocked because they are pure. - MOCK_METHOD1(ChangeUniqueId, int32_t(int32_t)); MOCK_METHOD2(SetCallback, bool(CallbackObj, IncomingSocketCallback)); MOCK_METHOD1(Bind, bool(const SocketAddress&)); MOCK_METHOD0(ValidHandle, bool()); @@ -51,7 +50,6 @@ class MockUdpSocketManager : public UdpSocketManager { delete this; } MOCK_METHOD2(Init, bool(int32_t, uint8_t&)); - MOCK_METHOD1(ChangeUniqueId, int32_t(const int32_t)); MOCK_METHOD0(Start, bool()); MOCK_METHOD0(Stop, bool()); MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*)); diff --git a/webrtc/voice_engine/monitor_module.cc b/webrtc/voice_engine/monitor_module.cc index b1b4732e5e..ca358022a5 100644 --- a/webrtc/voice_engine/monitor_module.cc +++ b/webrtc/voice_engine/monitor_module.cc @@ -28,7 +28,7 @@ MonitorModule::~MonitorModule() delete &_callbackCritSect; } -int32_t +int32_t MonitorModule::RegisterObserver(MonitorObserver& observer) { CriticalSectionScoped lock(&_callbackCritSect); @@ -40,7 +40,7 @@ MonitorModule::RegisterObserver(MonitorObserver& observer) return 0; } -int32_t +int32_t MonitorModule::DeRegisterObserver() { CriticalSectionScoped lock(&_callbackCritSect); @@ -52,12 +52,6 @@ MonitorModule::DeRegisterObserver() return 0; } -int32_t -MonitorModule::ChangeUniqueId(int32_t id) -{ - return 0; -} - int64_t MonitorModule::TimeUntilNextProcess() { @@ -66,7 +60,7 @@ MonitorModule::TimeUntilNextProcess() return kAverageProcessUpdateTimeMs - (now - _lastProcessTime); } -int32_t +int32_t MonitorModule::Process() { _lastProcessTime = TickTime::MillisecondTimestamp(); diff --git a/webrtc/voice_engine/monitor_module.h b/webrtc/voice_engine/monitor_module.h index 9714e927bf..8a399eb3d1 100644 --- a/webrtc/voice_engine/monitor_module.h +++ b/webrtc/voice_engine/monitor_module.h @@ -40,8 +40,6 @@ public: virtual ~MonitorModule(); public: // module - virtual int32_t ChangeUniqueId(int32_t id) OVERRIDE; - virtual int64_t TimeUntilNextProcess() OVERRIDE; virtual int32_t Process() OVERRIDE;