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

Side by Side Diff: media/capture/video/shared_memory_buffer_handle.cc

Issue 2818513003: [Mojo Video Capture] Adapt video_capture service to refactored video capture stack (Closed)
Patch Set: Fix compile errors Created 3 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "media/capture/video/shared_memory_buffer_handle.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "mojo/public/cpp/system/platform_handle.h"
9
10 namespace media {
11
12 SharedMemoryBufferHandle::SharedMemoryBufferHandle(
13 base::SharedMemory* shared_memory,
14 size_t mapped_size)
15 : shared_memory_(shared_memory), mapped_size_(mapped_size) {}
16
17 SharedMemoryBufferHandle::~SharedMemoryBufferHandle() = default;
18
19 size_t SharedMemoryBufferHandle::mapped_size() const {
20 return mapped_size_;
21 }
22
23 uint8_t* SharedMemoryBufferHandle::data() const {
24 return static_cast<uint8_t*>(shared_memory_->memory());
25 }
26
27 const uint8_t* SharedMemoryBufferHandle::const_data() const {
28 return static_cast<const uint8_t*>(shared_memory_->memory());
29 }
30
31 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/shared_memory_buffer_handle.h ('k') | media/capture/video/shared_memory_buffer_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698