OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 "webrtc/video/video_quality_test.h" | 10 #include "webrtc/video/video_quality_test.h" |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 | 1867 |
1868 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get(), | 1868 test::DirectTransport recv_transport(params_.pipe, receiver_call_.get(), |
1869 payload_type_map_); | 1869 payload_type_map_); |
1870 | 1870 |
1871 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at | 1871 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at |
1872 // least share as much code as possible. That way this test would also match | 1872 // least share as much code as possible. That way this test would also match |
1873 // the full stack tests better. | 1873 // the full stack tests better. |
1874 send_transport.SetReceiver(receiver_call_->Receiver()); | 1874 send_transport.SetReceiver(receiver_call_->Receiver()); |
1875 recv_transport.SetReceiver(sender_call_->Receiver()); | 1875 recv_transport.SetReceiver(sender_call_->Receiver()); |
1876 | 1876 |
1877 FlexfecReceiveStream* flexfec_receive_stream = nullptr; | |
1878 std::unique_ptr<test::VideoRenderer> local_preview; | 1877 std::unique_ptr<test::VideoRenderer> local_preview; |
1879 std::vector<std::unique_ptr<test::VideoRenderer>> loopback_renderers_; | 1878 std::vector<std::unique_ptr<test::VideoRenderer>> loopback_renderers_; |
1880 if (params_.video.enabled) { | 1879 if (params_.video.enabled) { |
1881 // Create video renderers. | 1880 // Create video renderers. |
1882 local_preview.reset(test::VideoRenderer::Create( | 1881 local_preview.reset(test::VideoRenderer::Create( |
1883 "Local Preview", params_.video.width, params_.video.height)); | 1882 "Local Preview", params_.video.width, params_.video.height)); |
1884 | 1883 |
1885 const size_t selected_stream_id = params_.ss.selected_stream; | 1884 const size_t selected_stream_id = params_.ss.selected_stream; |
1886 const size_t num_streams = params_.ss.streams.size(); | 1885 const size_t num_streams = params_.ss.streams.size(); |
1887 | 1886 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 SetupAudio(voe.send_channel_id, voe.receive_channel_id, &send_transport, | 1931 SetupAudio(voe.send_channel_id, voe.receive_channel_id, &send_transport, |
1933 &audio_receive_stream); | 1932 &audio_receive_stream); |
1934 } | 1933 } |
1935 | 1934 |
1936 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1935 for (VideoReceiveStream* receive_stream : video_receive_streams_) |
1937 StartEncodedFrameLogs(receive_stream); | 1936 StartEncodedFrameLogs(receive_stream); |
1938 StartEncodedFrameLogs(video_send_stream_); | 1937 StartEncodedFrameLogs(video_send_stream_); |
1939 | 1938 |
1940 // Start sending and receiving video. | 1939 // Start sending and receiving video. |
1941 if (params_.video.enabled) { | 1940 if (params_.video.enabled) { |
1942 if (flexfec_receive_stream) | 1941 for (FlexfecReceiveStream* flexfec_receive_stream : |
| 1942 flexfec_receive_streams_) { |
1943 flexfec_receive_stream->Start(); | 1943 flexfec_receive_stream->Start(); |
| 1944 } |
1944 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1945 for (VideoReceiveStream* receive_stream : video_receive_streams_) |
1945 receive_stream->Start(); | 1946 receive_stream->Start(); |
1946 video_send_stream_->Start(); | 1947 video_send_stream_->Start(); |
1947 video_capturer_->Start(); | 1948 video_capturer_->Start(); |
1948 } | 1949 } |
1949 | 1950 |
1950 if (params_.audio.enabled) { | 1951 if (params_.audio.enabled) { |
1951 // Start receiving audio. | 1952 // Start receiving audio. |
1952 audio_receive_stream->Start(); | 1953 audio_receive_stream->Start(); |
1953 EXPECT_EQ(0, voe.base->StartPlayout(voe.receive_channel_id)); | 1954 EXPECT_EQ(0, voe.base->StartPlayout(voe.receive_channel_id)); |
(...skipping 14 matching lines...) Expand all Loading... |
1968 EXPECT_EQ(0, voe.base->StopPlayout(voe.receive_channel_id)); | 1969 EXPECT_EQ(0, voe.base->StopPlayout(voe.receive_channel_id)); |
1969 audio_receive_stream->Stop(); | 1970 audio_receive_stream->Stop(); |
1970 sender_call_->DestroyAudioSendStream(audio_send_stream_); | 1971 sender_call_->DestroyAudioSendStream(audio_send_stream_); |
1971 receiver_call_->DestroyAudioReceiveStream(audio_receive_stream); | 1972 receiver_call_->DestroyAudioReceiveStream(audio_receive_stream); |
1972 } | 1973 } |
1973 | 1974 |
1974 // Stop receiving and sending video. | 1975 // Stop receiving and sending video. |
1975 if (params_.video.enabled) { | 1976 if (params_.video.enabled) { |
1976 video_capturer_->Stop(); | 1977 video_capturer_->Stop(); |
1977 video_send_stream_->Stop(); | 1978 video_send_stream_->Stop(); |
1978 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1979 for (FlexfecReceiveStream* flexfec_receive_stream : |
1979 receive_stream->Stop(); | 1980 flexfec_receive_streams_) { |
1980 if (flexfec_receive_stream) { | |
1981 flexfec_receive_stream->Stop(); | 1981 flexfec_receive_stream->Stop(); |
1982 receiver_call_->DestroyFlexfecReceiveStream(flexfec_receive_stream); | 1982 receiver_call_->DestroyFlexfecReceiveStream(flexfec_receive_stream); |
1983 } | 1983 } |
1984 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1984 for (VideoReceiveStream* receive_stream : video_receive_streams_) { |
| 1985 receive_stream->Stop(); |
1985 receiver_call_->DestroyVideoReceiveStream(receive_stream); | 1986 receiver_call_->DestroyVideoReceiveStream(receive_stream); |
| 1987 } |
1986 sender_call_->DestroyVideoSendStream(video_send_stream_); | 1988 sender_call_->DestroyVideoSendStream(video_send_stream_); |
1987 } | 1989 } |
1988 | 1990 |
1989 send_transport.StopSending(); | 1991 send_transport.StopSending(); |
1990 recv_transport.StopSending(); | 1992 recv_transport.StopSending(); |
1991 | 1993 |
1992 if (params_.audio.enabled) | 1994 if (params_.audio.enabled) |
1993 DestroyVoiceEngine(&voe); | 1995 DestroyVoiceEngine(&voe); |
1994 } | 1996 } |
1995 | 1997 |
(...skipping 16 matching lines...) Expand all Loading... |
2012 if (!params_.video.encoded_frame_base_path.empty()) { | 2014 if (!params_.video.encoded_frame_base_path.empty()) { |
2013 std::ostringstream str; | 2015 std::ostringstream str; |
2014 str << receive_logs_++; | 2016 str << receive_logs_++; |
2015 std::string path = | 2017 std::string path = |
2016 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 2018 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
2017 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 2019 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
2018 10000000); | 2020 10000000); |
2019 } | 2021 } |
2020 } | 2022 } |
2021 } // namespace webrtc | 2023 } // namespace webrtc |
OLD | NEW |