| 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 #ifndef WEBRTC_TEST_CALL_TEST_H_ | 10 #ifndef WEBRTC_TEST_CALL_TEST_H_ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void CreateVideoStreams(); | 76 void CreateVideoStreams(); |
| 77 void CreateAudioStreams(); | 77 void CreateAudioStreams(); |
| 78 void Start(); | 78 void Start(); |
| 79 void Stop(); | 79 void Stop(); |
| 80 void DestroyStreams(); | 80 void DestroyStreams(); |
| 81 void SetFakeVideoCaptureRotation(VideoRotation rotation); | 81 void SetFakeVideoCaptureRotation(VideoRotation rotation); |
| 82 | 82 |
| 83 Clock* const clock_; | 83 Clock* const clock_; |
| 84 | 84 |
| 85 rtc::scoped_ptr<Call> sender_call_; | 85 std::unique_ptr<Call> sender_call_; |
| 86 rtc::scoped_ptr<PacketTransport> send_transport_; | 86 std::unique_ptr<PacketTransport> send_transport_; |
| 87 VideoSendStream::Config video_send_config_; | 87 VideoSendStream::Config video_send_config_; |
| 88 VideoEncoderConfig video_encoder_config_; | 88 VideoEncoderConfig video_encoder_config_; |
| 89 VideoSendStream* video_send_stream_; | 89 VideoSendStream* video_send_stream_; |
| 90 AudioSendStream::Config audio_send_config_; | 90 AudioSendStream::Config audio_send_config_; |
| 91 AudioSendStream* audio_send_stream_; | 91 AudioSendStream* audio_send_stream_; |
| 92 | 92 |
| 93 rtc::scoped_ptr<Call> receiver_call_; | 93 std::unique_ptr<Call> receiver_call_; |
| 94 rtc::scoped_ptr<PacketTransport> receive_transport_; | 94 std::unique_ptr<PacketTransport> receive_transport_; |
| 95 std::vector<VideoReceiveStream::Config> video_receive_configs_; | 95 std::vector<VideoReceiveStream::Config> video_receive_configs_; |
| 96 std::vector<VideoReceiveStream*> video_receive_streams_; | 96 std::vector<VideoReceiveStream*> video_receive_streams_; |
| 97 std::vector<AudioReceiveStream::Config> audio_receive_configs_; | 97 std::vector<AudioReceiveStream::Config> audio_receive_configs_; |
| 98 std::vector<AudioReceiveStream*> audio_receive_streams_; | 98 std::vector<AudioReceiveStream*> audio_receive_streams_; |
| 99 | 99 |
| 100 rtc::scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; | 100 std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; |
| 101 test::FakeEncoder fake_encoder_; | 101 test::FakeEncoder fake_encoder_; |
| 102 std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders_; | 102 std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders_; |
| 103 size_t num_video_streams_; | 103 size_t num_video_streams_; |
| 104 size_t num_audio_streams_; | 104 size_t num_audio_streams_; |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. | 107 // TODO(holmer): Remove once VoiceEngine is fully refactored to the new API. |
| 108 // These methods are used to set up legacy voice engines and channels which is | 108 // These methods are used to set up legacy voice engines and channels which is |
| 109 // necessary while voice engine is being refactored to the new stream API. | 109 // necessary while voice engine is being refactored to the new stream API. |
| 110 struct VoiceEngineState { | 110 struct VoiceEngineState { |
| 111 VoiceEngineState() | 111 VoiceEngineState() |
| 112 : voice_engine(nullptr), | 112 : voice_engine(nullptr), |
| 113 base(nullptr), | 113 base(nullptr), |
| 114 codec(nullptr), | 114 codec(nullptr), |
| 115 channel_id(-1) {} | 115 channel_id(-1) {} |
| 116 | 116 |
| 117 VoiceEngine* voice_engine; | 117 VoiceEngine* voice_engine; |
| 118 VoEBase* base; | 118 VoEBase* base; |
| 119 VoECodec* codec; | 119 VoECodec* codec; |
| 120 int channel_id; | 120 int channel_id; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 void CreateVoiceEngines(); | 123 void CreateVoiceEngines(); |
| 124 void DestroyVoiceEngines(); | 124 void DestroyVoiceEngines(); |
| 125 | 125 |
| 126 VoiceEngineState voe_send_; | 126 VoiceEngineState voe_send_; |
| 127 VoiceEngineState voe_recv_; | 127 VoiceEngineState voe_recv_; |
| 128 | 128 |
| 129 // The audio devices must outlive the voice engines. | 129 // The audio devices must outlive the voice engines. |
| 130 rtc::scoped_ptr<test::FakeAudioDevice> fake_send_audio_device_; | 130 std::unique_ptr<test::FakeAudioDevice> fake_send_audio_device_; |
| 131 rtc::scoped_ptr<test::FakeAudioDevice> fake_recv_audio_device_; | 131 std::unique_ptr<test::FakeAudioDevice> fake_recv_audio_device_; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 class BaseTest : public RtpRtcpObserver { | 134 class BaseTest : public RtpRtcpObserver { |
| 135 public: | 135 public: |
| 136 explicit BaseTest(unsigned int timeout_ms); | 136 explicit BaseTest(unsigned int timeout_ms); |
| 137 virtual ~BaseTest(); | 137 virtual ~BaseTest(); |
| 138 | 138 |
| 139 virtual void PerformTest() = 0; | 139 virtual void PerformTest() = 0; |
| 140 virtual bool ShouldCreateReceivers() const = 0; | 140 virtual bool ShouldCreateReceivers() const = 0; |
| 141 | 141 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 public: | 179 public: |
| 180 explicit EndToEndTest(unsigned int timeout_ms); | 180 explicit EndToEndTest(unsigned int timeout_ms); |
| 181 | 181 |
| 182 bool ShouldCreateReceivers() const override; | 182 bool ShouldCreateReceivers() const override; |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace test | 185 } // namespace test |
| 186 } // namespace webrtc | 186 } // namespace webrtc |
| 187 | 187 |
| 188 #endif // WEBRTC_TEST_CALL_TEST_H_ | 188 #endif // WEBRTC_TEST_CALL_TEST_H_ |
| OLD | NEW |