niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
astor@webrtc.org | bd7aeba | 2012-06-26 10:47:04 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 11 | // ViESharedData contains data and instances common to all interface |
| 12 | // implementations. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 14 | #ifndef WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_ |
| 15 | #define WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 17 | #include "video_engine/vie_defines.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | |
| 19 | namespace webrtc { |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 20 | |
andresp@webrtc.org | 7707d06 | 2013-05-13 10:50:50 +0000 | [diff] [blame^] | 21 | class Config; |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 22 | class ProcessThread; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 23 | class ViEChannelManager; |
| 24 | class ViEInputManager; |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 25 | class ViERenderManager; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 27 | class ViESharedData { |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 28 | public: |
andresp@webrtc.org | 7707d06 | 2013-05-13 10:50:50 +0000 | [diff] [blame^] | 29 | ViESharedData(const Config& config); |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 30 | ~ViESharedData(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 32 | bool Initialized() const; |
| 33 | int SetInitialized(); |
| 34 | int SetUnInitialized(); |
| 35 | void SetLastError(const int error) const; |
| 36 | int LastErrorInternal() const; |
astor@webrtc.org | c0496e6 | 2012-08-10 10:14:43 +0000 | [diff] [blame] | 37 | void SetOverUseDetectorOptions(const OverUseDetectorOptions& options); |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 38 | int NumberOfCores() const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 39 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 40 | int instance_id() { return instance_id_;} |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 41 | ViEChannelManager* channel_manager() { return &channel_manager_; } |
| 42 | ViEInputManager* input_manager() { return &input_manager_; } |
| 43 | ViERenderManager* render_manager() { return &render_manager_; } |
| 44 | |
| 45 | private: |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 46 | static int instance_counter_; |
| 47 | const int instance_id_; |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 48 | bool initialized_; |
| 49 | const int number_cores_; |
| 50 | |
astor@webrtc.org | bd7aeba | 2012-06-26 10:47:04 +0000 | [diff] [blame] | 51 | OverUseDetectorOptions over_use_detector_options_; |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 52 | ViEChannelManager& channel_manager_; |
| 53 | ViEInputManager& input_manager_; |
| 54 | ViERenderManager& render_manager_; |
| 55 | ProcessThread* module_process_thread_; |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 56 | mutable int last_error_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 57 | }; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | |
mflodman@webrtc.org | 471e83e | 2011-11-24 15:16:00 +0000 | [diff] [blame] | 59 | } // namespace webrtc |
| 60 | |
| 61 | #endif // WEBRTC_VIDEO_ENGINE_VIE_SHARED_DATA_H_ |