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 "common_types.h" // NOLINT(build/include) | 16 #include "common_types.h" // NOLINT(build/include) |
17 #include "modules/audio_device/include/audio_device.h" | 17 #include "modules/audio_device/include/audio_device.h" |
18 #include "voice_engine/include/voe_base.h" | 18 #include "voice_engine/include/voe_base.h" |
19 #include "voice_engine/include/voe_codec.h" | |
20 #include "voice_engine/include/voe_errors.h" | 19 #include "voice_engine/include/voe_errors.h" |
21 | 20 |
22 namespace cricket { | 21 namespace cricket { |
23 // automatically handles lifetime of WebRtc VoiceEngine | 22 // automatically handles lifetime of WebRtc VoiceEngine |
24 class scoped_voe_engine { | 23 class scoped_voe_engine { |
25 public: | 24 public: |
26 explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {} | 25 explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {} |
27 // RTC_DCHECK, to ensure that there are no leaks at shutdown | 26 // RTC_DCHECK, to ensure that there are no leaks at shutdown |
28 ~scoped_voe_engine() { | 27 ~scoped_voe_engine() { |
29 if (ptr) { | 28 if (ptr) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 webrtc::VoiceEngine* engine() const { return engine_.get(); } | 81 webrtc::VoiceEngine* engine() const { return engine_.get(); } |
83 webrtc::VoEBase* base() const { return base_.get(); } | 82 webrtc::VoEBase* base() const { return base_.get(); } |
84 | 83 |
85 private: | 84 private: |
86 scoped_voe_engine engine_; | 85 scoped_voe_engine engine_; |
87 scoped_voe_ptr<webrtc::VoEBase> base_; | 86 scoped_voe_ptr<webrtc::VoEBase> base_; |
88 }; | 87 }; |
89 } // namespace cricket | 88 } // namespace cricket |
90 | 89 |
91 #endif // MEDIA_ENGINE_WEBRTCVOE_H_ | 90 #endif // MEDIA_ENGINE_WEBRTCVOE_H_ |
OLD | NEW |