| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/video_frame.h" | 5 #include "media/base/video_frame.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/memory/aligned_memory.h" | 10 #include "base/memory/aligned_memory.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 EXPECT_EQ(sync_point, mailbox_holder->sync_point); | 301 EXPECT_EQ(sync_point, mailbox_holder->sync_point); |
| 302 | 302 |
| 303 frame->AppendReleaseSyncPoint(release_sync_points[0]); | 303 frame->AppendReleaseSyncPoint(release_sync_points[0]); |
| 304 frame->AppendReleaseSyncPoint(release_sync_points[1]); | 304 frame->AppendReleaseSyncPoint(release_sync_points[1]); |
| 305 frame->AppendReleaseSyncPoint(release_sync_points[2]); | 305 frame->AppendReleaseSyncPoint(release_sync_points[2]); |
| 306 EXPECT_EQ(sync_point, mailbox_holder->sync_point); | 306 EXPECT_EQ(sync_point, mailbox_holder->sync_point); |
| 307 } | 307 } |
| 308 EXPECT_EQ(release_sync_points, called_sync_points); | 308 EXPECT_EQ(release_sync_points, called_sync_points); |
| 309 } | 309 } |
| 310 | 310 |
| 311 TEST(VideoFrame, ZeroInitialized) { |
| 312 const int kWidth = 64; |
| 313 const int kHeight = 48; |
| 314 const base::TimeDelta kTimestamp = base::TimeDelta::FromMicroseconds(1337); |
| 315 |
| 316 gfx::Size size(kWidth, kHeight); |
| 317 scoped_refptr<media::VideoFrame> frame = VideoFrame::CreateFrame( |
| 318 media::VideoFrame::YV12, size, gfx::Rect(size), size, kTimestamp); |
| 319 |
| 320 for (size_t i = 0; i < VideoFrame::NumPlanes(frame->format()); ++i) |
| 321 EXPECT_EQ(0, frame->data(i)[0]); |
| 322 } |
| 323 |
| 311 } // namespace media | 324 } // namespace media |
| OLD | NEW |