| 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_UTIL_H_ | 5 #ifndef MEDIA_BASE_VIDEO_UTIL_H_ |
| 6 #define MEDIA_BASE_VIDEO_UTIL_H_ | 6 #define MEDIA_BASE_VIDEO_UTIL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 9 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 10 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
| 11 | 13 |
| 12 namespace media { | 14 namespace media { |
| 13 | 15 |
| 14 class VideoFrame; | 16 class VideoFrame; |
| 15 | 17 |
| 16 // Computes the size of |visible_size| for a given aspect ratio. | 18 // Computes the size of |visible_size| for a given aspect ratio. |
| 17 MEDIA_EXPORT gfx::Size GetNaturalSize(const gfx::Size& visible_size, | 19 MEDIA_EXPORT gfx::Size GetNaturalSize(const gfx::Size& visible_size, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Copy an RGB bitmap into the specified |region_in_frame| of a YUV video frame. | 88 // Copy an RGB bitmap into the specified |region_in_frame| of a YUV video frame. |
| 87 // Fills the regions outside |region_in_frame| with black. | 89 // Fills the regions outside |region_in_frame| with black. |
| 88 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source, | 90 MEDIA_EXPORT void CopyRGBToVideoFrame(const uint8_t* source, |
| 89 int stride, | 91 int stride, |
| 90 const gfx::Rect& region_in_frame, | 92 const gfx::Rect& region_in_frame, |
| 91 VideoFrame* frame); | 93 VideoFrame* frame); |
| 92 | 94 |
| 93 } // namespace media | 95 } // namespace media |
| 94 | 96 |
| 95 #endif // MEDIA_BASE_VIDEO_UTIL_H_ | 97 #endif // MEDIA_BASE_VIDEO_UTIL_H_ |
| OLD | NEW |