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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FakeAudioCaptureModule::ChangeUniqueId(const int32_t /*id*/) {
|
|
||||||
ASSERT(false);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t FakeAudioCaptureModule::ActiveAudioLayer(
|
int32_t FakeAudioCaptureModule::ActiveAudioLayer(
|
||||||
AudioLayer* /*audio_layer*/) const {
|
AudioLayer* /*audio_layer*/) const {
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
|
@ -78,7 +78,6 @@ class FakeAudioCaptureModule
|
|||||||
// PeerConnection an assertion is triggered if it is in fact called.
|
// PeerConnection an assertion is triggered if it is in fact called.
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
virtual int32_t Process() OVERRIDE;
|
virtual int32_t Process() OVERRIDE;
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
|
|
||||||
virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const OVERRIDE;
|
virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const OVERRIDE;
|
||||||
|
|
||||||
|
@ -52,10 +52,6 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
|
|||||||
virtual int32_t Process() OVERRIDE {
|
virtual int32_t Process() OVERRIDE {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE {
|
|
||||||
id_ = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
virtual void RegisterCaptureDataCallback(
|
virtual void RegisterCaptureDataCallback(
|
||||||
webrtc::VideoCaptureDataCallback& callback) OVERRIDE {
|
webrtc::VideoCaptureDataCallback& callback) OVERRIDE {
|
||||||
callback_ = &callback;
|
callback_ = &callback;
|
||||||
|
@ -41,10 +41,6 @@ class WebRtcPassthroughRender : public webrtc::VideoRender {
|
|||||||
WebRtcPassthroughRender();
|
WebRtcPassthroughRender();
|
||||||
virtual ~WebRtcPassthroughRender();
|
virtual ~WebRtcPassthroughRender();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE { return 0; }
|
virtual int64_t TimeUntilNextProcess() OVERRIDE { return 0; }
|
||||||
|
|
||||||
virtual int32_t Process() OVERRIDE { return 0; }
|
virtual int32_t Process() OVERRIDE { return 0; }
|
||||||
|
@ -222,22 +222,6 @@ AudioCodingModuleImpl::~AudioCodingModuleImpl() {
|
|||||||
"Destroyed");
|
"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
|
// Returns the number of milliseconds until the module want a
|
||||||
// worker thread to call Process.
|
// worker thread to call Process.
|
||||||
int64_t AudioCodingModuleImpl::TimeUntilNextProcess() {
|
int64_t AudioCodingModuleImpl::TimeUntilNextProcess() {
|
||||||
|
@ -35,9 +35,6 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
|||||||
explicit AudioCodingModuleImpl(const AudioCodingModule::Config& config);
|
explicit AudioCodingModuleImpl(const AudioCodingModule::Config& config);
|
||||||
~AudioCodingModuleImpl();
|
~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
|
// Returns the number of milliseconds until the module want a worker thread
|
||||||
// to call Process.
|
// to call Process.
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
|
@ -40,7 +40,6 @@ public:
|
|||||||
virtual ~AudioConferenceMixer() {}
|
virtual ~AudioConferenceMixer() {}
|
||||||
|
|
||||||
// Module functions
|
// Module functions
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE = 0;
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE = 0;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE = 0;
|
||||||
virtual int32_t Process() OVERRIDE = 0;
|
virtual int32_t Process() OVERRIDE = 0;
|
||||||
|
|
||||||
|
@ -191,11 +191,6 @@ AudioConferenceMixerImpl::~AudioConferenceMixerImpl() {
|
|||||||
assert(_audioFramePool == NULL);
|
assert(_audioFramePool == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t AudioConferenceMixerImpl::ChangeUniqueId(const int32_t id) {
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process should be called every kProcessPeriodicityInMs ms
|
// Process should be called every kProcessPeriodicityInMs ms
|
||||||
int64_t AudioConferenceMixerImpl::TimeUntilNextProcess() {
|
int64_t AudioConferenceMixerImpl::TimeUntilNextProcess() {
|
||||||
int64_t timeUntilNextProcess = 0;
|
int64_t timeUntilNextProcess = 0;
|
||||||
|
@ -64,7 +64,6 @@ public:
|
|||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
// Module functions
|
// Module functions
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
virtual int32_t Process() OVERRIDE;
|
virtual int32_t Process() OVERRIDE;
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "webrtc/modules/audio_device/android/audio_record_jni.h"
|
#include "webrtc/modules/audio_device/android/audio_record_jni.h"
|
||||||
|
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "webrtc/modules/audio_device/android/audio_common.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 "webrtc/modules/audio_device/android/audio_track_jni.h"
|
||||||
|
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "webrtc/modules/audio_device/audio_device_config.h"
|
#include "webrtc/modules/audio_device/audio_device_config.h"
|
||||||
|
@ -463,16 +463,6 @@ AudioDeviceModuleImpl::~AudioDeviceModuleImpl()
|
|||||||
// Module
|
// Module
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Module::ChangeUniqueId
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
int32_t AudioDeviceModuleImpl::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Module::TimeUntilNextProcess
|
// Module::TimeUntilNextProcess
|
||||||
//
|
//
|
||||||
|
@ -43,7 +43,6 @@ public:
|
|||||||
virtual ~AudioDeviceModuleImpl();
|
virtual ~AudioDeviceModuleImpl();
|
||||||
|
|
||||||
public: // RefCountedModule
|
public: // RefCountedModule
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
virtual int32_t Process() OVERRIDE;
|
virtual int32_t Process() OVERRIDE;
|
||||||
|
|
||||||
|
@ -11,51 +11,38 @@
|
|||||||
#ifndef MODULES_INTERFACE_MODULE_H_
|
#ifndef MODULES_INTERFACE_MODULE_H_
|
||||||
#define MODULES_INTERFACE_MODULE_H_
|
#define MODULES_INTERFACE_MODULE_H_
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "webrtc/typedefs.h"
|
#include "webrtc/typedefs.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
class Module {
|
class Module {
|
||||||
public:
|
public:
|
||||||
// TODO(henrika): Remove this when chrome is updated.
|
// Returns the number of milliseconds until the module wants a worker
|
||||||
// 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
|
|
||||||
// thread to call Process.
|
// thread to call Process.
|
||||||
|
// This method is called on the same worker thread as Process will
|
||||||
|
// be called on.
|
||||||
virtual int64_t TimeUntilNextProcess() = 0;
|
virtual int64_t TimeUntilNextProcess() = 0;
|
||||||
|
|
||||||
// Process any pending tasks such as timeouts.
|
// Process any pending tasks such as timeouts.
|
||||||
|
// Called on a worker thread.
|
||||||
virtual int32_t Process() = 0;
|
virtual int32_t Process() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~Module() {}
|
virtual ~Module() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reference counted version of the module interface.
|
// Reference counted version of the Module interface.
|
||||||
class RefCountedModule : public Module {
|
class RefCountedModule : public Module {
|
||||||
public:
|
public:
|
||||||
// Increase the reference count by one.
|
// Increase the reference count by one.
|
||||||
// Returns the incremented reference count.
|
// Returns the incremented reference count.
|
||||||
// TODO(perkj): Make this pure virtual when Chromium have implemented
|
virtual int32_t AddRef() = 0;
|
||||||
// reference counting ADM and Video capture module.
|
|
||||||
virtual int32_t AddRef() {
|
|
||||||
assert(false && "Not implemented.");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decrease the reference count by one.
|
// Decrease the reference count by one.
|
||||||
// Returns the decreased reference count.
|
// Returns the decreased reference count.
|
||||||
// Returns 0 if the last reference was just released.
|
// Returns 0 if the last reference was just released.
|
||||||
// When the reference count reach 0 the object will self-destruct.
|
// When the reference count reaches 0 the object will self-destruct.
|
||||||
// TODO(perkj): Make this pure virtual when Chromium have implemented
|
virtual int32_t Release() = 0;
|
||||||
// reference counting ADM and Video capture module.
|
|
||||||
virtual int32_t Release() {
|
|
||||||
assert(false && "Not implemented.");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~RefCountedModule() {}
|
virtual ~RefCountedModule() {}
|
||||||
|
@ -26,9 +26,6 @@ public:
|
|||||||
static MediaFile* CreateMediaFile(const int32_t id);
|
static MediaFile* CreateMediaFile(const int32_t id);
|
||||||
static void DestroyMediaFile(MediaFile* module);
|
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
|
// Put 10-60ms of audio data from file into the audioBuffer depending on
|
||||||
// codec frame size. dataLengthInBytes is both an input and output
|
// codec frame size. dataLengthInBytes is both an input and output
|
||||||
// parameter. As input parameter it indicates the size of audioBuffer.
|
// parameter. As input parameter it indicates the size of audioBuffer.
|
||||||
|
@ -85,12 +85,6 @@ MediaFileImpl::~MediaFileImpl()
|
|||||||
delete _callbackCrit;
|
delete _callbackCrit;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MediaFileImpl::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t MediaFileImpl::TimeUntilNextProcess()
|
int64_t MediaFileImpl::TimeUntilNextProcess()
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(
|
WEBRTC_TRACE(
|
||||||
|
@ -26,7 +26,6 @@ public:
|
|||||||
MediaFileImpl(const int32_t id);
|
MediaFileImpl(const int32_t id);
|
||||||
~MediaFileImpl();
|
~MediaFileImpl();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
virtual int32_t Process() OVERRIDE;
|
virtual int32_t Process() OVERRIDE;
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
|
|
||||||
|
@ -32,8 +32,6 @@ class MockRtpData : public RtpData {
|
|||||||
|
|
||||||
class MockRtpRtcp : public RtpRtcp {
|
class MockRtpRtcp : public RtpRtcp {
|
||||||
public:
|
public:
|
||||||
MOCK_METHOD1(ChangeUniqueId,
|
|
||||||
int32_t(const int32_t id));
|
|
||||||
MOCK_METHOD1(RegisterDefaultModule,
|
MOCK_METHOD1(RegisterDefaultModule,
|
||||||
int32_t(RtpRtcp* module));
|
int32_t(RtpRtcp* module));
|
||||||
MOCK_METHOD0(DeRegisterDefaultModule,
|
MOCK_METHOD0(DeRegisterDefaultModule,
|
||||||
|
@ -30,7 +30,6 @@ const int kRrTimeoutIntervals = 3;
|
|||||||
|
|
||||||
RTCPReceiver::RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner)
|
RTCPReceiver::RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner)
|
||||||
: TMMBRHelp(),
|
: TMMBRHelp(),
|
||||||
_id(id),
|
|
||||||
_clock(clock),
|
_clock(clock),
|
||||||
_method(kRtcpOff),
|
_method(kRtcpOff),
|
||||||
_lastReceived(0),
|
_lastReceived(0),
|
||||||
@ -84,10 +83,6 @@ RTCPReceiver::~RTCPReceiver() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTCPReceiver::ChangeUniqueId(int32_t id) {
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTCPMethod RTCPReceiver::Status() const {
|
RTCPMethod RTCPReceiver::Status() const {
|
||||||
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
|
CriticalSectionScoped lock(_criticalSectionRTCPReceiver);
|
||||||
return _method;
|
return _method;
|
||||||
|
@ -32,8 +32,6 @@ public:
|
|||||||
RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner);
|
RTCPReceiver(int32_t id, Clock* clock, ModuleRtpRtcpImpl* owner);
|
||||||
virtual ~RTCPReceiver();
|
virtual ~RTCPReceiver();
|
||||||
|
|
||||||
void ChangeUniqueId(int32_t id);
|
|
||||||
|
|
||||||
RTCPMethod Status() const;
|
RTCPMethod Status() const;
|
||||||
void SetRTCPStatus(RTCPMethod method);
|
void SetRTCPStatus(RTCPMethod method);
|
||||||
|
|
||||||
@ -233,7 +231,6 @@ protected:
|
|||||||
uint32_t remote_ssrc, uint32_t source_ssrc) const
|
uint32_t remote_ssrc, uint32_t source_ssrc) const
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
|
EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
|
||||||
|
|
||||||
int32_t _id;
|
|
||||||
Clock* _clock;
|
Clock* _clock;
|
||||||
RTCPMethod _method;
|
RTCPMethod _method;
|
||||||
int64_t _lastReceived;
|
int64_t _lastReceived;
|
||||||
|
@ -82,12 +82,6 @@ int32_t VideoCaptureImpl::RotationInDegrees(VideoCaptureRotation rotation,
|
|||||||
return -1;
|
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
|
// returns the number of milliseconds until the module want a worker thread to call Process
|
||||||
int64_t VideoCaptureImpl::TimeUntilNextProcess()
|
int64_t VideoCaptureImpl::TimeUntilNextProcess()
|
||||||
{
|
{
|
||||||
|
@ -58,9 +58,6 @@ public:
|
|||||||
static int32_t RotationInDegrees(VideoCaptureRotation rotation,
|
static int32_t RotationInDegrees(VideoCaptureRotation rotation,
|
||||||
int* degrees);
|
int* degrees);
|
||||||
|
|
||||||
// Implements Module declared functions.
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
//Call backs
|
//Call backs
|
||||||
virtual void RegisterCaptureDataCallback(
|
virtual void RegisterCaptureDataCallback(
|
||||||
VideoCaptureDataCallback& dataCallback);
|
VideoCaptureDataCallback& dataCallback);
|
||||||
|
@ -15,18 +15,12 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
VPMBrightnessDetection::VPMBrightnessDetection() :
|
VPMBrightnessDetection::VPMBrightnessDetection() {
|
||||||
id_(0) {
|
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
VPMBrightnessDetection::~VPMBrightnessDetection() {}
|
VPMBrightnessDetection::~VPMBrightnessDetection() {}
|
||||||
|
|
||||||
int32_t VPMBrightnessDetection::ChangeUniqueId(const int32_t id) {
|
|
||||||
id_ = id;
|
|
||||||
return VPM_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VPMBrightnessDetection::Reset() {
|
void VPMBrightnessDetection::Reset() {
|
||||||
frame_cnt_bright_ = 0;
|
frame_cnt_bright_ = 0;
|
||||||
frame_cnt_dark_ = 0;
|
frame_cnt_dark_ = 0;
|
||||||
|
@ -22,15 +22,12 @@ class VPMBrightnessDetection {
|
|||||||
public:
|
public:
|
||||||
VPMBrightnessDetection();
|
VPMBrightnessDetection();
|
||||||
~VPMBrightnessDetection();
|
~VPMBrightnessDetection();
|
||||||
int32_t ChangeUniqueId(int32_t id);
|
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
int32_t ProcessFrame(const I420VideoFrame& frame,
|
int32_t ProcessFrame(const I420VideoFrame& frame,
|
||||||
const VideoProcessingModule::FrameStats& stats);
|
const VideoProcessingModule::FrameStats& stats);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t id_;
|
|
||||||
|
|
||||||
uint32_t frame_cnt_bright_;
|
uint32_t frame_cnt_bright_;
|
||||||
uint32_t frame_cnt_dark_;
|
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] =
|
const uint16_t VPMDeflickering::weight_uw16_[kNumQuants - kMaxOnlyLength] =
|
||||||
{16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720, 32768}; // <Q15>
|
{16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720, 32768}; // <Q15>
|
||||||
|
|
||||||
VPMDeflickering::VPMDeflickering()
|
VPMDeflickering::VPMDeflickering() {
|
||||||
: id_(0) {
|
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
VPMDeflickering::~VPMDeflickering() {}
|
VPMDeflickering::~VPMDeflickering() {}
|
||||||
|
|
||||||
int32_t VPMDeflickering::ChangeUniqueId(const int32_t id) {
|
|
||||||
id_ = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VPMDeflickering::Reset() {
|
void VPMDeflickering::Reset() {
|
||||||
mean_buffer_length_ = 0;
|
mean_buffer_length_ = 0;
|
||||||
detection_state_ = 0;
|
detection_state_ = 0;
|
||||||
|
@ -23,8 +23,6 @@ class VPMDeflickering {
|
|||||||
VPMDeflickering();
|
VPMDeflickering();
|
||||||
~VPMDeflickering();
|
~VPMDeflickering();
|
||||||
|
|
||||||
int32_t ChangeUniqueId(int32_t id);
|
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
int32_t ProcessFrame(I420VideoFrame* frame,
|
int32_t ProcessFrame(I420VideoFrame* frame,
|
||||||
VideoProcessingModule::FrameStats* stats);
|
VideoProcessingModule::FrameStats* stats);
|
||||||
@ -41,8 +39,6 @@ class VPMDeflickering {
|
|||||||
enum { kNumQuants = kNumProbs + 2 };
|
enum { kNumQuants = kNumProbs + 2 };
|
||||||
enum { kMaxOnlyLength = 5 };
|
enum { kMaxOnlyLength = 5 };
|
||||||
|
|
||||||
int32_t id_;
|
|
||||||
|
|
||||||
uint32_t mean_buffer_length_;
|
uint32_t mean_buffer_length_;
|
||||||
uint8_t detection_state_; // 0: No flickering
|
uint8_t detection_state_; // 0: No flickering
|
||||||
// 1: Flickering detected
|
// 1: Flickering detected
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
VPMFramePreprocessor::VPMFramePreprocessor()
|
VPMFramePreprocessor::VPMFramePreprocessor()
|
||||||
: id_(0),
|
: content_metrics_(NULL),
|
||||||
content_metrics_(NULL),
|
|
||||||
resampled_frame_(),
|
resampled_frame_(),
|
||||||
enable_ca_(false),
|
enable_ca_(false),
|
||||||
frame_cnt_(0) {
|
frame_cnt_(0) {
|
||||||
@ -30,11 +29,6 @@ VPMFramePreprocessor::~VPMFramePreprocessor() {
|
|||||||
delete vd_;
|
delete vd_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VPMFramePreprocessor::ChangeUniqueId(const int32_t id) {
|
|
||||||
id_ = id;
|
|
||||||
return VPM_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VPMFramePreprocessor::Reset() {
|
void VPMFramePreprocessor::Reset() {
|
||||||
ca_->Release();
|
ca_->Release();
|
||||||
vd_->Reset();
|
vd_->Reset();
|
||||||
|
@ -27,8 +27,6 @@ class VPMFramePreprocessor {
|
|||||||
VPMFramePreprocessor();
|
VPMFramePreprocessor();
|
||||||
~VPMFramePreprocessor();
|
~VPMFramePreprocessor();
|
||||||
|
|
||||||
int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
// Enable temporal decimation.
|
// Enable temporal decimation.
|
||||||
@ -63,7 +61,6 @@ class VPMFramePreprocessor {
|
|||||||
// we can compute new content metrics every |kSkipFrameCA| frames.
|
// we can compute new content metrics every |kSkipFrameCA| frames.
|
||||||
enum { kSkipFrameCA = 2 };
|
enum { kSkipFrameCA = 2 };
|
||||||
|
|
||||||
int32_t id_;
|
|
||||||
VideoContentMetrics* content_metrics_;
|
VideoContentMetrics* content_metrics_;
|
||||||
I420VideoFrame resampled_frame_;
|
I420VideoFrame resampled_frame_;
|
||||||
VPMSpatialResampler* spatial_resampler_;
|
VPMSpatialResampler* spatial_resampler_;
|
||||||
|
@ -46,26 +46,8 @@ void VideoProcessingModule::Destroy(VideoProcessingModule* module) {
|
|||||||
delete static_cast<VideoProcessingModuleImpl*>(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)
|
VideoProcessingModuleImpl::VideoProcessingModuleImpl(const int32_t id)
|
||||||
: id_(id),
|
: mutex_(*CriticalSectionWrapper::CreateCriticalSection()) {
|
||||||
mutex_(*CriticalSectionWrapper::CreateCriticalSection()) {
|
|
||||||
brightness_detection_.ChangeUniqueId(id);
|
|
||||||
deflickering_.ChangeUniqueId(id);
|
|
||||||
frame_pre_processor_.ChangeUniqueId(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoProcessingModuleImpl::~VideoProcessingModuleImpl() {
|
VideoProcessingModuleImpl::~VideoProcessingModuleImpl() {
|
||||||
|
@ -27,10 +27,6 @@ class VideoProcessingModuleImpl : public VideoProcessingModule {
|
|||||||
|
|
||||||
virtual ~VideoProcessingModuleImpl();
|
virtual ~VideoProcessingModuleImpl();
|
||||||
|
|
||||||
int32_t Id() const;
|
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
|
|
||||||
virtual void Reset() OVERRIDE;
|
virtual void Reset() OVERRIDE;
|
||||||
|
|
||||||
virtual int32_t Deflickering(I420VideoFrame* frame,
|
virtual int32_t Deflickering(I420VideoFrame* frame,
|
||||||
@ -70,11 +66,10 @@ class VideoProcessingModuleImpl : public VideoProcessingModule {
|
|||||||
virtual VideoContentMetrics* ContentMetrics() const OVERRIDE;
|
virtual VideoContentMetrics* ContentMetrics() const OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t id_;
|
|
||||||
CriticalSectionWrapper& mutex_;
|
CriticalSectionWrapper& mutex_;
|
||||||
VPMDeflickering deflickering_;
|
VPMDeflickering deflickering_;
|
||||||
VPMBrightnessDetection brightness_detection_;
|
VPMBrightnessDetection brightness_detection_;
|
||||||
VPMFramePreprocessor frame_pre_processor_;
|
VPMFramePreprocessor frame_pre_processor_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -70,13 +70,6 @@ VideoRenderAndroid::~VideoRenderAndroid() {
|
|||||||
delete &_critSect;
|
delete &_critSect;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VideoRenderAndroid::ChangeUniqueId(const int32_t id) {
|
|
||||||
CriticalSectionScoped cs(&_critSect);
|
|
||||||
_id = id;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t VideoRenderAndroid::ChangeWindow(void* /*window*/) {
|
int32_t VideoRenderAndroid::ChangeWindow(void* /*window*/) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,6 @@ class VideoRenderAndroid: IVideoRender {
|
|||||||
|
|
||||||
virtual int32_t Init()=0;
|
virtual int32_t Init()=0;
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
virtual VideoRenderCallback* AddIncomingRenderStream(
|
virtual VideoRenderCallback* AddIncomingRenderStream(
|
||||||
|
@ -17,8 +17,8 @@ VideoRenderExternalImpl::VideoRenderExternalImpl(
|
|||||||
const VideoRenderType videoRenderType,
|
const VideoRenderType videoRenderType,
|
||||||
void* window,
|
void* window,
|
||||||
const bool fullscreen) :
|
const bool fullscreen) :
|
||||||
_id(id), _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_fullscreen(fullscreen)
|
_fullscreen(fullscreen)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,13 +32,6 @@ int32_t VideoRenderExternalImpl::Init()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VideoRenderExternalImpl::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
CriticalSectionScoped cs(&_critSect);
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t VideoRenderExternalImpl::ChangeWindow(void* window)
|
int32_t VideoRenderExternalImpl::ChangeWindow(void* window)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(&_critSect);
|
CriticalSectionScoped cs(&_critSect);
|
||||||
|
@ -33,8 +33,6 @@ public:
|
|||||||
|
|
||||||
virtual int32_t Init();
|
virtual int32_t Init();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@ -120,7 +118,6 @@ public:
|
|||||||
I420VideoFrame& videoFrame);
|
I420VideoFrame& videoFrame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t _id;
|
|
||||||
CriticalSectionWrapper& _critSect;
|
CriticalSectionWrapper& _critSect;
|
||||||
bool _fullscreen;
|
bool _fullscreen;
|
||||||
};
|
};
|
||||||
|
@ -23,14 +23,10 @@ public:
|
|||||||
* Constructor/destructor
|
* Constructor/destructor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual ~IVideoRender()
|
virtual ~IVideoRender() {}
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual int32_t Init() = 0;
|
virtual int32_t Init() = 0;
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) = 0;
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window) = 0;
|
virtual int32_t ChangeWindow(void* window) = 0;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -52,13 +52,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void DestroyVideoRender(VideoRender* module);
|
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 int64_t TimeUntilNextProcess() OVERRIDE = 0;
|
||||||
virtual int32_t Process() OVERRIDE = 0;
|
virtual int32_t Process() OVERRIDE = 0;
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ class VideoRenderIosGles20 {
|
|||||||
const float bottom);
|
const float bottom);
|
||||||
|
|
||||||
int ChangeWindow(void* new_window);
|
int ChangeWindow(void* new_window);
|
||||||
int ChangeUniqueID(int unique_id);
|
|
||||||
int StartRender();
|
int StartRender();
|
||||||
int StopRender();
|
int StopRender();
|
||||||
|
|
||||||
@ -81,7 +80,6 @@ class VideoRenderIosGles20 {
|
|||||||
std::multimap<int, int> z_order_to_channel_;
|
std::multimap<int, int> z_order_to_channel_;
|
||||||
EAGLContext* gles_context_;
|
EAGLContext* gles_context_;
|
||||||
bool is_rendering_;
|
bool is_rendering_;
|
||||||
int id_;
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -33,8 +33,7 @@ VideoRenderIosGles20::VideoRenderIosGles20(VideoRenderIosView* view,
|
|||||||
agl_channels_(),
|
agl_channels_(),
|
||||||
z_order_to_channel_(),
|
z_order_to_channel_(),
|
||||||
gles_context_([view context]),
|
gles_context_([view context]),
|
||||||
is_rendering_(true),
|
is_rendering_(true) {
|
||||||
id_(render_id) {
|
|
||||||
screen_update_thread_ = ThreadWrapper::CreateThread(
|
screen_update_thread_ = ThreadWrapper::CreateThread(
|
||||||
ScreenUpdateThreadProc, this, kRealtimePriority);
|
ScreenUpdateThreadProc, this, kRealtimePriority);
|
||||||
screen_update_event_ = EventWrapper::Create();
|
screen_update_event_ = EventWrapper::Create();
|
||||||
@ -255,14 +254,6 @@ int VideoRenderIosGles20::ChangeWindow(void* new_window) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int VideoRenderIosGles20::ChangeUniqueID(int unique_id) {
|
|
||||||
CriticalSectionScoped cs(gles_crit_sec_.get());
|
|
||||||
|
|
||||||
id_ = unique_id;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int VideoRenderIosGles20::StartRender() {
|
int VideoRenderIosGles20::StartRender() {
|
||||||
is_rendering_ = true;
|
is_rendering_ = true;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -31,7 +31,6 @@ class VideoRenderIosImpl : IVideoRender {
|
|||||||
|
|
||||||
// Implementation of IVideoRender.
|
// Implementation of IVideoRender.
|
||||||
int32_t Init() OVERRIDE;
|
int32_t Init() OVERRIDE;
|
||||||
int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
int32_t ChangeWindow(void* window) OVERRIDE;
|
int32_t ChangeWindow(void* window) OVERRIDE;
|
||||||
|
|
||||||
VideoRenderCallback* AddIncomingRenderStream(const uint32_t stream_id,
|
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) {
|
int32_t VideoRenderIosImpl::ChangeWindow(void* window) {
|
||||||
CriticalSectionScoped cs(crit_sec_);
|
CriticalSectionScoped cs(crit_sec_);
|
||||||
if (window == NULL) {
|
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)
|
int32_t VideoRenderLinuxImpl::ChangeWindow(void* window)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||||
|
@ -34,8 +34,6 @@ public:
|
|||||||
|
|
||||||
virtual int32_t Init();
|
virtual int32_t Init();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -554,7 +554,7 @@ _threadID( )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEW_HIVIEW_EVENT_HANDLER
|
#ifdef NEW_HIVIEW_EVENT_HANDLER
|
||||||
//WEBRTC_TRACE(kTraceDebug, "%s:%d Installing Eventhandler for hiviewRef", __FUNCTION__, __LINE__);
|
//WEBRTC_TRACE(kTraceDebug, "%s:%d Installing Eventhandler for hiviewRef", __FUNCTION__, __LINE__);
|
||||||
|
|
||||||
static const EventTypeSpec hiviewEventTypes[] =
|
static const EventTypeSpec hiviewEventTypes[] =
|
||||||
@ -668,7 +668,7 @@ VideoRenderAGL::~VideoRenderAGL()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEW_HIVIEW_EVENT_HANDLER
|
#ifdef NEW_HIVIEW_EVENT_HANDLER
|
||||||
if(_hiviewEventHandlerRef)
|
if(_hiviewEventHandlerRef)
|
||||||
{
|
{
|
||||||
status = RemoveEventHandler(_hiviewEventHandlerRef);
|
status = RemoveEventHandler(_hiviewEventHandlerRef);
|
||||||
@ -1278,7 +1278,7 @@ int VideoRenderAGL::CreateMixingContext()
|
|||||||
|
|
||||||
//WEBRTC_LOG(kTraceDebug, "Entering 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.
|
// a hardware renderer is used and not a software renderer.
|
||||||
|
|
||||||
GLint attributes[] =
|
GLint attributes[] =
|
||||||
@ -1872,13 +1872,6 @@ int VideoRenderAGL::ChangeWindow(void* newWindowRef)
|
|||||||
UnlockAGLCntx();
|
UnlockAGLCntx();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int32_t VideoRenderAGL::ChangeUniqueID(int32_t id)
|
|
||||||
{
|
|
||||||
LockAGLCntx();
|
|
||||||
|
|
||||||
UnlockAGLCntx();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t VideoRenderAGL::StartRender()
|
int32_t VideoRenderAGL::StartRender()
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,6 @@ class VideoRenderAGL {
|
|||||||
|
|
||||||
// ********** new module functions ************ //
|
// ********** new module functions ************ //
|
||||||
int ChangeWindow(void* newWindowRef);
|
int ChangeWindow(void* newWindowRef);
|
||||||
int32_t ChangeUniqueID(int32_t id);
|
|
||||||
int32_t StartRender();
|
int32_t StartRender();
|
||||||
int32_t StopRender();
|
int32_t StopRender();
|
||||||
int32_t DeleteAGLChannel(const uint32_t streamID);
|
int32_t DeleteAGLChannel(const uint32_t streamID);
|
||||||
|
@ -96,23 +96,6 @@ VideoRenderMacCarbonImpl::Init()
|
|||||||
return 0;
|
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
|
int32_t
|
||||||
VideoRenderMacCarbonImpl::ChangeWindow(void* window)
|
VideoRenderMacCarbonImpl::ChangeWindow(void* window)
|
||||||
{
|
{
|
||||||
|
@ -38,8 +38,6 @@ public:
|
|||||||
|
|
||||||
virtual int32_t Init();
|
virtual int32_t Init();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -38,8 +38,6 @@ public:
|
|||||||
|
|
||||||
virtual int32_t Init();
|
virtual int32_t Init();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -67,21 +67,6 @@ VideoRenderMacCocoaImpl::Init()
|
|||||||
return 0;
|
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
|
int32_t
|
||||||
VideoRenderMacCocoaImpl::ChangeWindow(void* window)
|
VideoRenderMacCocoaImpl::ChangeWindow(void* window)
|
||||||
{
|
{
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
NSOpenGLContext* _nsglContext;
|
NSOpenGLContext* _nsglContext;
|
||||||
int _id;
|
const int _id;
|
||||||
VideoRenderNSOpenGL* _owner;
|
VideoRenderNSOpenGL* _owner;
|
||||||
int32_t _width;
|
int32_t _width;
|
||||||
int32_t _height;
|
int32_t _height;
|
||||||
@ -125,7 +125,6 @@ public: // methods
|
|||||||
|
|
||||||
// ********** new module functions ************ //
|
// ********** new module functions ************ //
|
||||||
int ChangeWindow(CocoaRenderView* newWindowRef);
|
int ChangeWindow(CocoaRenderView* newWindowRef);
|
||||||
int32_t ChangeUniqueID(int32_t id);
|
|
||||||
int32_t StartRender();
|
int32_t StartRender();
|
||||||
int32_t StopRender();
|
int32_t StopRender();
|
||||||
int32_t DeleteNSGLChannel(const uint32_t streamID);
|
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*/,
|
int32_t VideoRenderNSOpenGL::SetText(const uint8_t /*textId*/,
|
||||||
const uint8_t* /*text*/,
|
const uint8_t* /*text*/,
|
||||||
const int32_t /*textLength*/,
|
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()
|
int64_t ModuleVideoRenderImpl::TimeUntilNextProcess()
|
||||||
{
|
{
|
||||||
// Not used
|
// Not used
|
||||||
|
@ -34,11 +34,6 @@ public:
|
|||||||
|
|
||||||
virtual ~ModuleVideoRenderImpl();
|
virtual ~ModuleVideoRenderImpl();
|
||||||
|
|
||||||
/*
|
|
||||||
* Change the unique identifier of this object
|
|
||||||
*/
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int64_t TimeUntilNextProcess();
|
virtual int64_t TimeUntilNextProcess();
|
||||||
virtual int32_t Process();
|
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()
|
int64_t ModuleVideoRenderImpl::TimeUntilNextProcess()
|
||||||
{
|
{
|
||||||
// Not used
|
// Not used
|
||||||
|
@ -23,8 +23,7 @@ namespace webrtc {
|
|||||||
|
|
||||||
VideoRenderWindowsImpl::VideoRenderWindowsImpl(const int32_t id,
|
VideoRenderWindowsImpl::VideoRenderWindowsImpl(const int32_t id,
|
||||||
const VideoRenderType videoRenderType, void* window, const bool fullscreen)
|
const VideoRenderType videoRenderType, void* window, const bool fullscreen)
|
||||||
: _id(id),
|
: _renderWindowsCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_renderWindowsCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
|
|
||||||
_prtWindow(window),
|
_prtWindow(window),
|
||||||
_fullscreen(fullscreen),
|
_fullscreen(fullscreen),
|
||||||
_renderMethod(kVideoRenderWinD3D9),
|
_renderMethod(kVideoRenderWinD3D9),
|
||||||
@ -72,13 +71,6 @@ int32_t VideoRenderWindowsImpl::Init()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t VideoRenderWindowsImpl::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
CriticalSectionScoped cs(&_renderWindowsCritsect);
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t VideoRenderWindowsImpl::ChangeWindow(void* window)
|
int32_t VideoRenderWindowsImpl::ChangeWindow(void* window)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(&_renderWindowsCritsect);
|
CriticalSectionScoped cs(&_renderWindowsCritsect);
|
||||||
|
@ -42,8 +42,6 @@ public:
|
|||||||
|
|
||||||
virtual int32_t Init();
|
virtual int32_t Init();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window);
|
virtual int32_t ChangeWindow(void* window);
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@ -125,7 +123,6 @@ public:
|
|||||||
const float right, const float bottom);
|
const float right, const float bottom);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t _id;
|
|
||||||
CriticalSectionWrapper& _renderWindowsCritsect;
|
CriticalSectionWrapper& _renderWindowsCritsect;
|
||||||
|
|
||||||
void* _prtWindow;
|
void* _prtWindow;
|
||||||
|
@ -20,7 +20,7 @@ namespace test {
|
|||||||
TrafficControlWindows* TrafficControlWindows::instance = NULL;
|
TrafficControlWindows* TrafficControlWindows::instance = NULL;
|
||||||
uint32_t TrafficControlWindows::refCounter = 0;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WEBRTC_TRACE(kTraceDebug, kTraceTransport, gtc->_id,
|
WEBRTC_TRACE(kTraceDebug, kTraceTransport, -1,
|
||||||
"TrafficControlWindows - Releasing object");
|
"TrafficControlWindows - Releasing object");
|
||||||
refCounter--;
|
refCounter--;
|
||||||
if ((0 == refCounter) && instance)
|
if ((0 == refCounter) && instance)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceTransport, gtc->_id,
|
WEBRTC_TRACE(kTraceMemory, kTraceTransport, -1,
|
||||||
"TrafficControlWindows - Deleting object");
|
"TrafficControlWindows - Deleting object");
|
||||||
delete instance;
|
delete instance;
|
||||||
instance = NULL;
|
instance = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int32_t TrafficControlWindows::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ULONG TrafficControlWindows::TcRegisterClient(
|
ULONG TrafficControlWindows::TcRegisterClient(
|
||||||
ULONG TciVersion,
|
ULONG TciVersion,
|
||||||
|
@ -49,8 +49,6 @@ class TrafficControlWindows
|
|||||||
static TrafficControlWindows* GetInstance(const int32_t id);
|
static TrafficControlWindows* GetInstance(const int32_t id);
|
||||||
static void Release(TrafficControlWindows* gtc);
|
static void Release(TrafficControlWindows* gtc);
|
||||||
|
|
||||||
int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
ULONG TcRegisterClient(ULONG TciVersion, HANDLE ClRegCtx,
|
ULONG TcRegisterClient(ULONG TciVersion, HANDLE ClRegCtx,
|
||||||
PTCI_CLIENT_FUNC_LIST ClientHandlerList,
|
PTCI_CLIENT_FUNC_LIST ClientHandlerList,
|
||||||
PHANDLE pClientHandle);
|
PHANDLE pClientHandle);
|
||||||
@ -75,7 +73,6 @@ class TrafficControlWindows
|
|||||||
ULONG TcDeleteFilter(HANDLE FilterHandle);
|
ULONG TcDeleteFilter(HANDLE FilterHandle);
|
||||||
private:
|
private:
|
||||||
TrafficControlWindows(const int32_t id);
|
TrafficControlWindows(const int32_t id);
|
||||||
int32_t _id;
|
|
||||||
TCI_CLIENT_FUNC_LIST QoSFunctions;
|
TCI_CLIENT_FUNC_LIST QoSFunctions;
|
||||||
|
|
||||||
static TrafficControlWindows* instance;
|
static TrafficControlWindows* instance;
|
||||||
|
@ -108,12 +108,6 @@ bool UdpSocket2ManagerWindows::Init(int32_t id,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t UdpSocket2ManagerWindows::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UdpSocket2ManagerWindows::Start()
|
bool UdpSocket2ManagerWindows::Start()
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id,
|
WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id,
|
||||||
|
@ -120,7 +120,6 @@ public:
|
|||||||
virtual ~UdpSocket2ManagerWindows();
|
virtual ~UdpSocket2ManagerWindows();
|
||||||
|
|
||||||
virtual bool Init(int32_t id, uint8_t& numOfWorkThreads);
|
virtual bool Init(int32_t id, uint8_t& numOfWorkThreads);
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
|
||||||
|
|
||||||
virtual bool Start();
|
virtual bool Start();
|
||||||
virtual bool Stop();
|
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()
|
bool UdpSocket2Windows::ValidHandle()
|
||||||
{
|
{
|
||||||
return GetFd() != INVALID_SOCKET;
|
return GetFd() != INVALID_SOCKET;
|
||||||
|
@ -42,8 +42,6 @@ public:
|
|||||||
bool ipV6Enable = false, bool disableGQOS = false);
|
bool ipV6Enable = false, bool disableGQOS = false);
|
||||||
virtual ~UdpSocket2Windows();
|
virtual ~UdpSocket2Windows();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
|
|
||||||
virtual bool ValidHandle() OVERRIDE;
|
virtual bool ValidHandle() OVERRIDE;
|
||||||
|
|
||||||
virtual bool SetCallback(CallbackObj, IncomingSocketCallback) OVERRIDE;
|
virtual bool SetCallback(CallbackObj, IncomingSocketCallback) OVERRIDE;
|
||||||
|
@ -73,12 +73,6 @@ UdpSocketManagerPosix::~UdpSocketManagerPosix()
|
|||||||
delete _critSect;
|
delete _critSect;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t UdpSocketManagerPosix::ChangeUniqueId(const int32_t id)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UdpSocketManagerPosix::Start()
|
bool UdpSocketManagerPosix::Start()
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id,
|
WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id,
|
||||||
|
@ -40,8 +40,6 @@ public:
|
|||||||
|
|
||||||
virtual bool Init(int32_t id, uint8_t& numOfWorkThreads) OVERRIDE;
|
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 Start() OVERRIDE;
|
||||||
virtual bool Stop() OVERRIDE;
|
virtual bool Stop() OVERRIDE;
|
||||||
|
|
||||||
|
@ -30,8 +30,6 @@ public:
|
|||||||
// already initialized.
|
// already initialized.
|
||||||
virtual bool Init(int32_t id, uint8_t& numOfWorkThreads) = 0;
|
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
|
// Start listening to sockets that have been registered via the
|
||||||
// AddSocket(..) API.
|
// AddSocket(..) API.
|
||||||
virtual bool Start() = 0;
|
virtual bool Start() = 0;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr,
|
UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr,
|
||||||
bool ipV6Enable)
|
bool ipV6Enable) : _id(id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceTransport, id,
|
WEBRTC_TRACE(kTraceMemory, kTraceTransport, id,
|
||||||
"UdpSocketPosix::UdpSocketPosix()");
|
"UdpSocketPosix::UdpSocketPosix()");
|
||||||
@ -35,7 +35,6 @@ UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr,
|
|||||||
_wantsIncoming = false;
|
_wantsIncoming = false;
|
||||||
_mgr = mgr;
|
_mgr = mgr;
|
||||||
|
|
||||||
_id = id;
|
|
||||||
_obj = NULL;
|
_obj = NULL;
|
||||||
_incomingCb = NULL;
|
_incomingCb = NULL;
|
||||||
_readyForDeletionCond = ConditionVariableWrapper::CreateConditionVariable();
|
_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)
|
bool UdpSocketPosix::SetCallback(CallbackObj obj, IncomingSocketCallback cb)
|
||||||
{
|
{
|
||||||
_obj = obj;
|
_obj = obj;
|
||||||
|
@ -33,8 +33,6 @@ public:
|
|||||||
|
|
||||||
virtual ~UdpSocketPosix();
|
virtual ~UdpSocketPosix();
|
||||||
|
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
|
|
||||||
|
|
||||||
virtual bool SetCallback(CallbackObj obj,
|
virtual bool SetCallback(CallbackObj obj,
|
||||||
IncomingSocketCallback cb) OVERRIDE;
|
IncomingSocketCallback cb) OVERRIDE;
|
||||||
|
|
||||||
@ -72,7 +70,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class UdpSocketManagerPosix;
|
friend class UdpSocketManagerPosix;
|
||||||
|
|
||||||
int32_t _id;
|
const int32_t _id;
|
||||||
IncomingSocketCallback _incomingCb;
|
IncomingSocketCallback _incomingCb;
|
||||||
CallbackObj _obj;
|
CallbackObj _obj;
|
||||||
|
|
||||||
|
@ -50,9 +50,6 @@ public:
|
|||||||
bool ipV6Enable = false,
|
bool ipV6Enable = false,
|
||||||
bool disableGQOS = 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 cb for receiving callbacks when there are incoming packets.
|
||||||
// Register obj so that it will be passed in calls to cb.
|
// Register obj so that it will be passed in calls to cb.
|
||||||
virtual bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) = 0;
|
virtual bool SetCallback(CallbackObj obj, IncomingSocketCallback cb) = 0;
|
||||||
|
@ -39,7 +39,6 @@ class MockSocketManager : public UdpSocketManager {
|
|||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
MOCK_METHOD2(Init, bool(int32_t, uint8_t&));
|
MOCK_METHOD2(Init, bool(int32_t, uint8_t&));
|
||||||
MOCK_METHOD1(ChangeUniqueId, int32_t(const int32_t));
|
|
||||||
MOCK_METHOD0(Start, bool());
|
MOCK_METHOD0(Start, bool());
|
||||||
MOCK_METHOD0(Stop, bool());
|
MOCK_METHOD0(Stop, bool());
|
||||||
MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*));
|
MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*));
|
||||||
|
@ -28,7 +28,6 @@ namespace test {
|
|||||||
class MockUdpSocketWrapper : public UdpSocketWrapper {
|
class MockUdpSocketWrapper : public UdpSocketWrapper {
|
||||||
public:
|
public:
|
||||||
// The following methods have to be mocked because they are pure.
|
// 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_METHOD2(SetCallback, bool(CallbackObj, IncomingSocketCallback));
|
||||||
MOCK_METHOD1(Bind, bool(const SocketAddress&));
|
MOCK_METHOD1(Bind, bool(const SocketAddress&));
|
||||||
MOCK_METHOD0(ValidHandle, bool());
|
MOCK_METHOD0(ValidHandle, bool());
|
||||||
@ -51,7 +50,6 @@ class MockUdpSocketManager : public UdpSocketManager {
|
|||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
MOCK_METHOD2(Init, bool(int32_t, uint8_t&));
|
MOCK_METHOD2(Init, bool(int32_t, uint8_t&));
|
||||||
MOCK_METHOD1(ChangeUniqueId, int32_t(const int32_t));
|
|
||||||
MOCK_METHOD0(Start, bool());
|
MOCK_METHOD0(Start, bool());
|
||||||
MOCK_METHOD0(Stop, bool());
|
MOCK_METHOD0(Stop, bool());
|
||||||
MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*));
|
MOCK_METHOD1(AddSocket, bool(UdpSocketWrapper*));
|
||||||
|
@ -28,7 +28,7 @@ MonitorModule::~MonitorModule()
|
|||||||
delete &_callbackCritSect;
|
delete &_callbackCritSect;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
MonitorModule::RegisterObserver(MonitorObserver& observer)
|
MonitorModule::RegisterObserver(MonitorObserver& observer)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped lock(&_callbackCritSect);
|
CriticalSectionScoped lock(&_callbackCritSect);
|
||||||
@ -40,7 +40,7 @@ MonitorModule::RegisterObserver(MonitorObserver& observer)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
MonitorModule::DeRegisterObserver()
|
MonitorModule::DeRegisterObserver()
|
||||||
{
|
{
|
||||||
CriticalSectionScoped lock(&_callbackCritSect);
|
CriticalSectionScoped lock(&_callbackCritSect);
|
||||||
@ -52,12 +52,6 @@ MonitorModule::DeRegisterObserver()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
|
||||||
MonitorModule::ChangeUniqueId(int32_t id)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t
|
int64_t
|
||||||
MonitorModule::TimeUntilNextProcess()
|
MonitorModule::TimeUntilNextProcess()
|
||||||
{
|
{
|
||||||
@ -66,7 +60,7 @@ MonitorModule::TimeUntilNextProcess()
|
|||||||
return kAverageProcessUpdateTimeMs - (now - _lastProcessTime);
|
return kAverageProcessUpdateTimeMs - (now - _lastProcessTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
MonitorModule::Process()
|
MonitorModule::Process()
|
||||||
{
|
{
|
||||||
_lastProcessTime = TickTime::MillisecondTimestamp();
|
_lastProcessTime = TickTime::MillisecondTimestamp();
|
||||||
|
@ -40,8 +40,6 @@ public:
|
|||||||
|
|
||||||
virtual ~MonitorModule();
|
virtual ~MonitorModule();
|
||||||
public: // module
|
public: // module
|
||||||
virtual int32_t ChangeUniqueId(int32_t id) OVERRIDE;
|
|
||||||
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
||||||
|
|
||||||
virtual int32_t Process() OVERRIDE;
|
virtual int32_t Process() OVERRIDE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user