| Index: content/public/renderer/media_stream_audio_sink.cc
|
| diff --git a/content/public/renderer/media_stream_audio_sink.cc b/content/public/renderer/media_stream_audio_sink.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..deb845f5aa403bce6f6d741f021216fd960c19bd
|
| --- /dev/null
|
| +++ b/content/public/renderer/media_stream_audio_sink.cc
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/public/renderer/media_stream_audio_sink.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "content/renderer/media/webrtc_local_audio_track.h"
|
| +#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
|
| +
|
| +namespace content {
|
| +
|
| +void MediaStreamVideoSink::AddToAudioTrack(
|
| + MediaStreamAudioSink* sink, const blink::WebMediaStreamTrack& track) {
|
| + DCHECK(track.source().type() == blink::WebMediaStreamSource::TypeAudio);
|
| + WebRtcLocalAudioTrack* audio_track =
|
| + static_cast <WebRtcLocalAudioTrack*>(track.extraData());
|
| + audio_track->AddSink(sink);
|
| +}
|
| +
|
| +void MediaStreamVideoSink::RemoveFromTrack(
|
| + MediaStreamAudioSink* sink,
|
| + const blink::WebMediaStreamTrack& track) {
|
| + WebRtcLocalAudioTrack* audio_track =
|
| + static_cast <WebRtcLocalAudioTrack*>(track.extraData());
|
| + audio_track->RemoveSink(sink);
|
| +}
|
| +
|
| +} // namespace content
|
|
|