| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ | 5 #ifndef MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ |
| 6 #define MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ | 6 #define MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // Sets the callback to be called to free the shared buffer. If not null, | 75 // Sets the callback to be called to free the shared buffer. If not null, |
| 76 // it is called on destruction, and is passed ownership of |handle|. | 76 // it is called on destruction, and is passed ownership of |handle|. |
| 77 void SetMojoSharedBufferDoneCB( | 77 void SetMojoSharedBufferDoneCB( |
| 78 const MojoSharedBufferDoneCB& mojo_shared_buffer_done_cb); | 78 const MojoSharedBufferDoneCB& mojo_shared_buffer_done_cb); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 // mojo::TypeConverter added as a friend so that MojoSharedBufferVideoFrame | 81 // mojo::TypeConverter added as a friend so that MojoSharedBufferVideoFrame |
| 82 // can be transferred across a mojo connection. | 82 // can be transferred across a mojo connection. |
| 83 friend struct mojo::TypeConverter<mojo::StructPtr<interfaces::VideoFrame>, | 83 friend struct mojo::TypeConverter<mojo::StructPtr<interfaces::VideoFrame>, |
| 84 scoped_refptr<VideoFrame>>; | 84 scoped_refptr<VideoFrame>>; |
| 85 friend class MojoDecryptorService; |
| 85 | 86 |
| 86 MojoSharedBufferVideoFrame(VideoPixelFormat format, | 87 MojoSharedBufferVideoFrame(VideoPixelFormat format, |
| 87 const gfx::Size& coded_size, | 88 const gfx::Size& coded_size, |
| 88 const gfx::Rect& visible_rect, | 89 const gfx::Rect& visible_rect, |
| 89 const gfx::Size& natural_size, | 90 const gfx::Size& natural_size, |
| 90 mojo::ScopedSharedBufferHandle handle, | 91 mojo::ScopedSharedBufferHandle handle, |
| 91 size_t mapped_size, | 92 size_t mapped_size, |
| 92 base::TimeDelta timestamp); | 93 base::TimeDelta timestamp); |
| 93 ~MojoSharedBufferVideoFrame() override; | 94 ~MojoSharedBufferVideoFrame() override; |
| 94 | 95 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 114 uint8_t* shared_buffer_data_; | 115 uint8_t* shared_buffer_data_; |
| 115 size_t offsets_[kMaxPlanes]; | 116 size_t offsets_[kMaxPlanes]; |
| 116 MojoSharedBufferDoneCB mojo_shared_buffer_done_cb_; | 117 MojoSharedBufferDoneCB mojo_shared_buffer_done_cb_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(MojoSharedBufferVideoFrame); | 119 DISALLOW_COPY_AND_ASSIGN(MojoSharedBufferVideoFrame); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace media | 122 } // namespace media |
| 122 | 123 |
| 123 #endif // MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ | 124 #endif // MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ |
| OLD | NEW |