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

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

Issue 2757923004: Fix failed capture handling in WebrtcVideoStream (Closed)
Patch Set: . Created 3 years, 9 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_SIMPLE_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_
6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_
7 7
8 #include "remoting/protocol/webrtc_frame_scheduler.h" 8 #include "remoting/protocol/webrtc_frame_scheduler.h"
9 9
10 #include <queue> 10 #include <queue>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 int minimum_bitrate_ = 0; 62 int minimum_bitrate_ = 0;
63 int current_target_bitrate_ = 0; 63 int current_target_bitrate_ = 0;
64 }; 64 };
65 65
66 void ScheduleNextFrame(base::TimeTicks now); 66 void ScheduleNextFrame(base::TimeTicks now);
67 void CaptureNextFrame(); 67 void CaptureNextFrame();
68 68
69 base::Closure capture_callback_; 69 base::Closure capture_callback_;
70 bool paused_ = false; 70 bool paused_ = false;
71
72 // Set to false until the first frame frame was captured successfully.
73 bool captured_first_frame_ = false;
74
75 // Set to true when a key frame was requested.
71 bool key_frame_request_ = false; 76 bool key_frame_request_ = false;
72 77
73 base::TimeTicks last_capture_started_time_; 78 base::TimeTicks last_capture_started_time_;
74 79
75 LeakyBucket pacing_bucket_; 80 LeakyBucket pacing_bucket_;
76 81
77 EncoderBitrateFilter encoder_bitrate_; 82 EncoderBitrateFilter encoder_bitrate_;
78 83
79 // Set to true when a frame is being captured or encoded. 84 // Set to true when a frame is being captured or encoded.
80 bool frame_pending_ = false; 85 bool frame_pending_ = false;
(...skipping 12 matching lines...) Expand all
93 base::OneShotTimer capture_timer_; 98 base::OneShotTimer capture_timer_;
94 99
95 base::ThreadChecker thread_checker_; 100 base::ThreadChecker thread_checker_;
96 base::WeakPtrFactory<WebrtcFrameSchedulerSimple> weak_factory_; 101 base::WeakPtrFactory<WebrtcFrameSchedulerSimple> weak_factory_;
97 }; 102 };
98 103
99 } // namespace protocol 104 } // namespace protocol
100 } // namespace remoting 105 } // namespace remoting
101 106
102 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ 107 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698