| 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 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 void BeforeStreamingFixture::RestartFakeMicrophone() { | 42 void BeforeStreamingFixture::RestartFakeMicrophone() { |
| 43 EXPECT_EQ(0, voe_file_->StartPlayingFileAsMicrophone( | 43 EXPECT_EQ(0, voe_file_->StartPlayingFileAsMicrophone( |
| 44 channel_, fake_microphone_input_file_.c_str(), true, true)); | 44 channel_, fake_microphone_input_file_.c_str(), true, true)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void BeforeStreamingFixture::PausePlaying() { | 47 void BeforeStreamingFixture::PausePlaying() { |
| 48 EXPECT_EQ(0, voe_base_->StopSend(channel_)); | 48 EXPECT_EQ(0, voe_base_->StopSend(channel_)); |
| 49 EXPECT_EQ(0, voe_base_->StopPlayout(channel_)); | 49 EXPECT_EQ(0, voe_base_->StopPlayout(channel_)); |
| 50 EXPECT_EQ(0, voe_base_->StopReceive(channel_)); | |
| 51 } | 50 } |
| 52 | 51 |
| 53 void BeforeStreamingFixture::ResumePlaying() { | 52 void BeforeStreamingFixture::ResumePlaying() { |
| 54 EXPECT_EQ(0, voe_base_->StartReceive(channel_)); | |
| 55 EXPECT_EQ(0, voe_base_->StartPlayout(channel_)); | 53 EXPECT_EQ(0, voe_base_->StartPlayout(channel_)); |
| 56 EXPECT_EQ(0, voe_base_->StartSend(channel_)); | 54 EXPECT_EQ(0, voe_base_->StartSend(channel_)); |
| 57 } | 55 } |
| 58 | 56 |
| 59 void BeforeStreamingFixture::WaitForTransmittedPackets(int32_t packet_count) { | 57 void BeforeStreamingFixture::WaitForTransmittedPackets(int32_t packet_count) { |
| 60 transport_->WaitForTransmittedPackets(packet_count); | 58 transport_->WaitForTransmittedPackets(packet_count); |
| 61 } | 59 } |
| 62 | 60 |
| 63 void BeforeStreamingFixture::SetUpLocalPlayback() { | 61 void BeforeStreamingFixture::SetUpLocalPlayback() { |
| 64 transport_ = new LoopBackTransport(voe_network_, channel_); | 62 transport_ = new LoopBackTransport(voe_network_, channel_); |
| 65 EXPECT_EQ(0, voe_network_->RegisterExternalTransport(channel_, *transport_)); | 63 EXPECT_EQ(0, voe_network_->RegisterExternalTransport(channel_, *transport_)); |
| 66 | 64 |
| 67 webrtc::CodecInst codec; | 65 webrtc::CodecInst codec; |
| 68 codec.channels = 1; | 66 codec.channels = 1; |
| 69 codec.pacsize = 160; | 67 codec.pacsize = 160; |
| 70 codec.plfreq = 8000; | 68 codec.plfreq = 8000; |
| 71 codec.pltype = 0; | 69 codec.pltype = 0; |
| 72 codec.rate = 64000; | 70 codec.rate = 64000; |
| 73 #if defined(_MSC_VER) && defined(_WIN32) | 71 #if defined(_MSC_VER) && defined(_WIN32) |
| 74 _snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE - 1, "PCMU"); | 72 _snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE - 1, "PCMU"); |
| 75 #else | 73 #else |
| 76 snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE, "PCMU"); | 74 snprintf(codec.plname, RTP_PAYLOAD_NAME_SIZE, "PCMU"); |
| 77 #endif | 75 #endif |
| 78 voe_codec_->SetSendCodec(channel_, codec); | 76 voe_codec_->SetSendCodec(channel_, codec); |
| 79 } | 77 } |
| OLD | NEW |