OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/video_capture_buffer_pool.h" | 5 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 } | 161 } |
162 | 162 |
163 VideoCaptureBufferPool::Buffer* VideoCaptureBufferPool::GetBuffer( | 163 VideoCaptureBufferPool::Buffer* VideoCaptureBufferPool::GetBuffer( |
164 int buffer_id) { | 164 int buffer_id) { |
165 BufferMap::iterator it = buffers_.find(buffer_id); | 165 BufferMap::iterator it = buffers_.find(buffer_id); |
166 if (it == buffers_.end()) | 166 if (it == buffers_.end()) |
167 return NULL; | 167 return NULL; |
168 return it->second; | 168 return it->second; |
169 } | 169 } |
170 | 170 |
171 base::SharedMemoryHandle VideoCaptureBufferPool::GetBufferSharedMemory( | |
172 int buffer_id) { | |
wuchengli
2015/03/23 06:30:14
Need to acquire |lock_|.
Or how about merging thi
mcasas
2015/03/23 19:29:50
For another purpose I'm about to start adding a
V
kcwu
2015/03/30 18:12:14
Did you mean VideoCaptureDevice::Client::Buffer::G
kcwu
2015/03/30 18:12:14
Done.
| |
173 BufferMap::iterator it = buffers_.find(buffer_id); | |
174 if (it == buffers_.end()) | |
175 return base::SharedMemory::NULLHandle(); | |
176 return it->second->shared_memory.handle(); | |
177 } | |
178 | |
171 } // namespace content | 179 } // namespace content |
OLD | NEW |