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/media/engine/webrtcvoiceengine.cc

Issue 2219653004: Remove old methods in AudioTransport, make it pass a gn build (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix compile. Created 4 years, 4 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 // AudioSource::Sink implementation. 1211 // AudioSource::Sink implementation.
1212 // This method is called on the audio thread. 1212 // This method is called on the audio thread.
1213 void OnData(const void* audio_data, 1213 void OnData(const void* audio_data,
1214 int bits_per_sample, 1214 int bits_per_sample,
1215 int sample_rate, 1215 int sample_rate,
1216 size_t number_of_channels, 1216 size_t number_of_channels,
1217 size_t number_of_frames) override { 1217 size_t number_of_frames) override {
1218 RTC_DCHECK(!worker_thread_checker_.CalledOnValidThread()); 1218 RTC_DCHECK(!worker_thread_checker_.CalledOnValidThread());
1219 RTC_DCHECK(audio_capture_thread_checker_.CalledOnValidThread()); 1219 RTC_DCHECK(audio_capture_thread_checker_.CalledOnValidThread());
1220 RTC_DCHECK(voe_audio_transport_); 1220 RTC_DCHECK(voe_audio_transport_);
1221 voe_audio_transport_->OnData(config_.voe_channel_id, 1221 voe_audio_transport_->PushCaptureData(config_.voe_channel_id, audio_data,
1222 audio_data, 1222 bits_per_sample, sample_rate,
1223 bits_per_sample, 1223 number_of_channels, number_of_frames);
1224 sample_rate,
1225 number_of_channels,
1226 number_of_frames);
1227 } 1224 }
1228 1225
1229 // Callback from the |source_| when it is going away. In case Start() has 1226 // Callback from the |source_| when it is going away. In case Start() has
1230 // never been called, this callback won't be triggered. 1227 // never been called, this callback won't be triggered.
1231 void OnClose() override { 1228 void OnClose() override {
1232 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1229 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1233 // Set |source_| to nullptr to make sure no more callback will get into 1230 // Set |source_| to nullptr to make sure no more callback will get into
1234 // the source. 1231 // the source.
1235 source_ = nullptr; 1232 source_ = nullptr;
1236 UpdateSendState(); 1233 UpdateSendState();
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2606 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2610 const auto it = send_streams_.find(ssrc); 2607 const auto it = send_streams_.find(ssrc);
2611 if (it != send_streams_.end()) { 2608 if (it != send_streams_.end()) {
2612 return it->second->channel(); 2609 return it->second->channel();
2613 } 2610 }
2614 return -1; 2611 return -1;
2615 } 2612 }
2616 } // namespace cricket 2613 } // namespace cricket
2617 2614
2618 #endif // HAVE_WEBRTC_VOICE 2615 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/api/test/fakeaudiocapturemodule_unittest.cc ('k') | webrtc/modules/audio_device/android/audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698