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

Side by Side Diff: webrtc/modules/video_coding/video_coding_impl.h

Issue 2513383002: Initial rate allocation should not use fps = 0 (Closed)
Patch Set: Cleanup Created 4 years 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
« no previous file with comments | « no previous file | webrtc/modules/video_coding/video_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 22 matching lines...) Expand all
33 #include "webrtc/system_wrappers/include/clock.h" 33 #include "webrtc/system_wrappers/include/clock.h"
34 34
35 namespace webrtc { 35 namespace webrtc {
36 36
37 class VideoBitrateAllocator; 37 class VideoBitrateAllocator;
38 38
39 namespace vcm { 39 namespace vcm {
40 40
41 class VCMProcessTimer { 41 class VCMProcessTimer {
42 public: 42 public:
43 static const int64_t kDefaultProcessIntervalMs = 1000;
danilchap 2016/11/21 10:43:25 Do you plan to use this constant outside SendVideo
sprang_webrtc 2016/11/21 11:35:32 I use it the unit test now.
44
43 VCMProcessTimer(int64_t periodMs, Clock* clock) 45 VCMProcessTimer(int64_t periodMs, Clock* clock)
44 : _clock(clock), 46 : _clock(clock),
45 _periodMs(periodMs), 47 _periodMs(periodMs),
46 _latestMs(_clock->TimeInMilliseconds()) {} 48 _latestMs(_clock->TimeInMilliseconds()) {}
47 int64_t Period() const; 49 int64_t Period() const;
48 int64_t TimeUntilProcess() const; 50 int64_t TimeUntilProcess() const;
49 void Processed(); 51 void Processed();
50 52
51 private: 53 private:
52 Clock* _clock; 54 Clock* _clock;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 VideoBitrateAllocator* bitrate_allocator, 107 VideoBitrateAllocator* bitrate_allocator,
106 uint32_t target_bitrate_bps); 108 uint32_t target_bitrate_bps);
107 void SetEncoderParameters(EncoderParameters params, bool has_internal_source) 109 void SetEncoderParameters(EncoderParameters params, bool has_internal_source)
108 EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_); 110 EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_);
109 111
110 Clock* const clock_; 112 Clock* const clock_;
111 113
112 rtc::CriticalSection encoder_crit_; 114 rtc::CriticalSection encoder_crit_;
113 VCMGenericEncoder* _encoder; 115 VCMGenericEncoder* _encoder;
114 media_optimization::MediaOptimization _mediaOpt; 116 media_optimization::MediaOptimization _mediaOpt;
117 bool has_received_frame_;
danilchap 2016/11/21 10:43:25 can it be used from multiple threads? may be prote
sprang_webrtc 2016/11/21 11:35:32 I moved it and protected it by params_crit_
115 VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_); 118 VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_);
116 VCMSendStatisticsCallback* const send_stats_callback_; 119 VCMSendStatisticsCallback* const send_stats_callback_;
117 VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_); 120 VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_);
118 bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_); 121 bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_);
119 VCMProcessTimer _sendStatsTimer; 122 VCMProcessTimer _sendStatsTimer;
120 123
121 // Must be accessed on the construction thread of VideoSender. 124 // Must be accessed on the construction thread of VideoSender.
122 VideoCodec current_codec_; 125 VideoCodec current_codec_;
123 rtc::SequencedTaskChecker sequenced_checker_; 126 rtc::SequencedTaskChecker sequenced_checker_;
124 127
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 VCMProcessTimer _receiveStatsTimer; 218 VCMProcessTimer _receiveStatsTimer;
216 VCMProcessTimer _retransmissionTimer; 219 VCMProcessTimer _retransmissionTimer;
217 VCMProcessTimer _keyRequestTimer; 220 VCMProcessTimer _keyRequestTimer;
218 QpParser qp_parser_; 221 QpParser qp_parser_;
219 ThreadUnsafeOneTimeEvent first_frame_received_; 222 ThreadUnsafeOneTimeEvent first_frame_received_;
220 }; 223 };
221 224
222 } // namespace vcm 225 } // namespace vcm
223 } // namespace webrtc 226 } // namespace webrtc
224 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 227 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698