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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 // static | 375 // static |
376 scoped_refptr<VideoFrame> VideoFrame::CreateTransparentFrame( | 376 scoped_refptr<VideoFrame> VideoFrame::CreateTransparentFrame( |
377 const gfx::Size& size) { | 377 const gfx::Size& size) { |
378 const uint8 kBlackY = 0x00; | 378 const uint8 kBlackY = 0x00; |
379 const uint8 kBlackUV = 0x00; | 379 const uint8 kBlackUV = 0x00; |
380 const uint8 kTransparentA = 0x00; | 380 const uint8 kTransparentA = 0x00; |
381 const base::TimeDelta kZero; | 381 const base::TimeDelta kZero; |
382 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( | 382 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame( |
383 VideoFrame::YV12A, size, gfx::Rect(size), size, kZero); | 383 VideoFrame::YV12A, size, gfx::Rect(size), size, kZero); |
384 FillYUVA(frame, kBlackY, kBlackUV, kBlackUV, kTransparentA); | 384 FillYUVA(frame.get(), kBlackY, kBlackUV, kBlackUV, kTransparentA); |
385 return frame; | 385 return frame; |
386 } | 386 } |
387 | 387 |
388 #if defined(VIDEO_HOLE) | 388 #if defined(VIDEO_HOLE) |
389 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not | 389 // This block and other blocks wrapped around #if defined(VIDEO_HOLE) is not |
390 // maintained by the general compositor team. Please contact the following | 390 // maintained by the general compositor team. Please contact the following |
391 // people instead: | 391 // people instead: |
392 // | 392 // |
393 // wonsik@chromium.org | 393 // wonsik@chromium.org |
394 // ycheo@chromium.org | 394 // ycheo@chromium.org |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 break; | 863 break; |
864 for (int row = 0; row < rows(plane); ++row) { | 864 for (int row = 0; row < rows(plane); ++row) { |
865 base::MD5Update(context, base::StringPiece( | 865 base::MD5Update(context, base::StringPiece( |
866 reinterpret_cast<char*>(data(plane) + stride(plane) * row), | 866 reinterpret_cast<char*>(data(plane) + stride(plane) * row), |
867 row_bytes(plane))); | 867 row_bytes(plane))); |
868 } | 868 } |
869 } | 869 } |
870 } | 870 } |
871 | 871 |
872 } // namespace media | 872 } // namespace media |
OLD | NEW |