2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-06-26 10:47:04 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2011-11-24 15:16:00 +00:00
|
|
|
// ViESharedData contains data and instances common to all interface
|
|
|
|
|
// implementations.
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-24 15:16:00 +00:00
|
|
|
#ifndef WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_
|
|
|
|
|
#define WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-01-25 13:42:03 +00:00
|
|
|
#include "video_engine/vie_defines.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
2011-11-24 15:16:00 +00:00
|
|
|
|
|
|
|
|
class ProcessThread;
|
2011-07-07 08:21:25 +00:00
|
|
|
class ViEChannelManager;
|
|
|
|
|
class ViEInputManager;
|
2011-11-24 15:16:00 +00:00
|
|
|
class ViERenderManager;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-24 15:16:00 +00:00
|
|
|
class ViESharedData {
|
2012-01-25 13:42:03 +00:00
|
|
|
public:
|
2011-11-24 15:16:00 +00:00
|
|
|
ViESharedData();
|
|
|
|
|
~ViESharedData();
|
|
|
|
|
|
|
|
|
|
bool Initialized() const;
|
|
|
|
|
int SetInitialized();
|
|
|
|
|
int SetUnInitialized();
|
|
|
|
|
void SetLastError(const int error) const;
|
|
|
|
|
int LastErrorInternal() const;
|
2012-08-10 10:14:43 +00:00
|
|
|
void SetOverUseDetectorOptions(const OverUseDetectorOptions& options);
|
2011-11-24 15:16:00 +00:00
|
|
|
int NumberOfCores() const;
|
|
|
|
|
|
2012-01-25 13:42:03 +00:00
|
|
|
int instance_id() { return instance_id_;}
|
|
|
|
|
ViEChannelManager* channel_manager() { return &channel_manager_; }
|
|
|
|
|
ViEInputManager* input_manager() { return &input_manager_; }
|
|
|
|
|
ViERenderManager* render_manager() { return &render_manager_; }
|
|
|
|
|
|
|
|
|
|
private:
|
2011-11-24 15:16:00 +00:00
|
|
|
static int instance_counter_;
|
|
|
|
|
const int instance_id_;
|
|
|
|
|
bool initialized_;
|
|
|
|
|
const int number_cores_;
|
|
|
|
|
|
2012-06-26 10:47:04 +00:00
|
|
|
OverUseDetectorOptions over_use_detector_options_;
|
2011-11-24 15:16:00 +00:00
|
|
|
ViEChannelManager& channel_manager_;
|
|
|
|
|
ViEInputManager& input_manager_;
|
|
|
|
|
ViERenderManager& render_manager_;
|
|
|
|
|
ProcessThread* module_process_thread_;
|
|
|
|
|
mutable int last_error_;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
2011-11-24 15:16:00 +00:00
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_
|