| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 public VoERTP_RTCPImpl, | 76 public VoERTP_RTCPImpl, |
| 77 #endif | 77 #endif |
| 78 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API | 78 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 79 public VoEVideoSyncImpl, | 79 public VoEVideoSyncImpl, |
| 80 #endif | 80 #endif |
| 81 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API | 81 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 82 public VoEVolumeControlImpl, | 82 public VoEVolumeControlImpl, |
| 83 #endif | 83 #endif |
| 84 public VoEBaseImpl { | 84 public VoEBaseImpl { |
| 85 public: | 85 public: |
| 86 VoiceEngineImpl(const Config* config, bool owns_config) | 86 VoiceEngineImpl() |
| 87 : SharedData(*config), | 87 : SharedData(), |
| 88 #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API | 88 #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 89 VoEAudioProcessingImpl(this), | 89 VoEAudioProcessingImpl(this), |
| 90 #endif | 90 #endif |
| 91 #ifdef WEBRTC_VOICE_ENGINE_CODEC_API | 91 #ifdef WEBRTC_VOICE_ENGINE_CODEC_API |
| 92 VoECodecImpl(this), | 92 VoECodecImpl(this), |
| 93 #endif | 93 #endif |
| 94 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API | 94 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API |
| 95 VoEExternalMediaImpl(this), | 95 VoEExternalMediaImpl(this), |
| 96 #endif | 96 #endif |
| 97 #ifdef WEBRTC_VOICE_ENGINE_FILE_API | 97 #ifdef WEBRTC_VOICE_ENGINE_FILE_API |
| 98 VoEFileImpl(this), | 98 VoEFileImpl(this), |
| 99 #endif | 99 #endif |
| 100 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API | 100 #ifdef WEBRTC_VOICE_ENGINE_HARDWARE_API |
| 101 VoEHardwareImpl(this), | 101 VoEHardwareImpl(this), |
| 102 #endif | 102 #endif |
| 103 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | 103 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
| 104 VoENetEqStatsImpl(this), | 104 VoENetEqStatsImpl(this), |
| 105 #endif | 105 #endif |
| 106 VoENetworkImpl(this), | 106 VoENetworkImpl(this), |
| 107 #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API | 107 #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
| 108 VoERTP_RTCPImpl(this), | 108 VoERTP_RTCPImpl(this), |
| 109 #endif | 109 #endif |
| 110 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API | 110 #ifdef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API |
| 111 VoEVideoSyncImpl(this), | 111 VoEVideoSyncImpl(this), |
| 112 #endif | 112 #endif |
| 113 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API | 113 #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API |
| 114 VoEVolumeControlImpl(this), | 114 VoEVolumeControlImpl(this), |
| 115 #endif | 115 #endif |
| 116 VoEBaseImpl(this), | 116 VoEBaseImpl(this), |
| 117 _ref_count(0), | 117 _ref_count(0) {} |
| 118 own_config_(owns_config ? config : NULL) { | |
| 119 } | |
| 120 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } | 118 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } |
| 121 | 119 |
| 122 int AddRef(); | 120 int AddRef(); |
| 123 | 121 |
| 124 // This implements the Release() method for all the inherited interfaces. | 122 // This implements the Release() method for all the inherited interfaces. |
| 125 int Release() override; | 123 int Release() override; |
| 126 | 124 |
| 127 // Backdoor to access a voe::Channel object without a channel ID. This is only | 125 // Backdoor to access a voe::Channel object without a channel ID. This is only |
| 128 // to be used while refactoring the VoE API! | 126 // to be used while refactoring the VoE API! |
| 129 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); | 127 virtual std::unique_ptr<voe::ChannelProxy> GetChannelProxy(int channel_id); |
| 130 | 128 |
| 131 // This is *protected* so that FakeVoiceEngine can inherit from the class and | 129 // This is *protected* so that FakeVoiceEngine can inherit from the class and |
| 132 // manipulate the reference count. See: fake_voice_engine.h. | 130 // manipulate the reference count. See: fake_voice_engine.h. |
| 133 protected: | 131 protected: |
| 134 Atomic32 _ref_count; | 132 Atomic32 _ref_count; |
| 135 private: | |
| 136 std::unique_ptr<const Config> own_config_; | |
| 137 }; | 133 }; |
| 138 | 134 |
| 139 } // namespace webrtc | 135 } // namespace webrtc |
| 140 | 136 |
| 141 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H | 137 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
| OLD | NEW |