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

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

Issue 1699553002: Mojo Video Capture service in media/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perkj@s comments and renaming 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 | « media/capture/service/video_capture_unittest.cc ('k') | no next file » | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 size_t v_offset, 46 size_t v_offset,
47 int32_t y_stride, 47 int32_t y_stride,
48 int32_t u_stride, 48 int32_t u_stride,
49 int32_t v_stride, 49 int32_t v_stride,
50 base::TimeDelta timestamp); 50 base::TimeDelta timestamp);
51 51
52 // Returns the offsets relative to the start of |shared_buffer| for the 52 // Returns the offsets relative to the start of |shared_buffer| for the
53 // |plane| specified. 53 // |plane| specified.
54 size_t PlaneOffset(size_t plane) const; 54 size_t PlaneOffset(size_t plane) const;
55 55
56 mojo::SharedBufferHandle handle() { return shared_buffer_handle_.get(); }
57 size_t mapped_size() const { return shared_buffer_size_; }
58
56 private: 59 private:
57 MojoSharedBufferVideoFrame(VideoPixelFormat format, 60 MojoSharedBufferVideoFrame(VideoPixelFormat format,
58 const gfx::Size& coded_size, 61 const gfx::Size& coded_size,
59 const gfx::Rect& visible_rect, 62 const gfx::Rect& visible_rect,
60 const gfx::Size& natural_size, 63 const gfx::Size& natural_size,
61 mojo::ScopedSharedBufferHandle handle, 64 mojo::ScopedSharedBufferHandle handle,
62 size_t mapped_size, 65 size_t mapped_size,
63 base::TimeDelta timestamp); 66 base::TimeDelta timestamp);
64 ~MojoSharedBufferVideoFrame() override; 67 ~MojoSharedBufferVideoFrame() override;
65 68
(...skipping 10 matching lines...) Expand all
76 size_t shared_buffer_size_; 79 size_t shared_buffer_size_;
77 uint8_t* shared_buffer_data_; 80 uint8_t* shared_buffer_data_;
78 size_t offsets_[kMaxPlanes]; 81 size_t offsets_[kMaxPlanes];
79 82
80 DISALLOW_COPY_AND_ASSIGN(MojoSharedBufferVideoFrame); 83 DISALLOW_COPY_AND_ASSIGN(MojoSharedBufferVideoFrame);
81 }; 84 };
82 85
83 } // namespace media 86 } // namespace media
84 87
85 #endif // MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_ 88 #endif // MEDIA_MOJO_COMMON_MOJO_SHARED_BUFFER_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « media/capture/service/video_capture_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698