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

Side by Side Diff: media/filters/audio_renderer_impl.cc

Issue 163433004: Stop DecryptingDemuxerStream in AudioRendererImpl::Stop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 10 months 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
« no previous file with comments | « media/filters/audio_renderer_impl.h ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/audio_renderer_impl.h" 5 #include "media/filters/audio_renderer_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 underflow_cb_.Reset(); 209 underflow_cb_.Reset();
210 time_cb_.Reset(); 210 time_cb_.Reset();
211 flush_cb_.Reset(); 211 flush_cb_.Reset();
212 } 212 }
213 213
214 if (sink_) { 214 if (sink_) {
215 sink_->Stop(); 215 sink_->Stop();
216 sink_ = NULL; 216 sink_ = NULL;
217 } 217 }
218 218
219 if (decrypting_demuxer_stream_) {
220 decrypting_demuxer_stream_->Stop(
221 base::Bind(&AudioRendererImpl::StopDecoder, weak_this_));
222 return;
223 }
224
225 StopDecoder();
226 }
227
228 void AudioRendererImpl::StopDecoder() {
229 DCHECK(task_runner_->BelongsToCurrentThread());
230 DCHECK(!stop_cb_.is_null());
231
219 if (decoder_) { 232 if (decoder_) {
220 decoder_->Stop(base::ResetAndReturn(&stop_cb_)); 233 decoder_->Stop(base::ResetAndReturn(&stop_cb_));
221 return; 234 return;
222 } 235 }
223 236
224 task_runner_->PostTask(FROM_HERE, base::ResetAndReturn(&stop_cb_)); 237 task_runner_->PostTask(FROM_HERE, base::ResetAndReturn(&stop_cb_));
225 } 238 }
226 239
227 void AudioRendererImpl::Preroll(base::TimeDelta time, 240 void AudioRendererImpl::Preroll(base::TimeDelta time,
228 const PipelineStatusCB& cb) { 241 const PipelineStatusCB& cb) {
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 } 741 }
729 } 742 }
730 743
731 void AudioRendererImpl::ChangeState_Locked(State new_state) { 744 void AudioRendererImpl::ChangeState_Locked(State new_state) {
732 DVLOG(1) << __FUNCTION__ << " : " << state_ << " -> " << new_state; 745 DVLOG(1) << __FUNCTION__ << " : " << state_ << " -> " << new_state;
733 lock_.AssertAcquired(); 746 lock_.AssertAcquired();
734 state_ = new_state; 747 state_ = new_state;
735 } 748 }
736 749
737 } // namespace media 750 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl.h ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698