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 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 } | 3693 } |
3694 | 3694 |
3695 // Test that we normalize send codec format size in simulcast. | 3695 // Test that we normalize send codec format size in simulcast. |
3696 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3696 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
3697 cricket::VideoCodec codec(kVp8Codec270p); | 3697 cricket::VideoCodec codec(kVp8Codec270p); |
3698 codec.width += 1; | 3698 codec.width += 1; |
3699 codec.height += 1; | 3699 codec.height += 1; |
3700 VerifySimulcastSettings(codec, 2, 2); | 3700 VerifySimulcastSettings(codec, 2, 2); |
3701 } | 3701 } |
3702 } // namespace cricket | 3702 } // namespace cricket |
OLD | NEW |