Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: remoting/protocol/video_frame_pump.h

Issue 2334293002: Two minor cleanups in remoting protocol. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // | Time 63 // | Time
64 // v 64 // v
65 // 65 //
66 // VideoFramePump would ideally schedule captures so as to saturate the slowest 66 // VideoFramePump would ideally schedule captures so as to saturate the slowest
67 // of the capture, encode and network processes. However, it also needs to 67 // of the capture, encode and network processes. However, it also needs to
68 // rate-limit captures to avoid overloading the host system, either by consuming 68 // rate-limit captures to avoid overloading the host system, either by consuming
69 // too much CPU, or hogging the host's graphics subsystem. 69 // too much CPU, or hogging the host's graphics subsystem.
70 class VideoFramePump : public VideoStream, 70 class VideoFramePump : public VideoStream,
71 public webrtc::DesktopCapturer::Callback { 71 public webrtc::DesktopCapturer::Callback {
72 public: 72 public:
73 // Enables timestamps for generated frames. Used for testing.
74 static void EnableTimestampsForTests();
75
76 // Creates a VideoFramePump running capture, encode and network tasks on the 73 // Creates a VideoFramePump running capture, encode and network tasks on the
77 // supplied TaskRunners. Video will be pumped to |video_stub|, which must 74 // supplied TaskRunners. Video will be pumped to |video_stub|, which must
78 // outlive the pump.. 75 // outlive the pump..
79 VideoFramePump(scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, 76 VideoFramePump(scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
80 std::unique_ptr<webrtc::DesktopCapturer> capturer, 77 std::unique_ptr<webrtc::DesktopCapturer> capturer,
81 std::unique_ptr<VideoEncoder> encoder, 78 std::unique_ptr<VideoEncoder> encoder,
82 protocol::VideoStub* video_stub); 79 protocol::VideoStub* video_stub);
83 ~VideoFramePump() override; 80 ~VideoFramePump() override;
84 81
85 // VideoStream interface. 82 // VideoStream interface.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 188
192 base::WeakPtrFactory<VideoFramePump> weak_factory_; 189 base::WeakPtrFactory<VideoFramePump> weak_factory_;
193 190
194 DISALLOW_COPY_AND_ASSIGN(VideoFramePump); 191 DISALLOW_COPY_AND_ASSIGN(VideoFramePump);
195 }; 192 };
196 193
197 } // namespace protocol 194 } // namespace protocol
198 } // namespace remoting 195 } // namespace remoting
199 196
200 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ 197 #endif // REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698