Remove ChangeUniqueID.
This fixes a two year old TODO of deleting dead code :)
In cases where the _id or id_ member variable is being used for tracing,
I changed the member to at least be const.
It doesn't look like id's are that useful anymore so maybe the next step is to get rid of them.
BUG=
R=henrika@webrtc.org, perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/37849004
Cr-Commit-Position: refs/heads/master@{#8201}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8201 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.cc b/talk/app/webrtc/test/fakeaudiocapturemodule.cc
index 28dd9fe..934af44 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.cc
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.cc
@@ -112,11 +112,6 @@
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 0428a24..1c54a04 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.h
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.h
@@ -78,7 +78,6 @@
// 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 e8d254b..7085a3d 100644
--- a/talk/media/webrtc/fakewebrtcvideocapturemodule.h
+++ b/talk/media/webrtc/fakewebrtcvideocapturemodule.h
@@ -52,10 +52,6 @@
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 5d2c702..af5cb21 100644
--- a/talk/media/webrtc/webrtcpassthroughrender.h
+++ b/talk/media/webrtc/webrtcpassthroughrender.h
@@ -41,10 +41,6 @@
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 c9139bd..b59d301 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 @@
"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 d393427..bbcb0b7 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 @@
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 efcd59b..c9cc6ef 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 @@
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 c65cee4..3ee2a08 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 @@
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 9591e42..2a37abf 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 @@
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 6a51bc3..0686783 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 <android/log.h>
+#include <assert.h>
#include <stdlib.h>
#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 f425df0..8b6a52d 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 <android/log.h>
+#include <assert.h>
#include <stdlib.h>
#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 a2b0971..86bd848 100644
--- a/webrtc/modules/audio_device/audio_device_impl.cc
+++ b/webrtc/modules/audio_device/audio_device_impl.cc
@@ -464,16 +464,6 @@
// ============================================================================
// ----------------------------------------------------------------------------
-// Module::ChangeUniqueId
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::ChangeUniqueId(const int32_t id)
-{
- _id = id;
- return 0;
-}
-
-// ----------------------------------------------------------------------------
// Module::TimeUntilNextProcess
//
// Returns the number of milliseconds until the module want a worker thread
diff --git a/webrtc/modules/audio_device/audio_device_impl.h b/webrtc/modules/audio_device/audio_device_impl.h
index ab9ddbb..010d643 100644
--- a/webrtc/modules/audio_device/audio_device_impl.h
+++ b/webrtc/modules/audio_device/audio_device_impl.h
@@ -43,7 +43,6 @@
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 ccaee8b..c3e3030 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 <assert.h>
-
#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 3fb849f..0179ee6 100644
--- a/webrtc/modules/media_file/interface/media_file.h
+++ b/webrtc/modules/media_file/interface/media_file.h
@@ -26,9 +26,6 @@
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 b669ab6..60aeefe 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 @@
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 17391a5..388da34 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 @@
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 4ded6d0..3ce7414 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 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 95ba287..8dc728c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -30,7 +30,6 @@
RTCPReceiver::RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner)
: TMMBRHelp(),
- _id(id),
_clock(clock),
_method(kRtcpOff),
_lastReceived(0),
@@ -84,10 +83,6 @@
}
}
-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 f8fd2e8..a52e810 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h
@@ -32,8 +32,6 @@
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 @@
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 16b2b45..d7a6642 100644
--- a/webrtc/modules/video_capture/video_capture_impl.cc
+++ b/webrtc/modules/video_capture/video_capture_impl.cc
@@ -82,12 +82,6 @@
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 6f0291e..75fe7e5 100644
--- a/webrtc/modules/video_capture/video_capture_impl.h
+++ b/webrtc/modules/video_capture/video_capture_impl.h
@@ -58,9 +58,6 @@
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 f33117d..77cdc52 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 dcb366b..f2600c0 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 @@
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 95755c2..d845dbb 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::weight_uw16_[kNumQuants - kMaxOnlyLength] =
{16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720, 32768}; // <Q15>
-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 53ffebe..aeb4fe6 100644
--- a/webrtc/modules/video_processing/main/source/deflickering.h
+++ b/webrtc/modules/video_processing/main/source/deflickering.h
@@ -23,8 +23,6 @@
VPMDeflickering();
~VPMDeflickering();
- int32_t ChangeUniqueId(int32_t id);
-
void Reset();
int32_t ProcessFrame(I420VideoFrame* frame,
VideoProcessingModule::FrameStats* stats);
@@ -41,8 +39,6 @@
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 e1cd04f..6eff69c 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 @@
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 64a5797..44c057b 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 @@
VPMFramePreprocessor();
~VPMFramePreprocessor();
- int32_t ChangeUniqueId(const int32_t id);
-
void Reset();
// Enable temporal decimation.
@@ -63,7 +61,6 @@
// 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 8bc5bf0..6e7808e 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 @@
delete static_cast<VideoProcessingModuleImpl*>(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 95e41bd4..69dcec4 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 @@
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 @@
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 20694b6..485df8a 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 @@
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 1541148..6d58c56 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 @@
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 7a590be..04ae205 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 @@
const VideoRenderType videoRenderType,
void* window,
const bool fullscreen) :
- _id(id), _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
- _fullscreen(fullscreen)
+ _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
+ _fullscreen(fullscreen)
{
}
@@ -32,13 +32,6 @@
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 46ad739..e83d842 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 @@
virtual int32_t Init();
- virtual int32_t ChangeUniqueId(const int32_t id);
-
virtual int32_t ChangeWindow(void* window);
/**************************************************************************
@@ -120,7 +118,6 @@
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 86e3643..ff1cce7 100644
--- a/webrtc/modules/video_render/i_video_render.h
+++ b/webrtc/modules/video_render/i_video_render.h
@@ -23,14 +23,10 @@
* 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 7723950..494c3f3 100644
--- a/webrtc/modules/video_render/include/video_render.h
+++ b/webrtc/modules/video_render/include/video_render.h
@@ -52,13 +52,6 @@
*/
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 ef91e71..c4d87f0 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 @@
const float bottom);
int ChangeWindow(void* new_window);
- int ChangeUniqueID(int unique_id);
int StartRender();
int StopRender();
@@ -81,7 +80,6 @@
std::multimap<int, int> 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 bbada09..f97abab 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 @@
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 @@
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 e38ed7a..fdcfe34 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 @@
// 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 9b8e1d6..49bae08 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::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 c961780..af0e9ac 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::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 0ee0d57..0e9ae54 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 @@
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 edaae97..5b87794 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 @@
#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 @@
}
#endif
-#ifdef NEW_HIVIEW_EVENT_HANDLER
+#ifdef NEW_HIVIEW_EVENT_HANDLER
if(_hiviewEventHandlerRef)
{
status = RemoveEventHandler(_hiviewEventHandlerRef);
@@ -1278,7 +1278,7 @@
//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 @@
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 5336705..1520b1e 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 @@
// ********** 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 66b4906..dbb09a3 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
@@ -97,23 +97,6 @@
}
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)
{
return -1;
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 245476a..9ad3a6c 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 @@
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 33e4289..21add27 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 @@
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 bdab72b..561d71f 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
@@ -68,21 +68,6 @@
}
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 90e3d3f..66887f8 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 @@
private:
NSOpenGLContext* _nsglContext;
- int _id;
+ const int _id;
VideoRenderNSOpenGL* _owner;
int32_t _width;
int32_t _height;
@@ -125,7 +125,6 @@
// ********** 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 39ed95a..a4a90a3 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 @@
}
}
-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 bcf9d81..409bbf4 100644
--- a/webrtc/modules/video_render/video_render_impl.cc
+++ b/webrtc/modules/video_render/video_render_impl.cc
@@ -114,21 +114,6 @@
}
}
-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 cf02652..de0ecd2 100644
--- a/webrtc/modules/video_render/video_render_impl.h
+++ b/webrtc/modules/video_render/video_render_impl.h
@@ -34,11 +34,6 @@
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 963cd11..902a484 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 @@
}
}
-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 7b5f763..38d897c 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 @@
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 @@
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 703e166..aaa3f81 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 @@
virtual int32_t Init();
- virtual int32_t ChangeUniqueId(const int32_t id);
-
virtual int32_t ChangeWindow(void* window);
/**************************************************************************
@@ -125,7 +123,6 @@
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 103412f..9aeda75 100644
--- a/webrtc/test/channel_transport/traffic_control_win.cc
+++ b/webrtc/test/channel_transport/traffic_control_win.cc
@@ -20,7 +20,7 @@
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 @@
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 63085cf..acd625f 100644
--- a/webrtc/test/channel_transport/traffic_control_win.h
+++ b/webrtc/test/channel_transport/traffic_control_win.h
@@ -49,8 +49,6 @@
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 @@
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 bfab51e..695c866 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 @@
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 d3b8aed..42c4511 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 @@
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 1d5234c..6bcb551 100644
--- a/webrtc/test/channel_transport/udp_socket2_win.cc
+++ b/webrtc/test/channel_transport/udp_socket2_win.cc
@@ -216,16 +216,6 @@
}
}
-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 7dec1ed..6971154 100644
--- a/webrtc/test/channel_transport/udp_socket2_win.h
+++ b/webrtc/test/channel_transport/udp_socket2_win.h
@@ -42,8 +42,6 @@
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 1e13475..ad6ffa4 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 @@
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 cbcb479..478d76b 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 @@
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 5d5572b..123db42 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 @@
// 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 43f75b4..a2c84e5 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 @@
_wantsIncoming = false;
_mgr = mgr;
- _id = id;
_obj = NULL;
_incomingCb = NULL;
_readyForDeletionCond = ConditionVariableWrapper::CreateConditionVariable();
@@ -92,12 +91,6 @@
}
}
-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 c503636..15fdca4 100644
--- a/webrtc/test/channel_transport/udp_socket_posix.h
+++ b/webrtc/test/channel_transport/udp_socket_posix.h
@@ -33,8 +33,6 @@
virtual ~UdpSocketPosix();
- virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
-
virtual bool SetCallback(CallbackObj obj,
IncomingSocketCallback cb) OVERRIDE;
@@ -72,7 +70,7 @@
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 d14fcfd..d2a1ce6 100644
--- a/webrtc/test/channel_transport/udp_socket_wrapper.h
+++ b/webrtc/test/channel_transport/udp_socket_wrapper.h
@@ -50,9 +50,6 @@
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 12fb6fa..885e19c 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 @@
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 862ebf9..975f52b 100644
--- a/webrtc/test/channel_transport/udp_transport_unittest.cc
+++ b/webrtc/test/channel_transport/udp_transport_unittest.cc
@@ -28,7 +28,6 @@
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 @@
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 b1b4732..ca35802 100644
--- a/webrtc/voice_engine/monitor_module.cc
+++ b/webrtc/voice_engine/monitor_module.cc
@@ -28,7 +28,7 @@
delete &_callbackCritSect;
}
-int32_t
+int32_t
MonitorModule::RegisterObserver(MonitorObserver& observer)
{
CriticalSectionScoped lock(&_callbackCritSect);
@@ -40,7 +40,7 @@
return 0;
}
-int32_t
+int32_t
MonitorModule::DeRegisterObserver()
{
CriticalSectionScoped lock(&_callbackCritSect);
@@ -52,12 +52,6 @@
return 0;
}
-int32_t
-MonitorModule::ChangeUniqueId(int32_t id)
-{
- return 0;
-}
-
int64_t
MonitorModule::TimeUntilNextProcess()
{
@@ -66,7 +60,7 @@
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 9714e92..8a399eb 100644
--- a/webrtc/voice_engine/monitor_module.h
+++ b/webrtc/voice_engine/monitor_module.h
@@ -40,8 +40,6 @@
virtual ~MonitorModule();
public: // module
- virtual int32_t ChangeUniqueId(int32_t id) OVERRIDE;
-
virtual int64_t TimeUntilNextProcess() OVERRIDE;
virtual int32_t Process() OVERRIDE;