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 |
11 #include <memory> | |
11 #include <string> | 12 #include <string> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/callback.h" | 15 #include "base/callback.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/md5.h" | 17 #include "base/md5.h" |
17 #include "base/memory/shared_memory.h" | 18 #include "base/memory/shared_memory.h" |
18 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "gpu/command_buffer/common/mailbox_holder.h" | 21 #include "gpu/command_buffer/common/mailbox_holder.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
521 // (|visible_rect_.size()|) with aspect ratio taken into account. | 522 // (|visible_rect_.size()|) with aspect ratio taken into account. |
522 const gfx::Size natural_size_; | 523 const gfx::Size natural_size_; |
523 | 524 |
524 // Array of strides for each plane, typically greater or equal to the width | 525 // Array of strides for each plane, typically greater or equal to the width |
525 // of the surface divided by the horizontal sampling period. Note that | 526 // of the surface divided by the horizontal sampling period. Note that |
526 // strides can be negative. | 527 // strides can be negative. |
527 int32_t strides_[kMaxPlanes]; | 528 int32_t strides_[kMaxPlanes]; |
528 | 529 |
529 // Array of data pointers to each plane. | 530 // Array of data pointers to each plane. |
530 // TODO(mcasas): we don't know on ctor if we own |data_| or not. After | 531 // TODO(mcasas): we don't know on ctor if we own |data_| or not. After |
531 // refactoring VideoFrame, change to scoped_ptr<uint8_t, AlignedFreeDeleter>. | 532 // refactoring VideoFrame, change to std::unique_ptr<uint8_t, |
dcheng
2016/04/23 00:57:23
This wrapping is kind of unfortunate. Maybe we can
danakj
2016/04/23 01:11:15
Done.
| |
533 // AlignedFreeDeleter>. | |
532 uint8_t* data_[kMaxPlanes]; | 534 uint8_t* data_[kMaxPlanes]; |
533 | 535 |
534 // Native texture mailboxes, if this is a IsTexture() frame. | 536 // Native texture mailboxes, if this is a IsTexture() frame. |
535 gpu::MailboxHolder mailbox_holders_[kMaxPlanes]; | 537 gpu::MailboxHolder mailbox_holders_[kMaxPlanes]; |
536 ReleaseMailboxCB mailbox_holders_release_cb_; | 538 ReleaseMailboxCB mailbox_holders_release_cb_; |
537 | 539 |
538 // Shared memory handle and associated offset inside it, if this frame is | 540 // Shared memory handle and associated offset inside it, if this frame is |
539 // a STORAGE_SHMEM one. | 541 // a STORAGE_SHMEM one. |
540 base::SharedMemoryHandle shared_memory_handle_; | 542 base::SharedMemoryHandle shared_memory_handle_; |
541 size_t shared_memory_offset_; | 543 size_t shared_memory_offset_; |
(...skipping 19 matching lines...) Expand all Loading... | |
561 gpu::SyncToken release_sync_token_; | 563 gpu::SyncToken release_sync_token_; |
562 | 564 |
563 VideoFrameMetadata metadata_; | 565 VideoFrameMetadata metadata_; |
564 | 566 |
565 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); | 567 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |
566 }; | 568 }; |
567 | 569 |
568 } // namespace media | 570 } // namespace media |
569 | 571 |
570 #endif // MEDIA_BASE_VIDEO_FRAME_H_ | 572 #endif // MEDIA_BASE_VIDEO_FRAME_H_ |
OLD | NEW |