Chromium Code Reviews| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 // | 260 // |
| 261 // As opposed to stride(), row_bytes() refers to the bytes representing | 261 // As opposed to stride(), row_bytes() refers to the bytes representing |
| 262 // frame data scanlines (coded_size.width() pixels, without stride padding). | 262 // frame data scanlines (coded_size.width() pixels, without stride padding). |
| 263 int row_bytes(size_t plane) const; | 263 int row_bytes(size_t plane) const; |
| 264 int rows(size_t plane) const; | 264 int rows(size_t plane) const; |
| 265 | 265 |
| 266 // Returns pointer to the buffer for a given plane. The memory is owned by | 266 // Returns pointer to the buffer for a given plane. The memory is owned by |
| 267 // VideoFrame object and must not be freed by the caller. | 267 // VideoFrame object and must not be freed by the caller. |
| 268 uint8* data(size_t plane) const; | 268 uint8* data(size_t plane) const; |
| 269 | 269 |
| 270 // Returns pointer to the visible region specified by visible_rect(). The | |
| 271 // memory is owned by VideoFrame object and must not be freed by the caller. | |
| 272 uint8* visible_data(size_t plane) const; | |
|
tommi (sloooow) - chröme
2014/09/25 20:06:48
const method returning a pointer to a non-const bu
magjed_chromium
2014/09/25 20:52:08
Yes, agree. I followed the convention in this file
| |
| 273 | |
| 270 // Returns the mailbox holder of the native texture wrapped by this frame. | 274 // Returns the mailbox holder of the native texture wrapped by this frame. |
| 271 // Only valid to call if this is a NATIVE_TEXTURE frame. Before using the | 275 // Only valid to call if this is a NATIVE_TEXTURE frame. Before using the |
| 272 // mailbox, the caller must wait for the included sync point. | 276 // mailbox, the caller must wait for the included sync point. |
| 273 const gpu::MailboxHolder* mailbox_holder() const; | 277 const gpu::MailboxHolder* mailbox_holder() const; |
| 274 | 278 |
| 275 // Returns the shared-memory handle, if present | 279 // Returns the shared-memory handle, if present |
| 276 base::SharedMemoryHandle shared_memory_handle() const; | 280 base::SharedMemoryHandle shared_memory_handle() const; |
| 277 | 281 |
| 278 #if defined(OS_POSIX) | 282 #if defined(OS_POSIX) |
| 279 // Returns backing dmabuf file descriptor for given |plane|, if present. | 283 // Returns backing dmabuf file descriptor for given |plane|, if present. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 uint32 release_sync_point_; | 393 uint32 release_sync_point_; |
| 390 | 394 |
| 391 const bool end_of_stream_; | 395 const bool end_of_stream_; |
| 392 | 396 |
| 393 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 397 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
| 394 }; | 398 }; |
| 395 | 399 |
| 396 } // namespace media | 400 } // namespace media |
| 397 | 401 |
| 398 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 402 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
| OLD | NEW |