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

Side by Side Diff: chromecast/media/cma/pipeline/audio_pipeline_impl.cc

Issue 987513006: Chromecast: fixes crash in AvPipelineImpl teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Finalize signature (not a build failure on arm...) Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/media/cma/pipeline/audio_pipeline_impl.h" 5 #include "chromecast/media/cma/pipeline/audio_pipeline_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chromecast/media/cma/backend/audio_pipeline_device.h" 8 #include "chromecast/media/cma/backend/audio_pipeline_device.h"
9 #include "chromecast/media/cma/base/buffering_defs.h" 9 #include "chromecast/media/cma/base/buffering_defs.h"
10 #include "chromecast/media/cma/base/cma_logging.h" 10 #include "chromecast/media/cma/base/cma_logging.h"
(...skipping 11 matching lines...) Expand all
22 AudioPipelineImpl::AudioPipelineImpl(AudioPipelineDevice* audio_device) 22 AudioPipelineImpl::AudioPipelineImpl(AudioPipelineDevice* audio_device)
23 : audio_device_(audio_device), 23 : audio_device_(audio_device),
24 weak_factory_(this) { 24 weak_factory_(this) {
25 av_pipeline_impl_ = new AvPipelineImpl( 25 av_pipeline_impl_ = new AvPipelineImpl(
26 audio_device_, 26 audio_device_,
27 base::Bind(&AudioPipelineImpl::OnUpdateConfig, base::Unretained(this))); 27 base::Bind(&AudioPipelineImpl::OnUpdateConfig, base::Unretained(this)));
28 weak_this_ = weak_factory_.GetWeakPtr(); 28 weak_this_ = weak_factory_.GetWeakPtr();
29 } 29 }
30 30
31 AudioPipelineImpl::~AudioPipelineImpl() { 31 AudioPipelineImpl::~AudioPipelineImpl() {
32 av_pipeline_impl_->Finalize();
32 } 33 }
33 34
34 void AudioPipelineImpl::SetCodedFrameProvider( 35 void AudioPipelineImpl::SetCodedFrameProvider(
35 scoped_ptr<CodedFrameProvider> frame_provider) { 36 scoped_ptr<CodedFrameProvider> frame_provider) {
36 av_pipeline_impl_->SetCodedFrameProvider( 37 av_pipeline_impl_->SetCodedFrameProvider(
37 frame_provider.Pass(), kAppAudioBufferSize, kMaxAudioFrameSize); 38 frame_provider.Pass(), kAppAudioBufferSize, kMaxAudioFrameSize);
38 } 39 }
39 40
40 void AudioPipelineImpl::SetClient(const AvPipelineClient& client) { 41 void AudioPipelineImpl::SetClient(const AvPipelineClient& client) {
41 audio_client_ = client; 42 audio_client_ = client;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 delta_stats.audio_bytes_decoded = 149 delta_stats.audio_bytes_decoded =
149 current_stats.audio_bytes_decoded - previous_stats_.audio_bytes_decoded; 150 current_stats.audio_bytes_decoded - previous_stats_.audio_bytes_decoded;
150 151
151 previous_stats_ = current_stats; 152 previous_stats_ = current_stats;
152 153
153 audio_client_.statistics_cb.Run(delta_stats); 154 audio_client_.statistics_cb.Run(delta_stats);
154 } 155 }
155 156
156 } // namespace media 157 } // namespace media
157 } // namespace chromecast 158 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/filters/cma_renderer.cc ('k') | chromecast/media/cma/pipeline/av_pipeline_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698