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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 #endif | 348 #endif |
349 | 349 |
350 void AddSharedMemoryHandle(base::SharedMemoryHandle handle); | 350 void AddSharedMemoryHandle(base::SharedMemoryHandle handle); |
351 | 351 |
352 #if defined(OS_MACOSX) | 352 #if defined(OS_MACOSX) |
353 // Returns the backing CVPixelBuffer, if present. | 353 // Returns the backing CVPixelBuffer, if present. |
354 // TODO(mcasas): Rename to CvPixelBuffer() to comply with Style Guide. | 354 // TODO(mcasas): Rename to CvPixelBuffer() to comply with Style Guide. |
355 CVPixelBufferRef cv_pixel_buffer() const; | 355 CVPixelBufferRef cv_pixel_buffer() const; |
356 #endif | 356 #endif |
357 | 357 |
358 // Sets the mailbox release callback. | |
359 // The callback may be run from ANY THREAD, and so it is up to the client to | |
360 // ensure thread safety. | |
361 void SetReleaseMailboxCB(const ReleaseMailboxCB& release_mailbox_cb); | |
sandersd (OOO until July 31)
2017/01/19 19:40:48
Option B is that the VideoFrame converter needs to
xhwang
2017/01/25 18:25:09
This is fine IMHO. VideoFrame is already a mix of
sandersd (OOO until July 31)
2017/01/26 23:49:05
Acknowledged.
| |
362 | |
358 // Adds a callback to be run when the VideoFrame is about to be destroyed. | 363 // Adds a callback to be run when the VideoFrame is about to be destroyed. |
359 // The callback may be run from ANY THREAD, and so it is up to the client to | 364 // The callback may be run from ANY THREAD, and so it is up to the client to |
360 // ensure thread safety. Although read-only access to the members of this | 365 // ensure thread safety. Although read-only access to the members of this |
361 // VideoFrame is permitted while the callback executes (including | 366 // VideoFrame is permitted while the callback executes (including |
362 // VideoFrameMetadata), clients should not assume the data pointers are | 367 // VideoFrameMetadata), clients should not assume the data pointers are |
363 // valid. | 368 // valid. |
364 void AddDestructionObserver(const base::Closure& callback); | 369 void AddDestructionObserver(const base::Closure& callback); |
365 | 370 |
366 // Returns a dictionary of optional metadata. This contains information | 371 // Returns a dictionary of optional metadata. This contains information |
367 // associated with the frame that downstream clients might use for frame-level | 372 // associated with the frame that downstream clients might use for frame-level |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 const int unique_id_; | 547 const int unique_id_; |
543 | 548 |
544 gfx::ColorSpace color_space_; | 549 gfx::ColorSpace color_space_; |
545 | 550 |
546 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 551 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
547 }; | 552 }; |
548 | 553 |
549 } // namespace media | 554 } // namespace media |
550 | 555 |
551 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 556 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |