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

Unified Diff: webrtc/modules/video_coding/video_receiver.cc

Issue 2755803004: Delete video_coding_robustness_unittest.cc (Closed)
Patch Set: Bring back morar impl 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/video_coding_robustness_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_receiver.cc
diff --git a/webrtc/modules/video_coding/video_receiver.cc b/webrtc/modules/video_coding/video_receiver.cc
index d1992fb1c95fc422cbe38155eb7a0cd6c967b456..84f5af521f6a8e9970e628b6e905da6efd53db73 100644
--- a/webrtc/modules/video_coding/video_receiver.cc
+++ b/webrtc/modules/video_coding/video_receiver.cc
@@ -129,8 +129,7 @@ int32_t VideoReceiver::SetReceiveChannelParameters(int64_t rtt) {
// Enable or disable a video protection method.
// Note: This API should be deprecated, as it does not offer a distinction
-// between the protection method and decoding with or without errors. If such a
-// behavior is desired, use the following API: SetReceiverRobustnessMode.
+// between the protection method and decoding with or without errors.
int32_t VideoReceiver::SetVideoProtection(VCMVideoProtection videoProtection,
bool enable) {
// By default, do not decode with errors.
@@ -412,8 +411,11 @@ int32_t VideoReceiver::Delay() const {
}
int VideoReceiver::SetReceiverRobustnessMode(
- ReceiverRobustness robustnessMode,
+ VideoCodingModule::ReceiverRobustness robustnessMode,
VCMDecodeErrorMode decode_error_mode) {
+ RTC_DCHECK(construction_thread_.CalledOnValidThread());
+ // TODO(tommi): This method must only be called when the decoder thread
+ // is not running and we don't need to hold this lock.
rtc::CritScope cs(&receive_crit_);
switch (robustnessMode) {
case VideoCodingModule::kNone:
@@ -423,27 +425,9 @@ int VideoReceiver::SetReceiverRobustnessMode(
// Always wait for retransmissions (except when decoding with errors).
_receiver.SetNackMode(kNack, -1, -1);
break;
- case VideoCodingModule::kSoftNack:
-#if 1
- assert(false); // TODO(hlundin): Not completed.
- return VCM_NOT_IMPLEMENTED;
-#else
- // Enable hybrid NACK/FEC. Always wait for retransmissions and don't add
- // extra delay when RTT is above kLowRttNackMs.
- _receiver.SetNackMode(kNack, media_optimization::kLowRttNackMs, -1);
- break;
-#endif
- case VideoCodingModule::kReferenceSelection:
-#if 1
- assert(false); // TODO(hlundin): Not completed.
- return VCM_NOT_IMPLEMENTED;
-#else
- if (decode_error_mode == kNoErrors) {
- return VCM_PARAMETER_ERROR;
- }
- _receiver.SetNackMode(kNoNack, -1, -1);
- break;
-#endif
+ default:
+ RTC_NOTREACHED();
+ return VCM_PARAMETER_ERROR;
}
_receiver.SetDecodeErrorMode(decode_error_mode);
return VCM_OK;
« no previous file with comments | « webrtc/modules/video_coding/video_coding_robustness_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698