OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 <algorithm> | 11 #include <algorithm> |
12 #include <map> | 12 #include <map> |
13 #include <memory> | 13 #include <memory> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
| 16 #include "webrtc/api/video_codecs/video_encoder.h" |
16 #include "webrtc/base/arraysize.h" | 17 #include "webrtc/base/arraysize.h" |
17 #include "webrtc/base/gunit.h" | 18 #include "webrtc/base/gunit.h" |
18 #include "webrtc/base/stringutils.h" | 19 #include "webrtc/base/stringutils.h" |
19 #include "webrtc/call/flexfec_receive_stream.h" | 20 #include "webrtc/call/flexfec_receive_stream.h" |
20 #include "webrtc/common_video/h264/profile_level_id.h" | 21 #include "webrtc/common_video/h264/profile_level_id.h" |
21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 22 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
22 #include "webrtc/media/base/mediaconstants.h" | 23 #include "webrtc/media/base/mediaconstants.h" |
23 #include "webrtc/media/base/rtputils.h" | 24 #include "webrtc/media/base/rtputils.h" |
24 #include "webrtc/media/base/testutils.h" | 25 #include "webrtc/media/base/testutils.h" |
25 #include "webrtc/media/base/videoengine_unittest.h" | 26 #include "webrtc/media/base/videoengine_unittest.h" |
26 #include "webrtc/media/engine/constants.h" | 27 #include "webrtc/media/engine/constants.h" |
27 #include "webrtc/media/engine/fakewebrtccall.h" | 28 #include "webrtc/media/engine/fakewebrtccall.h" |
28 #include "webrtc/media/engine/fakewebrtcvideoengine.h" | 29 #include "webrtc/media/engine/fakewebrtcvideoengine.h" |
29 #include "webrtc/media/engine/simulcast.h" | 30 #include "webrtc/media/engine/simulcast.h" |
30 #include "webrtc/media/engine/webrtcvideoengine2.h" | 31 #include "webrtc/media/engine/webrtcvideoengine2.h" |
31 #include "webrtc/media/engine/webrtcvoiceengine.h" | 32 #include "webrtc/media/engine/webrtcvoiceengine.h" |
32 #include "webrtc/test/field_trial.h" | 33 #include "webrtc/test/field_trial.h" |
33 #include "webrtc/video_encoder.h" | |
34 | 34 |
35 using webrtc::RtpExtension; | 35 using webrtc::RtpExtension; |
36 | 36 |
37 namespace { | 37 namespace { |
38 static const int kDefaultQpMax = 56; | 38 static const int kDefaultQpMax = 56; |
39 | 39 |
40 static const uint8_t kRedRtxPayloadType = 125; | 40 static const uint8_t kRedRtxPayloadType = 125; |
41 | 41 |
42 static const uint32_t kSsrcs1[] = {1}; | 42 static const uint32_t kSsrcs1[] = {1}; |
43 static const uint32_t kSsrcs3[] = {1, 2, 3}; | 43 static const uint32_t kSsrcs3[] = {1, 2, 3}; |
(...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3796 | 3796 |
3797 TEST_F(WebRtcVideoChannel2Test, RedRtxPacketDoesntCreateUnsignalledStream) { | 3797 TEST_F(WebRtcVideoChannel2Test, RedRtxPacketDoesntCreateUnsignalledStream) { |
3798 TestReceiveUnsignaledSsrcPacket(kRedRtxPayloadType, | 3798 TestReceiveUnsignaledSsrcPacket(kRedRtxPayloadType, |
3799 false /* expect_created_receive_stream */); | 3799 false /* expect_created_receive_stream */); |
3800 } | 3800 } |
3801 | 3801 |
3802 // Test that receiving any unsignalled SSRC works even if it changes. | 3802 // Test that receiving any unsignalled SSRC works even if it changes. |
3803 // The first unsignalled SSRC received will create a default receive stream. | 3803 // The first unsignalled SSRC received will create a default receive stream. |
3804 // Any different unsignalled SSRC received will replace the default. | 3804 // Any different unsignalled SSRC received will replace the default. |
3805 TEST_F(WebRtcVideoChannel2Test, ReceiveDifferentUnsignaledSsrc) { | 3805 TEST_F(WebRtcVideoChannel2Test, ReceiveDifferentUnsignaledSsrc) { |
3806 | |
3807 // Allow receiving VP8, VP9, H264 (if enabled). | 3806 // Allow receiving VP8, VP9, H264 (if enabled). |
3808 cricket::VideoRecvParameters parameters; | 3807 cricket::VideoRecvParameters parameters; |
3809 parameters.codecs.push_back(GetEngineCodec("VP8")); | 3808 parameters.codecs.push_back(GetEngineCodec("VP8")); |
3810 parameters.codecs.push_back(GetEngineCodec("VP9")); | 3809 parameters.codecs.push_back(GetEngineCodec("VP9")); |
3811 | 3810 |
3812 #if defined(WEBRTC_USE_H264) | 3811 #if defined(WEBRTC_USE_H264) |
3813 cricket::VideoCodec H264codec(126, "H264"); | 3812 cricket::VideoCodec H264codec(126, "H264"); |
3814 parameters.codecs.push_back(H264codec); | 3813 parameters.codecs.push_back(H264codec); |
3815 #endif | 3814 #endif |
3816 | 3815 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4392 | 4391 |
4393 TEST_F(WebRtcVideoChannel2SimulcastTest, | 4392 TEST_F(WebRtcVideoChannel2SimulcastTest, |
4394 NoSimulcastScreenshareWithoutConference) { | 4393 NoSimulcastScreenshareWithoutConference) { |
4395 webrtc::test::ScopedFieldTrials override_field_trials_( | 4394 webrtc::test::ScopedFieldTrials override_field_trials_( |
4396 "WebRTC-SimulcastScreenshare/Enabled/"); | 4395 "WebRTC-SimulcastScreenshare/Enabled/"); |
4397 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4396 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
4398 false); | 4397 false); |
4399 } | 4398 } |
4400 | 4399 |
4401 } // namespace cricket | 4400 } // namespace cricket |
OLD | NEW |