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

Side by Side Diff: webrtc/video_engine/encoder_state_feedback.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 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
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_engine/overuse_frame_detector.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 EncoderStateFeedback::EncoderStateFeedback() 49 EncoderStateFeedback::EncoderStateFeedback()
50 : crit_(CriticalSectionWrapper::CreateCriticalSection()), 50 : crit_(CriticalSectionWrapper::CreateCriticalSection()),
51 observer_(new EncoderStateFeedbackObserver(this)) {} 51 observer_(new EncoderStateFeedbackObserver(this)) {}
52 52
53 EncoderStateFeedback::~EncoderStateFeedback() { 53 EncoderStateFeedback::~EncoderStateFeedback() {
54 assert(encoders_.empty()); 54 assert(encoders_.empty());
55 } 55 }
56 56
57 void EncoderStateFeedback::AddEncoder(const std::vector<uint32_t>& ssrcs, 57 void EncoderStateFeedback::AddEncoder(const std::vector<uint32_t>& ssrcs,
58 ViEEncoder* encoder) { 58 ViEEncoder* encoder) {
59 DCHECK(!ssrcs.empty()); 59 RTC_DCHECK(!ssrcs.empty());
60 CriticalSectionScoped lock(crit_.get()); 60 CriticalSectionScoped lock(crit_.get());
61 for (uint32_t ssrc : ssrcs) { 61 for (uint32_t ssrc : ssrcs) {
62 DCHECK(encoders_.find(ssrc) == encoders_.end()); 62 RTC_DCHECK(encoders_.find(ssrc) == encoders_.end());
63 encoders_[ssrc] = encoder; 63 encoders_[ssrc] = encoder;
64 } 64 }
65 } 65 }
66 66
67 void EncoderStateFeedback::RemoveEncoder(const ViEEncoder* encoder) { 67 void EncoderStateFeedback::RemoveEncoder(const ViEEncoder* encoder) {
68 CriticalSectionScoped lock(crit_.get()); 68 CriticalSectionScoped lock(crit_.get());
69 SsrcEncoderMap::iterator it = encoders_.begin(); 69 SsrcEncoderMap::iterator it = encoders_.begin();
70 while (it != encoders_.end()) { 70 while (it != encoders_.end()) {
71 if (it->second == encoder) { 71 if (it->second == encoder) {
72 encoders_.erase(it++); 72 encoders_.erase(it++);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return; 115 return;
116 } 116 }
117 117
118 ViEEncoder* encoder = it->second; 118 ViEEncoder* encoder = it->second;
119 encoders_.erase(it); 119 encoders_.erase(it);
120 encoders_[new_ssrc] = encoder; 120 encoders_[new_ssrc] = encoder;
121 encoder->OnLocalSsrcChanged(old_ssrc, new_ssrc); 121 encoder->OnLocalSsrcChanged(old_ssrc, new_ssrc);
122 } 122 }
123 123
124 } // namespace webrtc 124 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_engine/overuse_frame_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698