Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/media_stream_audio_track.h" | 5 #include "content/renderer/media/media_stream_audio_track.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/public/renderer/media_stream_audio_sink.h" | 9 #include "content/public/renderer/media_stream_audio_sink.h" |
| 10 #include "media/base/audio_bus.h" | 10 #include "media/base/audio_bus.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 !!base::subtle::NoBarrier_AtomicExchange(&is_enabled_, enabled ? 1 : 0); | 71 !!base::subtle::NoBarrier_AtomicExchange(&is_enabled_, enabled ? 1 : 0); |
| 72 if (enabled == previously_enabled) | 72 if (enabled == previously_enabled) |
| 73 return; | 73 return; |
| 74 | 74 |
| 75 std::vector<MediaStreamAudioSink*> sinks_to_notify; | 75 std::vector<MediaStreamAudioSink*> sinks_to_notify; |
| 76 deliverer_.GetConsumerList(&sinks_to_notify); | 76 deliverer_.GetConsumerList(&sinks_to_notify); |
| 77 for (MediaStreamAudioSink* sink : sinks_to_notify) | 77 for (MediaStreamAudioSink* sink : sinks_to_notify) |
| 78 sink->OnEnabledChanged(enabled); | 78 sink->OnEnabledChanged(enabled); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void MediaStreamAudioTrack::SetContentHint( | |
| 82 blink::WebMediaStreamTrack::ContentHint content_hint) { | |
| 83 DCHECK(thread_checker_.CalledOnValidThread()); | |
| 84 DVLOG(1) << "MediaStreamAudioTrack@" << this << "::SetContentHint()"; | |
|
esprehn
2016/12/09 02:30:09
Do you want traces instead? In general the media c
pbos
2016/12/09 17:34:46
Not sure I actually want this at all. Removed it,
| |
| 85 | |
| 86 std::vector<MediaStreamAudioSink*> sinks_to_notify; | |
| 87 deliverer_.GetConsumerList(&sinks_to_notify); | |
| 88 for (MediaStreamAudioSink* sink : sinks_to_notify) | |
| 89 sink->OnContentHintChanged(content_hint); | |
| 90 } | |
| 91 | |
| 81 void* MediaStreamAudioTrack::GetClassIdentifier() const { | 92 void* MediaStreamAudioTrack::GetClassIdentifier() const { |
| 82 return nullptr; | 93 return nullptr; |
| 83 } | 94 } |
| 84 | 95 |
| 85 void MediaStreamAudioTrack::Start(const base::Closure& stop_callback) { | 96 void MediaStreamAudioTrack::Start(const base::Closure& stop_callback) { |
| 86 DCHECK(thread_checker_.CalledOnValidThread()); | 97 DCHECK(thread_checker_.CalledOnValidThread()); |
| 87 DCHECK(!stop_callback.is_null()); | 98 DCHECK(!stop_callback.is_null()); |
| 88 DCHECK(stop_callback_.is_null()); | 99 DCHECK(stop_callback_.is_null()); |
| 89 DVLOG(1) << "Starting MediaStreamAudioTrack@" << this << '.'; | 100 DVLOG(1) << "Starting MediaStreamAudioTrack@" << this << '.'; |
| 90 stop_callback_ = stop_callback; | 101 stop_callback_ = stop_callback; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 } | 142 } |
| 132 } | 143 } |
| 133 | 144 |
| 134 void MediaStreamAudioTrack::getSettings( | 145 void MediaStreamAudioTrack::getSettings( |
| 135 blink::WebMediaStreamTrack::Settings& settings) { | 146 blink::WebMediaStreamTrack::Settings& settings) { |
| 136 // TODO(hta): Extract the real value. | 147 // TODO(hta): Extract the real value. |
| 137 settings.deviceId = blink::WebString("audio device ID"); | 148 settings.deviceId = blink::WebString("audio device ID"); |
| 138 } | 149 } |
| 139 | 150 |
| 140 } // namespace content | 151 } // namespace content |
| OLD | NEW |