OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 TEST_WEBRTCVIDEOFRAME(ConvertFromI400Buffer) | 228 TEST_WEBRTCVIDEOFRAME(ConvertFromI400Buffer) |
229 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferStride) | 229 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferStride) |
230 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferInverted) | 230 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferInverted) |
231 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2Buffer) | 231 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2Buffer) |
232 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferStride) | 232 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferStride) |
233 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferInverted) | 233 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferInverted) |
234 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBuffer) | 234 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBuffer) |
235 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferStride) | 235 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferStride) |
236 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferInverted) | 236 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferInverted) |
237 // TEST_WEBRTCVIDEOFRAME(ConvertToI422Buffer) | 237 // TEST_WEBRTCVIDEOFRAME(ConvertToI422Buffer) |
238 TEST_WEBRTCVIDEOFRAME(CopyToFrame) | |
239 // TEST_WEBRTCVIDEOFRAME(ConstructARGBBlackWhitePixel) | 238 // TEST_WEBRTCVIDEOFRAME(ConstructARGBBlackWhitePixel) |
240 | 239 |
241 TEST_WEBRTCVIDEOFRAME(StretchToFrame) | 240 TEST_WEBRTCVIDEOFRAME(StretchToFrame) |
242 TEST_WEBRTCVIDEOFRAME(Copy) | 241 TEST_WEBRTCVIDEOFRAME(Copy) |
243 TEST_WEBRTCVIDEOFRAME(CopyIsRef) | 242 TEST_WEBRTCVIDEOFRAME(CopyIsRef) |
244 TEST_WEBRTCVIDEOFRAME(MakeExclusive) | |
245 | 243 |
246 // These functions test implementation-specific details. | 244 // These functions test implementation-specific details. |
247 // Tests the Init function with different cropped size. | 245 // Tests the Init function with different cropped size. |
248 TEST_F(WebRtcVideoFrameTest, InitEvenSize) { | 246 TEST_F(WebRtcVideoFrameTest, InitEvenSize) { |
249 TestInit(640, 360, webrtc::kVideoRotation_0, true); | 247 TestInit(640, 360, webrtc::kVideoRotation_0, true); |
250 } | 248 } |
251 | 249 |
252 TEST_F(WebRtcVideoFrameTest, InitOddWidth) { | 250 TEST_F(WebRtcVideoFrameTest, InitOddWidth) { |
253 TestInit(601, 480, webrtc::kVideoRotation_0, true); | 251 TestInit(601, 480, webrtc::kVideoRotation_0, true); |
254 } | 252 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 317 |
320 // Claim the frame 2 needs to be rotated for another 270 degree. The output | 318 // Claim the frame 2 needs to be rotated for another 270 degree. The output |
321 // from frame 2 rotation should be the same as frame 1. | 319 // from frame 2 rotation should be the same as frame 1. |
322 applied90->SetRotation(webrtc::kVideoRotation_270); | 320 applied90->SetRotation(webrtc::kVideoRotation_270); |
323 const cricket::VideoFrame* applied360 = | 321 const cricket::VideoFrame* applied360 = |
324 applied90->GetCopyWithRotationApplied(); | 322 applied90->GetCopyWithRotationApplied(); |
325 EXPECT_TRUE(applied360); | 323 EXPECT_TRUE(applied360); |
326 EXPECT_EQ(applied360->GetVideoRotation(), webrtc::kVideoRotation_0); | 324 EXPECT_EQ(applied360->GetVideoRotation(), webrtc::kVideoRotation_0); |
327 EXPECT_TRUE(IsEqual(applied0, *applied360, 0)); | 325 EXPECT_TRUE(IsEqual(applied0, *applied360, 0)); |
328 } | 326 } |
OLD | NEW |