| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_VIDEO_FRAME_PUMP_H_ | 5 #ifndef REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ |
| 6 #define REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ | 6 #define REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 struct PacketWithTimestamps { | 115 struct PacketWithTimestamps { |
| 116 PacketWithTimestamps(std::unique_ptr<VideoPacket> packet, | 116 PacketWithTimestamps(std::unique_ptr<VideoPacket> packet, |
| 117 std::unique_ptr<FrameTimestamps> timestamps); | 117 std::unique_ptr<FrameTimestamps> timestamps); |
| 118 ~PacketWithTimestamps(); | 118 ~PacketWithTimestamps(); |
| 119 | 119 |
| 120 std::unique_ptr<VideoPacket> packet; | 120 std::unique_ptr<VideoPacket> packet; |
| 121 std::unique_ptr<FrameTimestamps> timestamps; | 121 std::unique_ptr<FrameTimestamps> timestamps; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 // webrtc::DesktopCapturer::Callback interface. | 124 // webrtc::DesktopCapturer::Callback interface. |
| 125 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; | 125 void OnCaptureResult(webrtc::DesktopCapturer::Result result, |
| 126 std::unique_ptr<webrtc::DesktopFrame> frame) override; |
| 126 | 127 |
| 127 // Callback for CaptureScheduler. | 128 // Callback for CaptureScheduler. |
| 128 void CaptureNextFrame(); | 129 void CaptureNextFrame(); |
| 129 | 130 |
| 130 // Task running on the encoder thread to encode the |frame|. | 131 // Task running on the encoder thread to encode the |frame|. |
| 131 static std::unique_ptr<PacketWithTimestamps> EncodeFrame( | 132 static std::unique_ptr<PacketWithTimestamps> EncodeFrame( |
| 132 VideoEncoder* encoder, | 133 VideoEncoder* encoder, |
| 133 std::unique_ptr<webrtc::DesktopFrame> frame, | 134 std::unique_ptr<webrtc::DesktopFrame> frame, |
| 134 std::unique_ptr<FrameTimestamps> timestamps); | 135 std::unique_ptr<FrameTimestamps> timestamps); |
| 135 | 136 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 191 |
| 191 base::WeakPtrFactory<VideoFramePump> weak_factory_; | 192 base::WeakPtrFactory<VideoFramePump> weak_factory_; |
| 192 | 193 |
| 193 DISALLOW_COPY_AND_ASSIGN(VideoFramePump); | 194 DISALLOW_COPY_AND_ASSIGN(VideoFramePump); |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 } // namespace protocol | 197 } // namespace protocol |
| 197 } // namespace remoting | 198 } // namespace remoting |
| 198 | 199 |
| 199 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ | 200 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ |
| OLD | NEW |