Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: media/base/video_frame.h

Issue 9766007: Fix incorrect VideoFrame::row_bytes() for RGB. Add tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typos. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/callback.h" 8 #include "base/callback.h"
9 #include "media/base/buffers.h" 9 #include "media/base/buffers.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Allocates YV12 frame based on |width| and |height|, and sets its data to 76 // Allocates YV12 frame based on |width| and |height|, and sets its data to
77 // the YUV equivalent of RGB(0,0,0). 77 // the YUV equivalent of RGB(0,0,0).
78 static scoped_refptr<VideoFrame> CreateBlackFrame(int width, int height); 78 static scoped_refptr<VideoFrame> CreateBlackFrame(int width, int height);
79 79
80 Format format() const { return format_; } 80 Format format() const { return format_; }
81 81
82 size_t width() const { return width_; } 82 size_t width() const { return width_; }
83 83
84 size_t height() const { return height_; } 84 size_t height() const { return height_; }
85 85
86 int stride(size_t plane) const; 86 size_t stride(size_t plane) const;
87 87
88 // Returns the number of bytes per row and number of rows for a given plane. 88 // Returns the number of bytes per row and number of rows for a given plane.
89 // 89 //
90 // As opposed to stride(), row_bytes() refers to the bytes representing 90 // As opposed to stride(), row_bytes() refers to the bytes representing
91 // visible pixels. 91 // visible pixels.
92 int row_bytes(size_t plane) const; 92 size_t row_bytes(size_t plane) const;
93 int rows(size_t plane) const; 93 size_t rows(size_t plane) const;
94 94
95 // Returns pointer to the buffer for a given plane. The memory is owned by 95 // Returns pointer to the buffer for a given plane. The memory is owned by
96 // VideoFrame object and must not be freed by the caller. 96 // VideoFrame object and must not be freed by the caller.
97 uint8* data(size_t plane) const; 97 uint8* data(size_t plane) const;
98 98
99 // Returns the ID of the native texture wrapped by this frame. Only valid to 99 // Returns the ID of the native texture wrapped by this frame. Only valid to
100 // call if this is a NATIVE_TEXTURE frame. 100 // call if this is a NATIVE_TEXTURE frame.
101 uint32 texture_id() const; 101 uint32 texture_id() const;
102 102
103 // Returns the texture target. Only valid for NATIVE_TEXTURE frames. 103 // Returns the texture target. Only valid for NATIVE_TEXTURE frames.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 uint32 texture_id_; 142 uint32 texture_id_;
143 uint32 texture_target_; 143 uint32 texture_target_;
144 base::Closure texture_no_longer_needed_; 144 base::Closure texture_no_longer_needed_;
145 145
146 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 146 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
147 }; 147 };
148 148
149 } // namespace media 149 } // namespace media
150 150
151 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 151 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698