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

Side by Side Diff: content/public/renderer/media_stream_audio_sink.cc

Issue 90743004: Add generic interfaces for the sinks of the media stream audio track (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698