| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <memory> |
| 11 #include <sstream> | 12 #include <sstream> |
| 12 #include <string> | 13 #include <string> |
| 13 | 14 |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
| 17 #include "webrtc/base/scoped_ptr.h" | |
| 18 #include "webrtc/base/thread_annotations.h" | 18 #include "webrtc/base/thread_annotations.h" |
| 19 #include "webrtc/call.h" | 19 #include "webrtc/call.h" |
| 20 #include "webrtc/call/transport_adapter.h" | 20 #include "webrtc/call/transport_adapter.h" |
| 21 #include "webrtc/config.h" | 21 #include "webrtc/config.h" |
| 22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 23 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 23 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" | 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
| 25 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 25 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| 26 #include "webrtc/system_wrappers/include/rtp_to_ntp.h" | 26 #include "webrtc/system_wrappers/include/rtp_to_ntp.h" |
| 27 #include "webrtc/test/call_test.h" | 27 #include "webrtc/test/call_test.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 } else { | 228 } else { |
| 229 ret = voe_network_->ReceivedRTPPacket(channel_, packet, length, | 229 ret = voe_network_->ReceivedRTPPacket(channel_, packet, length, |
| 230 PacketTime()); | 230 PacketTime()); |
| 231 } | 231 } |
| 232 return ret == 0 ? DELIVERY_OK : DELIVERY_PACKET_ERROR; | 232 return ret == 0 ? DELIVERY_OK : DELIVERY_PACKET_ERROR; |
| 233 } | 233 } |
| 234 | 234 |
| 235 private: | 235 private: |
| 236 int channel_; | 236 int channel_; |
| 237 VoENetwork* voe_network_; | 237 VoENetwork* voe_network_; |
| 238 rtc::scoped_ptr<RtpHeaderParser> parser_; | 238 std::unique_ptr<RtpHeaderParser> parser_; |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 VoiceEngine* voice_engine = VoiceEngine::Create(); | 241 VoiceEngine* voice_engine = VoiceEngine::Create(); |
| 242 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); | 242 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); |
| 243 VoECodec* voe_codec = VoECodec::GetInterface(voice_engine); | 243 VoECodec* voe_codec = VoECodec::GetInterface(voice_engine); |
| 244 VoENetwork* voe_network = VoENetwork::GetInterface(voice_engine); | 244 VoENetwork* voe_network = VoENetwork::GetInterface(voice_engine); |
| 245 VoEVideoSync* voe_sync = VoEVideoSync::GetInterface(voice_engine); | 245 VoEVideoSync* voe_sync = VoEVideoSync::GetInterface(voice_engine); |
| 246 const std::string audio_filename = | 246 const std::string audio_filename = |
| 247 test::ResourcePath("voice_engine/audio_long16", "pcm"); | 247 test::ResourcePath("voice_engine/audio_long16", "pcm"); |
| 248 ASSERT_STRNE("", audio_filename.c_str()); | 248 ASSERT_STRNE("", audio_filename.c_str()); |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 int encoder_inits_; | 776 int encoder_inits_; |
| 777 uint32_t last_set_bitrate_; | 777 uint32_t last_set_bitrate_; |
| 778 VideoSendStream* send_stream_; | 778 VideoSendStream* send_stream_; |
| 779 VideoEncoderConfig encoder_config_; | 779 VideoEncoderConfig encoder_config_; |
| 780 } test; | 780 } test; |
| 781 | 781 |
| 782 RunBaseTest(&test); | 782 RunBaseTest(&test); |
| 783 } | 783 } |
| 784 | 784 |
| 785 } // namespace webrtc | 785 } // namespace webrtc |
| OLD | NEW |