Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1206)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2794033002: Revert of Move video_encoder.h and video_decoder.h to /api and create GN targets for them (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
17 #include "webrtc/base/arraysize.h" 16 #include "webrtc/base/arraysize.h"
18 #include "webrtc/base/gunit.h" 17 #include "webrtc/base/gunit.h"
19 #include "webrtc/base/stringutils.h" 18 #include "webrtc/base/stringutils.h"
20 #include "webrtc/call/flexfec_receive_stream.h" 19 #include "webrtc/call/flexfec_receive_stream.h"
21 #include "webrtc/common_video/h264/profile_level_id.h" 20 #include "webrtc/common_video/h264/profile_level_id.h"
22 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
23 #include "webrtc/media/base/mediaconstants.h" 22 #include "webrtc/media/base/mediaconstants.h"
24 #include "webrtc/media/base/rtputils.h" 23 #include "webrtc/media/base/rtputils.h"
25 #include "webrtc/media/base/testutils.h" 24 #include "webrtc/media/base/testutils.h"
26 #include "webrtc/media/base/videoengine_unittest.h" 25 #include "webrtc/media/base/videoengine_unittest.h"
27 #include "webrtc/media/engine/constants.h" 26 #include "webrtc/media/engine/constants.h"
28 #include "webrtc/media/engine/fakewebrtccall.h" 27 #include "webrtc/media/engine/fakewebrtccall.h"
29 #include "webrtc/media/engine/fakewebrtcvideoengine.h" 28 #include "webrtc/media/engine/fakewebrtcvideoengine.h"
30 #include "webrtc/media/engine/simulcast.h" 29 #include "webrtc/media/engine/simulcast.h"
31 #include "webrtc/media/engine/webrtcvideoengine2.h" 30 #include "webrtc/media/engine/webrtcvideoengine2.h"
32 #include "webrtc/media/engine/webrtcvoiceengine.h" 31 #include "webrtc/media/engine/webrtcvoiceengine.h"
33 #include "webrtc/test/field_trial.h" 32 #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 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 3766
3767 TEST_F(WebRtcVideoChannel2Test, RedRtxPacketDoesntCreateUnsignalledStream) { 3767 TEST_F(WebRtcVideoChannel2Test, RedRtxPacketDoesntCreateUnsignalledStream) {
3768 TestReceiveUnsignaledSsrcPacket(kRedRtxPayloadType, 3768 TestReceiveUnsignaledSsrcPacket(kRedRtxPayloadType,
3769 false /* expect_created_receive_stream */); 3769 false /* expect_created_receive_stream */);
3770 } 3770 }
3771 3771
3772 // Test that receiving any unsignalled SSRC works even if it changes. 3772 // Test that receiving any unsignalled SSRC works even if it changes.
3773 // The first unsignalled SSRC received will create a default receive stream. 3773 // The first unsignalled SSRC received will create a default receive stream.
3774 // Any different unsignalled SSRC received will replace the default. 3774 // Any different unsignalled SSRC received will replace the default.
3775 TEST_F(WebRtcVideoChannel2Test, ReceiveDifferentUnsignaledSsrc) { 3775 TEST_F(WebRtcVideoChannel2Test, ReceiveDifferentUnsignaledSsrc) {
3776
3776 // Allow receiving VP8, VP9, H264 (if enabled). 3777 // Allow receiving VP8, VP9, H264 (if enabled).
3777 cricket::VideoRecvParameters parameters; 3778 cricket::VideoRecvParameters parameters;
3778 parameters.codecs.push_back(GetEngineCodec("VP8")); 3779 parameters.codecs.push_back(GetEngineCodec("VP8"));
3779 parameters.codecs.push_back(GetEngineCodec("VP9")); 3780 parameters.codecs.push_back(GetEngineCodec("VP9"));
3780 3781
3781 #if defined(WEBRTC_USE_H264) 3782 #if defined(WEBRTC_USE_H264)
3782 cricket::VideoCodec H264codec(126, "H264"); 3783 cricket::VideoCodec H264codec(126, "H264");
3783 parameters.codecs.push_back(H264codec); 3784 parameters.codecs.push_back(H264codec);
3784 #endif 3785 #endif
3785 3786
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
4353 } 4354 }
4354 4355
4355 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { 4356 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) {
4356 webrtc::test::ScopedFieldTrials override_field_trials_( 4357 webrtc::test::ScopedFieldTrials override_field_trials_(
4357 "WebRTC-SimulcastScreenshare/Enabled/"); 4358 "WebRTC-SimulcastScreenshare/Enabled/");
4358 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, 4359 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true,
4359 true); 4360 true);
4360 } 4361 }
4361 4362
4362 } // namespace cricket 4363 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698