| 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 |
| 11 #include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixt
ure.h" | 11 #include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixt
ure.h" |
| 12 | 12 |
| 13 #include "webrtc/system_wrappers/include/sleep.h" | 13 #include "webrtc/system_wrappers/include/sleep.h" |
| 14 | 14 |
| 15 BeforeInitializationFixture::BeforeInitializationFixture() | 15 BeforeInitializationFixture::BeforeInitializationFixture() |
| 16 : voice_engine_(webrtc::VoiceEngine::Create()) { | 16 : voice_engine_(webrtc::VoiceEngine::Create()) { |
| 17 EXPECT_TRUE(voice_engine_ != NULL); | 17 EXPECT_TRUE(voice_engine_ != NULL); |
| 18 | 18 |
| 19 voe_base_ = webrtc::VoEBase::GetInterface(voice_engine_); | 19 voe_base_ = webrtc::VoEBase::GetInterface(voice_engine_); |
| 20 voe_codec_ = webrtc::VoECodec::GetInterface(voice_engine_); | 20 voe_codec_ = webrtc::VoECodec::GetInterface(voice_engine_); |
| 21 voe_rtp_rtcp_ = webrtc::VoERTP_RTCP::GetInterface(voice_engine_); | 21 voe_rtp_rtcp_ = webrtc::VoERTP_RTCP::GetInterface(voice_engine_); |
| 22 voe_network_ = webrtc::VoENetwork::GetInterface(voice_engine_); | 22 voe_network_ = webrtc::VoENetwork::GetInterface(voice_engine_); |
| 23 voe_file_ = webrtc::VoEFile::GetInterface(voice_engine_); | 23 voe_file_ = webrtc::VoEFile::GetInterface(voice_engine_); |
| 24 voe_hardware_ = webrtc::VoEHardware::GetInterface(voice_engine_); | |
| 25 } | 24 } |
| 26 | 25 |
| 27 BeforeInitializationFixture::~BeforeInitializationFixture() { | 26 BeforeInitializationFixture::~BeforeInitializationFixture() { |
| 28 voe_base_->Release(); | 27 voe_base_->Release(); |
| 29 voe_codec_->Release(); | 28 voe_codec_->Release(); |
| 30 voe_rtp_rtcp_->Release(); | 29 voe_rtp_rtcp_->Release(); |
| 31 voe_network_->Release(); | 30 voe_network_->Release(); |
| 32 voe_file_->Release(); | 31 voe_file_->Release(); |
| 33 voe_hardware_->Release(); | |
| 34 | 32 |
| 35 EXPECT_TRUE(webrtc::VoiceEngine::Delete(voice_engine_)); | 33 EXPECT_TRUE(webrtc::VoiceEngine::Delete(voice_engine_)); |
| 36 } | 34 } |
| 37 | 35 |
| 38 void BeforeInitializationFixture::Sleep(long milliseconds) { | 36 void BeforeInitializationFixture::Sleep(long milliseconds) { |
| 39 webrtc::SleepMs(milliseconds); | 37 webrtc::SleepMs(milliseconds); |
| 40 } | 38 } |
| OLD | NEW |