| Index: webrtc/modules/desktop_capture/shared_memory.h
|
| diff --git a/webrtc/modules/desktop_capture/shared_memory.h b/webrtc/modules/desktop_capture/shared_memory.h
|
| index 631f119b5ffb6f24334c026b60ee7768b402266d..0490bc05b4e2f37dcebf402c133a50f386048919 100644
|
| --- a/webrtc/modules/desktop_capture/shared_memory.h
|
| +++ b/webrtc/modules/desktop_capture/shared_memory.h
|
| @@ -17,6 +17,7 @@
|
| #include <windows.h>
|
| #endif
|
|
|
| +#include "webrtc/base/scoped_ptr.h"
|
| #include "webrtc/base/constructormagic.h"
|
| #include "webrtc/typedefs.h"
|
|
|
| @@ -26,8 +27,8 @@ namespace webrtc {
|
| // parameters of the buffer, but doesn't have any logic to allocate or destroy
|
| // the actual buffer. DesktopCapturer consumers that need to use shared memory
|
| // for video frames must extend this class with creation and destruction logic
|
| -// specific for the target platform and then implement
|
| -// DesktopCapturer::Delegate::CreateSharedMemory() as appropriate.
|
| +// specific for the target platform and then call
|
| +// DesktopCapturer::SetSharedMemoryFactory().
|
| class SharedMemory {
|
| public:
|
| #if defined(WEBRTC_WIN)
|
| @@ -62,6 +63,18 @@ class SharedMemory {
|
| RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemory);
|
| };
|
|
|
| +// Interface used to create SharedMemory instances.
|
| +class SharedMemoryFactory {
|
| + public:
|
| + SharedMemoryFactory() {}
|
| + virtual ~SharedMemoryFactory() {}
|
| +
|
| + virtual rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) = 0;
|
| +
|
| + private:
|
| + RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryFactory);
|
| +};
|
| +
|
| } // namespace webrtc
|
|
|
| #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_MEMORY_H_
|
|
|