niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
mflodman@webrtc.org | 9ec883e | 2012-03-05 17:12:41 +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 | e06ca3c | 2012-06-29 13:20:14 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ |
| 12 | #define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
pbos@webrtc.org | f5d4cb1 | 2013-05-17 13:44:48 +0000 | [diff] [blame] | 14 | #include "webrtc/video_engine/include/vie_base.h" |
| 15 | #include "webrtc/video_engine/vie_defines.h" |
| 16 | #include "webrtc/video_engine/vie_ref_count.h" |
| 17 | #include "webrtc/video_engine/vie_shared_data.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 19 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 20 | |
andresp@webrtc.org | 7707d06 | 2013-05-13 10:50:50 +0000 | [diff] [blame] | 21 | class Config; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 22 | class Module; |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 23 | class VoiceEngine; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 24 | |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 25 | class ViEBaseImpl |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 26 | : public ViEBase, |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 27 | public ViERefCount { |
| 28 | public: |
| 29 | virtual int Release(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 30 | |
mflodman@webrtc.org | 9ec883e | 2012-03-05 17:12:41 +0000 | [diff] [blame] | 31 | // Implements ViEBase. |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 32 | virtual int Init(); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 33 | virtual int SetVoiceEngine(VoiceEngine* voice_engine); |
mflodman@webrtc.org | 6879c8a | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 34 | virtual int RegisterCpuOveruseObserver(int channel, |
| 35 | CpuOveruseObserver* observer); |
asapersson@webrtc.org | 8a8c3ef | 2014-03-20 13:15:01 +0000 | [diff] [blame] | 36 | virtual int SetCpuOveruseOptions(int channel, |
| 37 | const CpuOveruseOptions& options); |
asapersson@webrtc.org | ab6bf4f | 2014-05-27 07:43:15 +0000 | [diff] [blame^] | 38 | virtual int GetCpuOveruseMetrics(int channel, |
| 39 | CpuOveruseMetrics* metrics); |
asapersson@webrtc.org | c7ff8f9 | 2013-11-26 11:12:33 +0000 | [diff] [blame] | 40 | virtual int CpuOveruseMeasures(int channel, |
| 41 | int* capture_jitter_ms, |
asapersson@webrtc.org | 9e5b034 | 2013-12-04 13:47:44 +0000 | [diff] [blame] | 42 | int* avg_encode_time_ms, |
| 43 | int* encode_usage_percent, |
| 44 | int* capture_queue_delay_ms_per_s); |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 45 | virtual int CreateChannel(int& video_channel); // NOLINT |
| 46 | virtual int CreateChannel(int& video_channel, // NOLINT |
henrik.lundin@webrtc.org | 4190774 | 2014-01-29 08:47:15 +0000 | [diff] [blame] | 47 | const Config* config); |
| 48 | virtual int CreateChannel(int& video_channel, // NOLINT |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 49 | int original_channel); |
| 50 | virtual int CreateReceiveChannel(int& video_channel, // NOLINT |
| 51 | int original_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 52 | virtual int DeleteChannel(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 53 | virtual int ConnectAudioChannel(const int video_channel, |
| 54 | const int audio_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 55 | virtual int DisconnectAudioChannel(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 56 | virtual int StartSend(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 57 | virtual int StopSend(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 58 | virtual int StartReceive(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 59 | virtual int StopReceive(const int video_channel); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 60 | virtual int GetVersion(char version[1024]); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 61 | virtual int LastError(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 62 | |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 63 | protected: |
mflodman@webrtc.org | 6879c8a | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 64 | explicit ViEBaseImpl(const Config& config); |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 65 | virtual ~ViEBaseImpl(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 66 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 67 | ViESharedData* shared_data() { return &shared_data_; } |
| 68 | |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 69 | private: |
| 70 | // Version functions. |
pbos@webrtc.org | b238d12 | 2013-04-09 13:41:51 +0000 | [diff] [blame] | 71 | int32_t AddViEVersion(char* str) const; |
| 72 | int32_t AddBuildInfo(char* str) const; |
| 73 | int32_t AddExternalTransportBuild(char* str) const; |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 74 | |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 75 | int CreateChannel(int& video_channel, int original_channel, // NOLINT |
| 76 | bool sender); |
mflodman@webrtc.org | 9ec883e | 2012-03-05 17:12:41 +0000 | [diff] [blame] | 77 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 78 | // ViEBaseImpl owns ViESharedData used by all interface implementations. |
| 79 | ViESharedData shared_data_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 80 | }; |
| 81 | |
mflodman@webrtc.org | 27a82a6 | 2011-11-30 18:04:26 +0000 | [diff] [blame] | 82 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 83 | |
mflodman@webrtc.org | e06ca3c | 2012-06-29 13:20:14 +0000 | [diff] [blame] | 84 | #endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ |