| 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 webrtc::SharedMemory* CreateSharedMemory(size_t size) override; | |
| 126 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; | 125 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; |
| 127 | 126 |
| 128 // Callback for CaptureScheduler. | 127 // Callback for CaptureScheduler. |
| 129 void CaptureNextFrame(); | 128 void CaptureNextFrame(); |
| 130 | 129 |
| 131 // Task running on the encoder thread to encode the |frame|. | 130 // Task running on the encoder thread to encode the |frame|. |
| 132 static std::unique_ptr<PacketWithTimestamps> EncodeFrame( | 131 static std::unique_ptr<PacketWithTimestamps> EncodeFrame( |
| 133 VideoEncoder* encoder, | 132 VideoEncoder* encoder, |
| 134 std::unique_ptr<webrtc::DesktopFrame> frame, | 133 std::unique_ptr<webrtc::DesktopFrame> frame, |
| 135 std::unique_ptr<FrameTimestamps> timestamps); | 134 std::unique_ptr<FrameTimestamps> timestamps); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 190 |
| 192 base::WeakPtrFactory<VideoFramePump> weak_factory_; | 191 base::WeakPtrFactory<VideoFramePump> weak_factory_; |
| 193 | 192 |
| 194 DISALLOW_COPY_AND_ASSIGN(VideoFramePump); | 193 DISALLOW_COPY_AND_ASSIGN(VideoFramePump); |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 } // namespace protocol | 196 } // namespace protocol |
| 198 } // namespace remoting | 197 } // namespace remoting |
| 199 | 198 |
| 200 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ | 199 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ |
| OLD | NEW |