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

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

Issue 2779623002: remove more CriticalSectionWrappers. (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « webrtc/modules/video_coding/receiver.cc ('k') | webrtc/modules/video_coding/timing.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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_TIMING_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_TIMING_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/base/criticalsection.h"
16 #include "webrtc/base/thread_annotations.h" 17 #include "webrtc/base/thread_annotations.h"
17 #include "webrtc/modules/video_coding/codec_timer.h" 18 #include "webrtc/modules/video_coding/codec_timer.h"
18 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
19 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
20 20
21 namespace webrtc { 21 namespace webrtc {
22 22
23 class Clock; 23 class Clock;
24 class TimestampExtrapolator; 24 class TimestampExtrapolator;
25 25
26 class VCMTiming { 26 class VCMTiming {
27 public: 27 public:
28 // The primary timing component should be passed 28 // The primary timing component should be passed
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 protected: 108 protected:
109 int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 109 int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
110 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const 110 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const
111 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 111 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
112 int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 112 int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
113 113
114 private: 114 private:
115 void UpdateHistograms() const; 115 void UpdateHistograms() const;
116 116
117 CriticalSectionWrapper* crit_sect_; 117 rtc::CriticalSection crit_sect_;
118 Clock* const clock_; 118 Clock* const clock_;
119 bool master_ GUARDED_BY(crit_sect_); 119 bool master_ GUARDED_BY(crit_sect_);
120 TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_); 120 TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_);
121 std::unique_ptr<VCMCodecTimer> codec_timer_ GUARDED_BY(crit_sect_); 121 std::unique_ptr<VCMCodecTimer> codec_timer_ GUARDED_BY(crit_sect_);
122 int render_delay_ms_ GUARDED_BY(crit_sect_); 122 int render_delay_ms_ GUARDED_BY(crit_sect_);
123 // Best-effort playout delay range for frames from capture to render. 123 // Best-effort playout delay range for frames from capture to render.
124 // The receiver tries to keep the delay between |min_playout_delay_ms_| 124 // The receiver tries to keep the delay between |min_playout_delay_ms_|
125 // and |max_playout_delay_ms_| taking the network jitter into account. 125 // and |max_playout_delay_ms_| taking the network jitter into account.
126 // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0, 126 // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0,
127 // in which case the receiver tries to play the frames as they arrive. 127 // in which case the receiver tries to play the frames as they arrive.
128 int min_playout_delay_ms_ GUARDED_BY(crit_sect_); 128 int min_playout_delay_ms_ GUARDED_BY(crit_sect_);
129 int max_playout_delay_ms_ GUARDED_BY(crit_sect_); 129 int max_playout_delay_ms_ GUARDED_BY(crit_sect_);
130 int jitter_delay_ms_ GUARDED_BY(crit_sect_); 130 int jitter_delay_ms_ GUARDED_BY(crit_sect_);
131 int current_delay_ms_ GUARDED_BY(crit_sect_); 131 int current_delay_ms_ GUARDED_BY(crit_sect_);
132 int last_decode_ms_ GUARDED_BY(crit_sect_); 132 int last_decode_ms_ GUARDED_BY(crit_sect_);
133 uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_); 133 uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_);
134 134
135 // Statistics. 135 // Statistics.
136 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); 136 size_t num_decoded_frames_ GUARDED_BY(crit_sect_);
137 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); 137 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_);
138 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); 138 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_);
139 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); 139 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_);
140 }; 140 };
141 } // namespace webrtc 141 } // namespace webrtc
142 142
143 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ 143 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/receiver.cc ('k') | webrtc/modules/video_coding/timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698