OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/renderer/media_stream_audio_sink.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "content/renderer/media/webrtc_local_audio_track.h" |
| 9 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 void MediaStreamVideoSink::AddToAudioTrack( |
| 14 MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track) { |
| 15 DCHECK(track.source().type() == blink::WebMediaStreamSource::TypeAudio); |
| 16 WebRtcLocalAudioTrack* audio_track = |
| 17 static_cast <WebRtcLocalAudioTrack*>(track.extraData()); |
| 18 audio_track->AddSink(sink); |
| 19 } |
| 20 |
| 21 void MediaStreamVideoSink::RemoveFromTrack( |
| 22 MediaStreamAudioSink* sink, |
| 23 const blink::WebMediaStreamTrack& track) { |
| 24 WebRtcLocalAudioTrack* audio_track = |
| 25 static_cast <WebRtcLocalAudioTrack*>(track.extraData()); |
| 26 audio_track->RemoveSink(sink); |
| 27 } |
| 28 |
| 29 } // namespace content |
OLD | NEW |