Remove SetOverUseDetectorOptions and cleaned ViESharedData.
R=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1486004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4042 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -19,50 +19,30 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Active instance counter
|
||||
int ViESharedData::instance_counter_ = 0;
|
||||
|
||||
ViESharedData::ViESharedData(const Config& config)
|
||||
: instance_id_(++instance_counter_),
|
||||
initialized_(false),
|
||||
number_cores_(CpuInfo::DetectNumberOfCores()),
|
||||
over_use_detector_options_(),
|
||||
channel_manager_(*new ViEChannelManager(instance_id_, number_cores_,
|
||||
config)),
|
||||
input_manager_(*new ViEInputManager(instance_id_, config)),
|
||||
render_manager_(*new ViERenderManager(instance_id_)),
|
||||
: number_cores_(CpuInfo::DetectNumberOfCores()),
|
||||
channel_manager_(new ViEChannelManager(0, number_cores_, config)),
|
||||
input_manager_(new ViEInputManager(0, config)),
|
||||
render_manager_(new ViERenderManager(0)),
|
||||
module_process_thread_(ProcessThread::CreateProcessThread()),
|
||||
last_error_(0) {
|
||||
Trace::CreateTrace();
|
||||
channel_manager_.SetModuleProcessThread(module_process_thread_);
|
||||
input_manager_.SetModuleProcessThread(module_process_thread_);
|
||||
channel_manager_->SetModuleProcessThread(module_process_thread_);
|
||||
input_manager_->SetModuleProcessThread(module_process_thread_);
|
||||
module_process_thread_->Start();
|
||||
}
|
||||
|
||||
ViESharedData::~ViESharedData() {
|
||||
delete &input_manager_;
|
||||
delete &channel_manager_;
|
||||
delete &render_manager_;
|
||||
// Release these ones before the process thread and the trace.
|
||||
input_manager_.reset();
|
||||
channel_manager_.reset();
|
||||
render_manager_.reset();
|
||||
|
||||
module_process_thread_->Stop();
|
||||
ProcessThread::DestroyProcessThread(module_process_thread_);
|
||||
Trace::ReturnTrace();
|
||||
}
|
||||
|
||||
bool ViESharedData::Initialized() const {
|
||||
return initialized_;
|
||||
}
|
||||
|
||||
int ViESharedData::SetInitialized() {
|
||||
initialized_ = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViESharedData::SetUnInitialized() {
|
||||
initialized_ = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ViESharedData::SetLastError(const int error) const {
|
||||
last_error_ = error;
|
||||
}
|
||||
@@ -73,11 +53,6 @@ int ViESharedData::LastErrorInternal() const {
|
||||
return error;
|
||||
}
|
||||
|
||||
void ViESharedData::SetOverUseDetectorOptions(
|
||||
const OverUseDetectorOptions& options) {
|
||||
over_use_detector_options_ = options;
|
||||
}
|
||||
|
||||
int ViESharedData::NumberOfCores() const {
|
||||
return number_cores_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user