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

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

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 #ifndef MEDIA_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_
6 #define MEDIA_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_
7
8 #include "media/capture/capture_export.h"
9 #include "media/capture/video/video_capture_buffer_handle.h"
10
11 namespace media {
12
13 // Provides access to memory-mapped shared memory without participating in the
14 // lifetime management of the memory. Instances are typically handed out by
15 // an instance of VideoCaptureDevice::Client as part of a
16 // VideoCaptureDevice::Client::Buffer, which contains a separate
17 // |access_permission| that guarantees that the memory stays alive. The buffers
18 // are typically managed by an instance of VideoCaptureBufferPool.
19 class CAPTURE_EXPORT SharedMemoryBufferHandle
20 : public VideoCaptureBufferHandle {
21 public:
22 explicit SharedMemoryBufferHandle(base::SharedMemory* shared_memory,
23 size_t mapped_size);
24 ~SharedMemoryBufferHandle() override;
25
26 size_t mapped_size() const override;
27 uint8_t* data() const override;
28 const uint8_t* const_data() const override;
29
30 private:
31 base::SharedMemory* const shared_memory_;
32 const size_t mapped_size_;
33 };
34
35 } // namespace media
36
37 #endif // MEDIA_CAPTURE_VIDEO_SHARED_MEMORY_BUFFER_HANDLE_H_
OLDNEW
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/capture/video/shared_memory_buffer_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698