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

Side by Side Diff: webrtc/pc/test/fakeaudiocapturemodule.cc

Issue 2977953002: Partial Reland of Make the default ctor of rtc::Thread, protected (Closed)
Patch Set: Fix the same error elsewhere Created 3 years, 5 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/pc/rtcstats_integrationtest.cc ('k') | webrtc/rtc_base/criticalsection_unittest.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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return false; 617 return false;
618 } 618 }
619 619
620 bool FakeAudioCaptureModule::ShouldStartProcessing() { 620 bool FakeAudioCaptureModule::ShouldStartProcessing() {
621 return recording_ || playing_; 621 return recording_ || playing_;
622 } 622 }
623 623
624 void FakeAudioCaptureModule::UpdateProcessing(bool start) { 624 void FakeAudioCaptureModule::UpdateProcessing(bool start) {
625 if (start) { 625 if (start) {
626 if (!process_thread_) { 626 if (!process_thread_) {
627 process_thread_.reset(new rtc::Thread()); 627 process_thread_ = rtc::Thread::Create();
628 process_thread_->Start(); 628 process_thread_->Start();
629 } 629 }
630 process_thread_->Post(RTC_FROM_HERE, this, MSG_START_PROCESS); 630 process_thread_->Post(RTC_FROM_HERE, this, MSG_START_PROCESS);
631 } else { 631 } else {
632 if (process_thread_) { 632 if (process_thread_) {
633 process_thread_->Stop(); 633 process_thread_->Stop();
634 process_thread_.reset(nullptr); 634 process_thread_.reset(nullptr);
635 } 635 }
636 started_ = false; 636 started_ = false;
637 } 637 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 kNumberBytesPerSample, 715 kNumberBytesPerSample,
716 kNumberOfChannels, 716 kNumberOfChannels,
717 kSamplesPerSecond, kTotalDelayMs, 717 kSamplesPerSecond, kTotalDelayMs,
718 kClockDriftMs, current_mic_level, 718 kClockDriftMs, current_mic_level,
719 key_pressed, 719 key_pressed,
720 current_mic_level) != 0) { 720 current_mic_level) != 0) {
721 RTC_NOTREACHED(); 721 RTC_NOTREACHED();
722 } 722 }
723 SetMicrophoneVolume(current_mic_level); 723 SetMicrophoneVolume(current_mic_level);
724 } 724 }
OLDNEW
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/rtc_base/criticalsection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698