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

Side by Side Diff: content/browser/renderer_host/media/shared_memory_buffer_tracker.cc

Issue 2361173002: Move classses VideoCaptureDeviceClient and VideoCaptureBufferPool to media/capture/video (Closed)
Patch Set: mcasas@ comments Created 4 years, 2 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
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 #include "content/browser/renderer_host/media/shared_memory_buffer_tracker.h" 5 #include "content/browser/renderer_host/media/shared_memory_buffer_tracker.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/browser/renderer_host/media/shared_memory_buffer_handle.h" 8 #include "content/browser/renderer_host/media/shared_memory_buffer_handle.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 12 matching lines...) Expand all
23 set_pixel_format(format); 23 set_pixel_format(format);
24 set_storage_type(storage_type); 24 set_storage_type(storage_type);
25 mapped_size_ = 25 mapped_size_ =
26 media::VideoCaptureFormat(dimensions, 0.0f, format, storage_type) 26 media::VideoCaptureFormat(dimensions, 0.0f, format, storage_type)
27 .ImageAllocationSize(); 27 .ImageAllocationSize();
28 if (!mapped_size_) 28 if (!mapped_size_)
29 return true; 29 return true;
30 return shared_memory_.CreateAndMapAnonymous(mapped_size_); 30 return shared_memory_.CreateAndMapAnonymous(mapped_size_);
31 } 31 }
32 32
33 std::unique_ptr<VideoCaptureBufferHandle> 33 std::unique_ptr<media::VideoCaptureBufferHandle>
34 SharedMemoryBufferTracker::GetBufferHandle() { 34 SharedMemoryBufferTracker::GetBufferHandle() {
35 return base::MakeUnique<SharedMemoryBufferHandle>(this); 35 return base::MakeUnique<SharedMemoryBufferHandle>(this);
36 } 36 }
37 37
38 bool SharedMemoryBufferTracker::ShareToProcess( 38 bool SharedMemoryBufferTracker::ShareToProcess(
39 base::ProcessHandle process_handle, 39 base::ProcessHandle process_handle,
40 base::SharedMemoryHandle* new_handle) { 40 base::SharedMemoryHandle* new_handle) {
41 return shared_memory_.ShareToProcess(process_handle, new_handle); 41 return shared_memory_.ShareToProcess(process_handle, new_handle);
42 } 42 }
43 43
44 bool SharedMemoryBufferTracker::ShareToProcess2( 44 bool SharedMemoryBufferTracker::ShareToProcess2(
45 int plane, 45 int plane,
46 base::ProcessHandle process_handle, 46 base::ProcessHandle process_handle,
47 gfx::GpuMemoryBufferHandle* new_handle) { 47 gfx::GpuMemoryBufferHandle* new_handle) {
48 NOTREACHED(); 48 NOTREACHED();
49 return false; 49 return false;
50 } 50 }
51 51
52 } // namespace content 52 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698