OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 92 matching lines...) Loading... |
103 // Creates a BasicDesktopFrame that contains copy of |frame|. | 103 // Creates a BasicDesktopFrame that contains copy of |frame|. |
104 static DesktopFrame* CopyOf(const DesktopFrame& frame); | 104 static DesktopFrame* CopyOf(const DesktopFrame& frame); |
105 | 105 |
106 private: | 106 private: |
107 RTC_DISALLOW_COPY_AND_ASSIGN(BasicDesktopFrame); | 107 RTC_DISALLOW_COPY_AND_ASSIGN(BasicDesktopFrame); |
108 }; | 108 }; |
109 | 109 |
110 // A DesktopFrame that stores data in shared memory. | 110 // A DesktopFrame that stores data in shared memory. |
111 class SharedMemoryDesktopFrame : public DesktopFrame { | 111 class SharedMemoryDesktopFrame : public DesktopFrame { |
112 public: | 112 public: |
| 113 static rtc::scoped_ptr<DesktopFrame> Create( |
| 114 DesktopSize size, |
| 115 SharedMemoryFactory* shared_memory_factory); |
| 116 |
113 // Takes ownership of |shared_memory|. | 117 // Takes ownership of |shared_memory|. |
| 118 // TODO(sergeyu): Remove this constructor and keep the second one. |
114 SharedMemoryDesktopFrame(DesktopSize size, | 119 SharedMemoryDesktopFrame(DesktopSize size, |
115 int stride, | 120 int stride, |
116 SharedMemory* shared_memory); | 121 SharedMemory* shared_memory); |
| 122 SharedMemoryDesktopFrame(DesktopSize size, |
| 123 int stride, |
| 124 rtc::scoped_ptr<SharedMemory> shared_memory); |
117 ~SharedMemoryDesktopFrame() override; | 125 ~SharedMemoryDesktopFrame() override; |
118 | 126 |
119 private: | 127 private: |
120 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); | 128 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); |
121 }; | 129 }; |
122 | 130 |
123 } // namespace webrtc | 131 } // namespace webrtc |
124 | 132 |
125 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ | 133 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ |
126 | 134 |
OLD | NEW |