| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" |
| 8 |
| 7 namespace media { | 9 namespace media { |
| 8 | 10 |
| 9 // static | 11 // static |
| 10 void VideoFrame::CreateFrame(VideoFrame::Format format, | 12 void VideoFrame::CreateFrame(VideoFrame::Format format, |
| 11 size_t width, | 13 size_t width, |
| 12 size_t height, | 14 size_t height, |
| 13 base::TimeDelta timestamp, | 15 base::TimeDelta timestamp, |
| 14 base::TimeDelta duration, | 16 base::TimeDelta duration, |
| 15 scoped_refptr<VideoFrame>* frame_out) { | 17 scoped_refptr<VideoFrame>* frame_out) { |
| 16 DCHECK(width > 0 && height > 0); | 18 DCHECK(width > 0 && height > 0); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // so just delete index 0. | 202 // so just delete index 0. |
| 201 if (!external_memory_) | 203 if (!external_memory_) |
| 202 delete[] data_[0]; | 204 delete[] data_[0]; |
| 203 } | 205 } |
| 204 | 206 |
| 205 bool VideoFrame::IsEndOfStream() const { | 207 bool VideoFrame::IsEndOfStream() const { |
| 206 return format_ == VideoFrame::EMPTY; | 208 return format_ == VideoFrame::EMPTY; |
| 207 } | 209 } |
| 208 | 210 |
| 209 } // namespace media | 211 } // namespace media |
| OLD | NEW |