OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ | 5 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ |
6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ | 6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 void Start(); | 38 void Start(); |
39 // Stops scheduling frames. | 39 // Stops scheduling frames. |
40 void Stop(); | 40 void Stop(); |
41 | 41 |
42 void Pause(bool pause); | 42 void Pause(bool pause); |
43 | 43 |
44 void SetSizeCallback(const VideoStream::SizeCallback& size_callback); | 44 void SetSizeCallback(const VideoStream::SizeCallback& size_callback); |
45 | 45 |
46 private: | 46 private: |
47 // webrtc::DesktopCapturer::Callback interface. | 47 // webrtc::DesktopCapturer::Callback interface. |
48 webrtc::SharedMemory* CreateSharedMemory(size_t size) override; | |
49 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; | 48 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; |
50 | 49 |
51 // Callback for CaptureScheduler. | 50 // Callback for CaptureScheduler. |
52 void CaptureNextFrame(); | 51 void CaptureNextFrame(); |
53 | 52 |
54 // Task running on the encoder thread to encode the |frame|. | 53 // Task running on the encoder thread to encode the |frame|. |
55 static std::unique_ptr<VideoPacket> EncodeFrame( | 54 static std::unique_ptr<VideoPacket> EncodeFrame( |
56 VideoEncoder* encoder, | 55 VideoEncoder* encoder, |
57 std::unique_ptr<webrtc::DesktopFrame> frame, | 56 std::unique_ptr<webrtc::DesktopFrame> frame, |
58 bool key_frame_request); | 57 bool key_frame_request); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 91 |
93 base::WeakPtrFactory<WebRtcFrameScheduler> weak_factory_; | 92 base::WeakPtrFactory<WebRtcFrameScheduler> weak_factory_; |
94 | 93 |
95 DISALLOW_COPY_AND_ASSIGN(WebRtcFrameScheduler); | 94 DISALLOW_COPY_AND_ASSIGN(WebRtcFrameScheduler); |
96 }; | 95 }; |
97 | 96 |
98 } // namespace protocol | 97 } // namespace protocol |
99 } // namespace remoting | 98 } // namespace remoting |
100 | 99 |
101 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ | 100 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ |
OLD | NEW |