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

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

Issue 2050353002: Update webrtc::DesktopCapturer clients to implement OnCaptureResult(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromeos Created 4 years, 6 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 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
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 void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; 48 void OnCaptureResult(webrtc::DesktopCapturer::Result result,
49 std::unique_ptr<webrtc::DesktopFrame> frame) override;
49 50
50 // Starts |capture_timer_|. 51 // Starts |capture_timer_|.
51 void StartCaptureTimer(); 52 void StartCaptureTimer();
52 53
53 // Called by |capture_timer_|. 54 // Called by |capture_timer_|.
54 void CaptureNextFrame(); 55 void CaptureNextFrame();
55 56
56 // Task running on the encoder thread to encode the |frame|. 57 // Task running on the encoder thread to encode the |frame|.
57 static std::unique_ptr<VideoPacket> EncodeFrame( 58 static std::unique_ptr<VideoPacket> EncodeFrame(
58 VideoEncoder* encoder, 59 VideoEncoder* encoder,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 base::WeakPtrFactory<WebrtcFrameScheduler> weak_factory_; 109 base::WeakPtrFactory<WebrtcFrameScheduler> weak_factory_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(WebrtcFrameScheduler); 111 DISALLOW_COPY_AND_ASSIGN(WebrtcFrameScheduler);
111 }; 112 };
112 113
113 } // namespace protocol 114 } // namespace protocol
114 } // namespace remoting 115 } // namespace remoting
115 116
116 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ 117 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/video_frame_pump_unittest.cc ('k') | remoting/protocol/webrtc_frame_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698