OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CALLBACK_SHARED_MEMORY_FACTORY_H_ | |
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CALLBACK_SHARED_MEMORY_FACTORY_H_ | |
13 | |
14 #include <stddef.h> | |
15 | |
16 #include "webrtc/base/scoped_ptr.h" | |
17 #include "webrtc/modules/desktop_capture/desktop_capturer.h" | |
18 #include "webrtc/modules/desktop_capture/shared_memory.h" | |
19 | |
20 namespace webrtc { | |
21 | |
22 // SharedMemoryFactory that creates SharedMemory using the deprecated | |
23 // DesktopCapturer::Callback::CreateSharedMemory(). | |
24 class CallbackSharedMemoryFactory : public SharedMemoryFactory { | |
Sergey Ulanov
2016/03/31 18:41:15
why do you need this?
I think DesktopCapturer::Cal
Hzj_jie
2016/04/05 23:15:17
Done.
| |
25 public: | |
26 CallbackSharedMemoryFactory(DesktopCapturer::Callback* callback) | |
27 : callback_(callback) {} | |
28 ~CallbackSharedMemoryFactory() override {} | |
29 | |
30 rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override { | |
31 return rtc::scoped_ptr<SharedMemory>(callback_->CreateSharedMemory(size)); | |
32 } | |
33 | |
34 private: | |
35 DesktopCapturer::Callback* callback_; | |
36 }; | |
37 | |
38 } // namespace webrtc | |
39 | |
40 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_CALLBACK_SHARED_MEMORY_FACTORY_H_ | |
OLD | NEW |