| 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 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ |
| 6 #define MEDIA_BASE_VIDEO_FRAME_H_ | 6 #define MEDIA_BASE_VIDEO_FRAME_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 size_t plane, | 216 size_t plane, |
| 217 const gfx::Size& coded_size); | 217 const gfx::Size& coded_size); |
| 218 | 218 |
| 219 // Returns horizontal bits per pixel for given |plane| and |format|. | 219 // Returns horizontal bits per pixel for given |plane| and |format|. |
| 220 static int PlaneHorizontalBitsPerPixel(Format format, size_t plane); | 220 static int PlaneHorizontalBitsPerPixel(Format format, size_t plane); |
| 221 | 221 |
| 222 // Returns the number of bytes per row for the given plane, format, and width. | 222 // Returns the number of bytes per row for the given plane, format, and width. |
| 223 // The width may be aligned to format requirements. | 223 // The width may be aligned to format requirements. |
| 224 static int RowBytes(size_t plane, Format format, int width); | 224 static int RowBytes(size_t plane, Format format, int width); |
| 225 | 225 |
| 226 // Returns the number of rows for the given plane, format, and height. |
| 227 static int Rows(size_t plane, Format format, int height); |
| 228 |
| 226 Format format() const { return format_; } | 229 Format format() const { return format_; } |
| 227 | 230 |
| 228 const gfx::Size& coded_size() const { return coded_size_; } | 231 const gfx::Size& coded_size() const { return coded_size_; } |
| 229 const gfx::Rect& visible_rect() const { return visible_rect_; } | 232 const gfx::Rect& visible_rect() const { return visible_rect_; } |
| 230 const gfx::Size& natural_size() const { return natural_size_; } | 233 const gfx::Size& natural_size() const { return natural_size_; } |
| 231 | 234 |
| 232 int stride(size_t plane) const; | 235 int stride(size_t plane) const; |
| 233 | 236 |
| 234 // Returns the number of bytes per row and number of rows for a given plane. | 237 // Returns the number of bytes per row and number of rows for a given plane. |
| 235 // | 238 // |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 uint32 release_sync_point_; | 357 uint32 release_sync_point_; |
| 355 | 358 |
| 356 const bool end_of_stream_; | 359 const bool end_of_stream_; |
| 357 | 360 |
| 358 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 361 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 359 }; | 362 }; |
| 360 | 363 |
| 361 } // namespace media | 364 } // namespace media |
| 362 | 365 |
| 363 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 366 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |