| 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 #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 "media/base/buffers.h" | 8 #include "media/base/buffers.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Creates a frame with format equals to VideoFrame::EMPTY, width, height | 88 // Creates a frame with format equals to VideoFrame::EMPTY, width, height |
| 89 // timestamp and duration are all 0. | 89 // timestamp and duration are all 0. |
| 90 static void CreateEmptyFrame(scoped_refptr<VideoFrame>* frame_out); | 90 static void CreateEmptyFrame(scoped_refptr<VideoFrame>* frame_out); |
| 91 | 91 |
| 92 // Allocates YV12 frame based on |width| and |height|, and sets its data to | 92 // Allocates YV12 frame based on |width| and |height|, and sets its data to |
| 93 // the YUV equivalent of RGB(0,0,0). | 93 // the YUV equivalent of RGB(0,0,0). |
| 94 static void CreateBlackFrame(int width, int height, | 94 static void CreateBlackFrame(int width, int height, |
| 95 scoped_refptr<VideoFrame>* frame_out); | 95 scoped_refptr<VideoFrame>* frame_out); |
| 96 | 96 |
| 97 virtual SurfaceType type() const { return type_; } | 97 SurfaceType type() const { return type_; } |
| 98 | 98 |
| 99 Format format() const { return format_; } | 99 Format format() const { return format_; } |
| 100 | 100 |
| 101 size_t width() const { return width_; } | 101 size_t width() const { return width_; } |
| 102 | 102 |
| 103 size_t height() const { return height_; } | 103 size_t height() const { return height_; } |
| 104 | 104 |
| 105 size_t planes() const { return planes_; } | 105 size_t planes() const { return planes_; } |
| 106 | 106 |
| 107 int32 stride(size_t plane) const { return strides_[plane]; } | 107 int32 stride(size_t plane) const { return strides_[plane]; } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // Private buffer pointer, can be used for EGLImage. | 164 // Private buffer pointer, can be used for EGLImage. |
| 165 void* private_buffer_; | 165 void* private_buffer_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(VideoFrame); | 167 DISALLOW_COPY_AND_ASSIGN(VideoFrame); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace media | 170 } // namespace media |
| 171 | 171 |
| 172 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 172 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |