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

Side by Side Diff: webrtc/modules/video_coding/main/source/video_receiver.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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Enable or disable a video protection method. 181 // Enable or disable a video protection method.
182 // Note: This API should be deprecated, as it does not offer a distinction 182 // Note: This API should be deprecated, as it does not offer a distinction
183 // between the protection method and decoding with or without errors. If such a 183 // between the protection method and decoding with or without errors. If such a
184 // behavior is desired, use the following API: SetReceiverRobustnessMode. 184 // behavior is desired, use the following API: SetReceiverRobustnessMode.
185 int32_t VideoReceiver::SetVideoProtection(VCMVideoProtection videoProtection, 185 int32_t VideoReceiver::SetVideoProtection(VCMVideoProtection videoProtection,
186 bool enable) { 186 bool enable) {
187 // By default, do not decode with errors. 187 // By default, do not decode with errors.
188 _receiver.SetDecodeErrorMode(kNoErrors); 188 _receiver.SetDecodeErrorMode(kNoErrors);
189 switch (videoProtection) { 189 switch (videoProtection) {
190 case kProtectionNack: { 190 case kProtectionNack: {
191 DCHECK(enable); 191 RTC_DCHECK(enable);
192 _receiver.SetNackMode(kNack, -1, -1); 192 _receiver.SetNackMode(kNack, -1, -1);
193 break; 193 break;
194 } 194 }
195 195
196 case kProtectionNackFEC: { 196 case kProtectionNackFEC: {
197 CriticalSectionScoped cs(_receiveCritSect); 197 CriticalSectionScoped cs(_receiveCritSect);
198 DCHECK(enable); 198 RTC_DCHECK(enable);
199 _receiver.SetNackMode(kNack, media_optimization::kLowRttNackMs, -1); 199 _receiver.SetNackMode(kNack, media_optimization::kLowRttNackMs, -1);
200 _receiver.SetDecodeErrorMode(kNoErrors); 200 _receiver.SetDecodeErrorMode(kNoErrors);
201 break; 201 break;
202 } 202 }
203 case kProtectionFEC: 203 case kProtectionFEC:
204 case kProtectionNone: 204 case kProtectionNone:
205 // No receiver-side protection. 205 // No receiver-side protection.
206 DCHECK(enable); 206 RTC_DCHECK(enable);
207 _receiver.SetNackMode(kNoNack, -1, -1); 207 _receiver.SetNackMode(kNoNack, -1, -1);
208 _receiver.SetDecodeErrorMode(kWithErrors); 208 _receiver.SetDecodeErrorMode(kWithErrors);
209 break; 209 break;
210 } 210 }
211 return VCM_OK; 211 return VCM_OK;
212 } 212 }
213 213
214 // Register a receive callback. Will be called whenever there is a new frame 214 // Register a receive callback. Will be called whenever there is a new frame
215 // ready for rendering. 215 // ready for rendering.
216 int32_t VideoReceiver::RegisterReceiveCallback( 216 int32_t VideoReceiver::RegisterReceiveCallback(
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 565
566 void VideoReceiver::RegisterPreDecodeImageCallback( 566 void VideoReceiver::RegisterPreDecodeImageCallback(
567 EncodedImageCallback* observer) { 567 EncodedImageCallback* observer) {
568 CriticalSectionScoped cs(_receiveCritSect); 568 CriticalSectionScoped cs(_receiveCritSect);
569 pre_decode_image_callback_ = observer; 569 pre_decode_image_callback_ = observer;
570 } 570 }
571 571
572 } // namespace vcm 572 } // namespace vcm
573 } // namespace webrtc 573 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/receiver_unittest.cc ('k') | webrtc/modules/video_coding/main/source/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698