| 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 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 T* ptr; | 70 T* ptr; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // Utility class for aggregating the various WebRTC interface. | 73 // Utility class for aggregating the various WebRTC interface. |
| 74 // Fake implementations can also be injected for testing. | 74 // Fake implementations can also be injected for testing. |
| 75 class VoEWrapper { | 75 class VoEWrapper { |
| 76 public: | 76 public: |
| 77 VoEWrapper() | 77 VoEWrapper() |
| 78 : engine_(webrtc::VoiceEngine::Create()), | 78 : engine_(webrtc::VoiceEngine::Create()), base_(engine_) { |
| 79 base_(engine_), codec_(engine_) { | |
| 80 } | 79 } |
| 81 VoEWrapper(webrtc::VoEBase* base, | 80 VoEWrapper(webrtc::VoEBase* base) |
| 82 webrtc::VoECodec* codec) | 81 : engine_(NULL), base_(base) { |
| 83 : engine_(NULL), | |
| 84 base_(base), | |
| 85 codec_(codec) { | |
| 86 } | 82 } |
| 87 ~VoEWrapper() {} | 83 ~VoEWrapper() {} |
| 88 webrtc::VoiceEngine* engine() const { return engine_.get(); } | 84 webrtc::VoiceEngine* engine() const { return engine_.get(); } |
| 89 webrtc::VoEBase* base() const { return base_.get(); } | 85 webrtc::VoEBase* base() const { return base_.get(); } |
| 90 webrtc::VoECodec* codec() const { return codec_.get(); } | |
| 91 int error() { return base_->LastError(); } | 86 int error() { return base_->LastError(); } |
| 92 | 87 |
| 93 private: | 88 private: |
| 94 scoped_voe_engine engine_; | 89 scoped_voe_engine engine_; |
| 95 scoped_voe_ptr<webrtc::VoEBase> base_; | 90 scoped_voe_ptr<webrtc::VoEBase> base_; |
| 96 scoped_voe_ptr<webrtc::VoECodec> codec_; | |
| 97 }; | 91 }; |
| 98 } // namespace cricket | 92 } // namespace cricket |
| 99 | 93 |
| 100 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ | 94 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ |
| OLD | NEW |