| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef MEDIA_ENGINE_WEBRTCVOE_H_ | 11 #ifndef MEDIA_ENGINE_WEBRTCVOE_H_ |
| 12 #define MEDIA_ENGINE_WEBRTCVOE_H_ | 12 #define MEDIA_ENGINE_WEBRTCVOE_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "media/engine/webrtccommon.h" | |
| 17 | |
| 18 #include "common_types.h" // NOLINT(build/include) | 16 #include "common_types.h" // NOLINT(build/include) |
| 19 #include "modules/audio_device/include/audio_device.h" | 17 #include "modules/audio_device/include/audio_device.h" |
| 20 #include "voice_engine/include/voe_base.h" | 18 #include "voice_engine/include/voe_base.h" |
| 21 #include "voice_engine/include/voe_codec.h" | 19 #include "voice_engine/include/voe_codec.h" |
| 22 #include "voice_engine/include/voe_errors.h" | 20 #include "voice_engine/include/voe_errors.h" |
| 23 | 21 |
| 24 namespace cricket { | 22 namespace cricket { |
| 25 // automatically handles lifetime of WebRtc VoiceEngine | 23 // automatically handles lifetime of WebRtc VoiceEngine |
| 26 class scoped_voe_engine { | 24 class scoped_voe_engine { |
| 27 public: | 25 public: |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 public: | 74 public: |
| 77 VoEWrapper() | 75 VoEWrapper() |
| 78 : engine_(webrtc::VoiceEngine::Create()), base_(engine_) { | 76 : engine_(webrtc::VoiceEngine::Create()), base_(engine_) { |
| 79 } | 77 } |
| 80 VoEWrapper(webrtc::VoEBase* base) | 78 VoEWrapper(webrtc::VoEBase* base) |
| 81 : engine_(NULL), base_(base) { | 79 : engine_(NULL), base_(base) { |
| 82 } | 80 } |
| 83 ~VoEWrapper() {} | 81 ~VoEWrapper() {} |
| 84 webrtc::VoiceEngine* engine() const { return engine_.get(); } | 82 webrtc::VoiceEngine* engine() const { return engine_.get(); } |
| 85 webrtc::VoEBase* base() const { return base_.get(); } | 83 webrtc::VoEBase* base() const { return base_.get(); } |
| 86 int error() { return base_->LastError(); } | |
| 87 | 84 |
| 88 private: | 85 private: |
| 89 scoped_voe_engine engine_; | 86 scoped_voe_engine engine_; |
| 90 scoped_voe_ptr<webrtc::VoEBase> base_; | 87 scoped_voe_ptr<webrtc::VoEBase> base_; |
| 91 }; | 88 }; |
| 92 } // namespace cricket | 89 } // namespace cricket |
| 93 | 90 |
| 94 #endif // MEDIA_ENGINE_WEBRTCVOE_H_ | 91 #endif // MEDIA_ENGINE_WEBRTCVOE_H_ |
| OLD | NEW |