OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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/test/testsupport/fileutils.h" |
11 #include "webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h
" | 12 #include "webrtc/voice_engine/test/auto_test/fixtures/before_streaming_fixture.h
" |
12 | 13 |
13 BeforeStreamingFixture::BeforeStreamingFixture() | 14 BeforeStreamingFixture::BeforeStreamingFixture() |
14 : channel_(voe_base_->CreateChannel()), | 15 : channel_(voe_base_->CreateChannel()), |
15 transport_(NULL) { | 16 transport_(NULL) { |
16 EXPECT_GE(channel_, 0); | 17 EXPECT_GE(channel_, 0); |
17 | 18 |
18 fake_microphone_input_file_ = resource_manager_.long_audio_file_path(); | 19 fake_microphone_input_file_ = |
19 EXPECT_FALSE(fake_microphone_input_file_.empty()); | 20 webrtc::test::ResourcePath("voice_engine/audio_long16", "pcm"); |
20 | 21 |
21 SetUpLocalPlayback(); | 22 SetUpLocalPlayback(); |
22 RestartFakeMicrophone(); | 23 RestartFakeMicrophone(); |
23 } | 24 } |
24 | 25 |
25 BeforeStreamingFixture::~BeforeStreamingFixture() { | 26 BeforeStreamingFixture::~BeforeStreamingFixture() { |
26 voe_file_->StopPlayingFileAsMicrophone(channel_); | 27 voe_file_->StopPlayingFileAsMicrophone(channel_); |
27 PausePlaying(); | 28 PausePlaying(); |
28 | 29 |
29 EXPECT_EQ(0, voe_network_->DeRegisterExternalTransport(channel_)); | 30 EXPECT_EQ(0, voe_network_->DeRegisterExternalTransport(channel_)); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 codec.plfreq = 8000; | 69 codec.plfreq = 8000; |
69 codec.pltype = 0; | 70 codec.pltype = 0; |
70 codec.rate = 64000; | 71 codec.rate = 64000; |
71 #if defined(_MSC_VER) && defined(_WIN32) | 72 #if defined(_MSC_VER) && defined(_WIN32) |
72 _snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE - 1, "PCMU"); | 73 _snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE - 1, "PCMU"); |
73 #else | 74 #else |
74 snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE, "PCMU"); | 75 snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE, "PCMU"); |
75 #endif | 76 #endif |
76 voe_codec_->SetSendCodec(channel_, codec); | 77 voe_codec_->SetSendCodec(channel_, codec); |
77 } | 78 } |
OLD | NEW |