| 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 base::TimeDelta timestamp, | 634 base::TimeDelta timestamp, |
| 635 bool end_of_stream) | 635 bool end_of_stream) |
| 636 : format_(format), | 636 : format_(format), |
| 637 coded_size_(coded_size), | 637 coded_size_(coded_size), |
| 638 visible_rect_(visible_rect), | 638 visible_rect_(visible_rect), |
| 639 natural_size_(natural_size), | 639 natural_size_(natural_size), |
| 640 mailbox_holder_(mailbox_holder.Pass()), | 640 mailbox_holder_(mailbox_holder.Pass()), |
| 641 shared_memory_handle_(base::SharedMemory::NULLHandle()), | 641 shared_memory_handle_(base::SharedMemory::NULLHandle()), |
| 642 timestamp_(timestamp), | 642 timestamp_(timestamp), |
| 643 release_sync_point_(0), | 643 release_sync_point_(0), |
| 644 end_of_stream_(end_of_stream) { | 644 end_of_stream_(end_of_stream), |
| 645 allow_overlay_(false) { |
| 645 DCHECK(IsValidConfig(format_, coded_size_, visible_rect_, natural_size_)); | 646 DCHECK(IsValidConfig(format_, coded_size_, visible_rect_, natural_size_)); |
| 646 | 647 |
| 647 memset(&strides_, 0, sizeof(strides_)); | 648 memset(&strides_, 0, sizeof(strides_)); |
| 648 memset(&data_, 0, sizeof(data_)); | 649 memset(&data_, 0, sizeof(data_)); |
| 649 } | 650 } |
| 650 | 651 |
| 651 VideoFrame::~VideoFrame() { | 652 VideoFrame::~VideoFrame() { |
| 652 if (!mailbox_holder_release_cb_.is_null()) { | 653 if (!mailbox_holder_release_cb_.is_null()) { |
| 653 uint32 release_sync_point; | 654 uint32 release_sync_point; |
| 654 { | 655 { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 for (size_t plane = 0; plane < NumPlanes(format_); ++plane) { | 772 for (size_t plane = 0; plane < NumPlanes(format_); ++plane) { |
| 772 for (int row = 0; row < rows(plane); ++row) { | 773 for (int row = 0; row < rows(plane); ++row) { |
| 773 base::MD5Update(context, base::StringPiece( | 774 base::MD5Update(context, base::StringPiece( |
| 774 reinterpret_cast<char*>(data(plane) + stride(plane) * row), | 775 reinterpret_cast<char*>(data(plane) + stride(plane) * row), |
| 775 row_bytes(plane))); | 776 row_bytes(plane))); |
| 776 } | 777 } |
| 777 } | 778 } |
| 778 } | 779 } |
| 779 | 780 |
| 780 } // namespace media | 781 } // namespace media |
| OLD | NEW |