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

Side by Side Diff: media/mojo/common/mojo_shared_buffer_video_frame.h

Issue 1809903002: Reland "Update mojo Decryptor interface to support reusing shared memory" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add includes Created 4 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
« no previous file with comments | « no previous file | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698