| 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 | 
| 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 
| 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 
| 13 | 13 | 
| 14 #include "webrtc/base/scoped_ptr.h" | 14 #include <memory> | 
|  | 15 | 
| 15 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 16 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 
| 16 #include "webrtc/typedefs.h" | 17 #include "webrtc/typedefs.h" | 
| 17 | 18 | 
| 18 namespace webrtc { | 19 namespace webrtc { | 
| 19 class DesktopFrame; | 20 class DesktopFrame; | 
| 20 }  // namespace webrtc | 21 }  // namespace webrtc | 
| 21 | 22 | 
| 22 namespace webrtc { | 23 namespace webrtc { | 
| 23 | 24 | 
| 24 // Represents a queue of reusable video frames. Provides access to the 'current' | 25 // Represents a queue of reusable video frames. Provides access to the 'current' | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57 | 58 | 
| 58   SharedDesktopFrame* previous_frame() const { | 59   SharedDesktopFrame* previous_frame() const { | 
| 59     return frames_[(current_ + kQueueLength - 1) % kQueueLength].get(); | 60     return frames_[(current_ + kQueueLength - 1) % kQueueLength].get(); | 
| 60   } | 61   } | 
| 61 | 62 | 
| 62  private: | 63  private: | 
| 63   // Index of the current frame. | 64   // Index of the current frame. | 
| 64   int current_; | 65   int current_; | 
| 65 | 66 | 
| 66   static const int kQueueLength = 2; | 67   static const int kQueueLength = 2; | 
| 67   rtc::scoped_ptr<SharedDesktopFrame> frames_[kQueueLength]; | 68   std::unique_ptr<SharedDesktopFrame> frames_[kQueueLength]; | 
| 68 | 69 | 
| 69   RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCaptureFrameQueue); | 70   RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCaptureFrameQueue); | 
| 70 }; | 71 }; | 
| 71 | 72 | 
| 72 }  // namespace webrtc | 73 }  // namespace webrtc | 
| 73 | 74 | 
| 74 #endif  // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 75 #endif  // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_ | 
| OLD | NEW | 
|---|