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

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

Issue 1900673002: Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 cricket::kRtcpFbParamTransportCc, cricket::kParamValueEmpty))); 62 cricket::kRtcpFbParamTransportCc, cricket::kParamValueEmpty)));
63 EXPECT_TRUE(codec.HasFeedbackParam(cricket::FeedbackParam( 63 EXPECT_TRUE(codec.HasFeedbackParam(cricket::FeedbackParam(
64 cricket::kRtcpFbParamCcm, cricket::kRtcpFbCcmParamFir))); 64 cricket::kRtcpFbParamCcm, cricket::kRtcpFbCcmParamFir)));
65 } 65 }
66 66
67 static void CreateBlackFrame(webrtc::VideoFrame* video_frame, 67 static void CreateBlackFrame(webrtc::VideoFrame* video_frame,
68 int width, 68 int width,
69 int height) { 69 int height) {
70 video_frame->CreateEmptyFrame( 70 video_frame->CreateEmptyFrame(
71 width, height, width, (width + 1) / 2, (width + 1) / 2); 71 width, height, width, (width + 1) / 2, (width + 1) / 2);
72 memset(video_frame->buffer(webrtc::kYPlane), 16, 72 memset(video_frame->video_frame_buffer()->MutableDataY(), 16,
73 video_frame->allocated_size(webrtc::kYPlane)); 73 video_frame->allocated_size(webrtc::kYPlane));
74 memset(video_frame->buffer(webrtc::kUPlane), 128, 74 memset(video_frame->video_frame_buffer()->MutableDataU(), 128,
75 video_frame->allocated_size(webrtc::kUPlane)); 75 video_frame->allocated_size(webrtc::kUPlane));
76 memset(video_frame->buffer(webrtc::kVPlane), 128, 76 memset(video_frame->video_frame_buffer()->MutableDataV(), 128,
77 video_frame->allocated_size(webrtc::kVPlane)); 77 video_frame->allocated_size(webrtc::kVPlane));
78 } 78 }
79 79
80 void VerifySendStreamHasRtxTypes(const webrtc::VideoSendStream::Config& config, 80 void VerifySendStreamHasRtxTypes(const webrtc::VideoSendStream::Config& config,
81 const std::map<int, int>& rtx_types) { 81 const std::map<int, int>& rtx_types) {
82 std::map<int, int>::const_iterator it; 82 std::map<int, int>::const_iterator it;
83 it = rtx_types.find(config.encoder_settings.payload_type); 83 it = rtx_types.find(config.encoder_settings.payload_type);
84 EXPECT_TRUE(it != rtx_types.end() && 84 EXPECT_TRUE(it != rtx_types.end() &&
85 it->second == config.rtp.rtx.payload_type); 85 it->second == config.rtp.rtx.payload_type);
86 86
(...skipping 3600 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 } 3687 }
3688 3688
3689 // Test that we normalize send codec format size in simulcast. 3689 // Test that we normalize send codec format size in simulcast.
3690 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3690 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3691 cricket::VideoCodec codec(kVp8Codec270p); 3691 cricket::VideoCodec codec(kVp8Codec270p);
3692 codec.width += 1; 3692 codec.width += 1;
3693 codec.height += 1; 3693 codec.height += 1;
3694 VerifySimulcastSettings(codec, 2, 2); 3694 VerifySimulcastSettings(codec, 2, 2);
3695 } 3695 }
3696 } // namespace cricket 3696 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/video_capture/test/video_capture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698