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

Side by Side Diff: content/renderer/media/external_media_stream_audio_source.cc

Issue 2710213005: Revert of Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/external_media_stream_audio_source.h" 5 #include "content/renderer/media/external_media_stream_audio_source.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource( 9 ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource(
10 scoped_refptr<media::AudioCapturerSource> source, 10 scoped_refptr<media::AudioCapturerSource> source,
11 int sample_rate, 11 int sample_rate,
12 media::ChannelLayout channel_layout, 12 media::ChannelLayout channel_layout,
13 int frames_per_buffer) 13 int frames_per_buffer,
14 : MediaStreamAudioSource(false), 14 bool is_remote)
15 source_(std::move(source)), 15 : MediaStreamAudioSource(!is_remote), source_(std::move(source)),
16 was_started_(false) { 16 was_started_(false) {
17 DVLOG(1) 17 DVLOG(1)
18 << "ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource()"; 18 << "ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource()";
19 DCHECK(source_.get()); 19 DCHECK(source_.get());
20 MediaStreamAudioSource::SetFormat(media::AudioParameters( 20 MediaStreamAudioSource::SetFormat(media::AudioParameters(
21 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, 21 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
22 sample_rate, 22 sample_rate,
23 16, // Legacy parameter (data is always in 32-bit float format). 23 16, // Legacy parameter (data is always in 32-bit float format).
24 frames_per_buffer)); 24 frames_per_buffer));
25 } 25 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 *audio_bus, 69 *audio_bus,
70 base::TimeTicks::Now() - 70 base::TimeTicks::Now() -
71 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds)); 71 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds));
72 } 72 }
73 73
74 void ExternalMediaStreamAudioSource::OnCaptureError(const std::string& why) { 74 void ExternalMediaStreamAudioSource::OnCaptureError(const std::string& why) {
75 StopSourceOnError(why); 75 StopSourceOnError(why);
76 } 76 }
77 77
78 } // namespace content 78 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/external_media_stream_audio_source.h ('k') | content/renderer/media/media_stream_audio_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698