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
This commit is contained in:
parent
1ece0cbbec
commit
4161715e3f
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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; }
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -463,16 +463,6 @@ AudioDeviceModuleImpl::~AudioDeviceModuleImpl()
|
||||
// Module
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Module::ChangeUniqueId
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int32_t AudioDeviceModuleImpl::ChangeUniqueId(const int32_t id)
|
||||
{
|
||||
_id = id;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Module::TimeUntilNextProcess
|
||||
//
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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.
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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_;
|
||||
};
|
||||
|
@ -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}; // <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;
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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_;
|
||||
|
@ -46,26 +46,8 @@ void VideoProcessingModule::Destroy(VideoProcessingModule* module) {
|
||||
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() {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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<int, int> z_order_to_channel_;
|
||||
EAGLContext* gles_context_;
|
||||
bool is_rendering_;
|
||||
int id_;
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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",
|
||||
|
@ -34,8 +34,6 @@ public:
|
||||
|
||||
virtual int32_t Init();
|
||||
|
||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
||||
|
||||
virtual int32_t ChangeWindow(void* window);
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -38,8 +38,6 @@ public:
|
||||
|
||||
virtual int32_t Init();
|
||||
|
||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
||||
|
||||
virtual int32_t ChangeWindow(void* window);
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -38,8 +38,6 @@ public:
|
||||
|
||||
virtual int32_t Init();
|
||||
|
||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
||||
|
||||
virtual int32_t ChangeWindow(void* window);
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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*/,
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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*));
|
||||
|
@ -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*));
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user