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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 3001313002: Uncomment thread-check in AudioSendStream::OnPacketFeedbackVector() (Closed)
Patch Set: Rebased Created 3 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 | « no previous file | no next file » | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 rtc::CritScope lock(&packet_loss_tracker_cs_); 381 rtc::CritScope lock(&packet_loss_tracker_cs_);
382 // TODO(eladalon): This function call could potentially reset the window, 382 // TODO(eladalon): This function call could potentially reset the window,
383 // setting both PLR and RPLR to unknown. Consider (during upcoming 383 // setting both PLR and RPLR to unknown. Consider (during upcoming
384 // refactoring) passing an indication of such an event. 384 // refactoring) passing an indication of such an event.
385 packet_loss_tracker_.OnPacketAdded(seq_num, rtc::TimeMillis()); 385 packet_loss_tracker_.OnPacketAdded(seq_num, rtc::TimeMillis());
386 } 386 }
387 } 387 }
388 388
389 void AudioSendStream::OnPacketFeedbackVector( 389 void AudioSendStream::OnPacketFeedbackVector(
390 const std::vector<PacketFeedback>& packet_feedback_vector) { 390 const std::vector<PacketFeedback>& packet_feedback_vector) {
391 // TODO(eladalon): This fails in UT; fix and uncomment. 391 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
392 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=7405
393 // RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
394 rtc::Optional<float> plr; 392 rtc::Optional<float> plr;
395 rtc::Optional<float> rplr; 393 rtc::Optional<float> rplr;
396 { 394 {
397 rtc::CritScope lock(&packet_loss_tracker_cs_); 395 rtc::CritScope lock(&packet_loss_tracker_cs_);
398 packet_loss_tracker_.OnPacketFeedbackVector(packet_feedback_vector); 396 packet_loss_tracker_.OnPacketFeedbackVector(packet_feedback_vector);
399 plr = packet_loss_tracker_.GetPacketLossRate(); 397 plr = packet_loss_tracker_.GetPacketLossRate();
400 rplr = packet_loss_tracker_.GetRecoverablePacketLossRate(); 398 rplr = packet_loss_tracker_.GetRecoverablePacketLossRate();
401 } 399 }
402 // TODO(eladalon): If R/PLR go back to unknown, no indication is given that 400 // TODO(eladalon): If R/PLR go back to unknown, no indication is given that
403 // the previously sent value is no longer relevant. This will be taken care 401 // the previously sent value is no longer relevant. This will be taken care
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) { 649 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) {
652 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " 650 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to "
653 "RTP/RTCP module"; 651 "RTP/RTCP module";
654 } 652 }
655 } 653 }
656 } 654 }
657 655
658 656
659 } // namespace internal 657 } // namespace internal
660 } // namespace webrtc 658 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698