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

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

Issue 2780943003: Move video_encoder.h and video_decoder.h to /api and create GN targets for them (Closed)
Patch Set: Move GN targets inside webrtc/api/video_codecs. Rename /api/video_codec to api/video_codecs 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
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
(...skipping 12 matching lines...) Expand all
23 #include "webrtc/media/base/rtputils.h" 23 #include "webrtc/media/base/rtputils.h"
24 #include "webrtc/media/base/testutils.h" 24 #include "webrtc/media/base/testutils.h"
25 #include "webrtc/media/base/videoengine_unittest.h" 25 #include "webrtc/media/base/videoengine_unittest.h"
26 #include "webrtc/media/engine/constants.h" 26 #include "webrtc/media/engine/constants.h"
27 #include "webrtc/media/engine/fakewebrtccall.h" 27 #include "webrtc/media/engine/fakewebrtccall.h"
28 #include "webrtc/media/engine/fakewebrtcvideoengine.h" 28 #include "webrtc/media/engine/fakewebrtcvideoengine.h"
29 #include "webrtc/media/engine/simulcast.h" 29 #include "webrtc/media/engine/simulcast.h"
30 #include "webrtc/media/engine/webrtcvideoengine2.h" 30 #include "webrtc/media/engine/webrtcvideoengine2.h"
31 #include "webrtc/media/engine/webrtcvoiceengine.h" 31 #include "webrtc/media/engine/webrtcvoiceengine.h"
32 #include "webrtc/test/field_trial.h" 32 #include "webrtc/test/field_trial.h"
33 #include "webrtc/video_encoder.h" 33 #include "webrtc/api/video_codecs/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
3777 // Allow receiving VP8, VP9, H264 (if enabled). 3776 // Allow receiving VP8, VP9, H264 (if enabled).
3778 cricket::VideoRecvParameters parameters; 3777 cricket::VideoRecvParameters parameters;
3779 parameters.codecs.push_back(GetEngineCodec("VP8")); 3778 parameters.codecs.push_back(GetEngineCodec("VP8"));
3780 parameters.codecs.push_back(GetEngineCodec("VP9")); 3779 parameters.codecs.push_back(GetEngineCodec("VP9"));
3781 3780
3782 #if defined(WEBRTC_USE_H264) 3781 #if defined(WEBRTC_USE_H264)
3783 cricket::VideoCodec H264codec(126, "H264"); 3782 cricket::VideoCodec H264codec(126, "H264");
3784 parameters.codecs.push_back(H264codec); 3783 parameters.codecs.push_back(H264codec);
3785 #endif 3784 #endif
3786 3785
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
4354 } 4353 }
4355 4354
4356 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { 4355 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) {
4357 webrtc::test::ScopedFieldTrials override_field_trials_( 4356 webrtc::test::ScopedFieldTrials override_field_trials_(
4358 "WebRTC-SimulcastScreenshare/Enabled/"); 4357 "WebRTC-SimulcastScreenshare/Enabled/");
4359 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, 4358 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true,
4360 true); 4359 true);
4361 } 4360 }
4362 4361
4363 } // namespace cricket 4362 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698