Chromium Code Reviews| Index: content/renderer/media/webrtc_local_audio_track.cc |
| diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc |
| index 0aa63658c516256a90b33696437143d775199f2b..4abd407f28afc8c9409f3eb23725434658183485 100644 |
| --- a/content/renderer/media/webrtc_local_audio_track.cc |
| +++ b/content/renderer/media/webrtc_local_audio_track.cc |
| @@ -29,14 +29,13 @@ WebRtcLocalAudioTrack::WebRtcLocalAudioTrack( |
| capturer_(capturer), |
| track_source_(track_source) { |
| DCHECK(capturer.get()); |
| - capturer_->AddSink(this); |
| DVLOG(1) << "WebRtcLocalAudioTrack::WebRtcLocalAudioTrack()"; |
| } |
| WebRtcLocalAudioTrack::~WebRtcLocalAudioTrack() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(sinks_.empty()); |
| - capturer_->RemoveSink(this); |
| + DCHECK(!capturer_.get()); |
|
henrika (OOO until Aug 14)
2013/06/05 09:09:20
What ensures that RemoveSink i called now?
no longer working on chromium
2013/06/05 16:29:45
Right, I also realized it this morning, we should
|
| DVLOG(1) << "WebRtcLocalAudioTrack::~WebRtcLocalAudioTrack()"; |
| } |
| @@ -124,4 +123,17 @@ void WebRtcLocalAudioTrack::RemoveSink( |
| } |
| } |
| +void WebRtcLocalAudioTrack::Start() { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + DVLOG(1) << "WebRtcLocalAudioTrack::Start()"; |
| + capturer_->AddSink(this); |
| +} |
| + |
| +void WebRtcLocalAudioTrack::Stop() { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + DVLOG(1) << "WebRtcLocalAudioTrack::Stop()"; |
| + capturer_->RemoveSink(this); |
| + capturer_ = NULL; |
| +} |
| + |
| } // namespace content |