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

Unified Diff: chromecast/media/cma/pipeline/media_pipeline_impl.cc

Issue 2340423002: [chromecast] Deletes dead code to track MediaPipelineBackend. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/media/cma/pipeline/media_pipeline_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/pipeline/media_pipeline_impl.cc
diff --git a/chromecast/media/cma/pipeline/media_pipeline_impl.cc b/chromecast/media/cma/pipeline/media_pipeline_impl.cc
index 51b79fa3c3369a7710e98ab4e29a860a35cc2f3c..732803193274ba2137c200bdd33ec5929ead5f80 100644
--- a/chromecast/media/cma/pipeline/media_pipeline_impl.cc
+++ b/chromecast/media/cma/pipeline/media_pipeline_impl.cc
@@ -103,21 +103,10 @@ MediaPipelineImpl::~MediaPipelineImpl() {
CMALOG(kLogControl) << __FUNCTION__;
DCHECK(thread_checker_.CalledOnValidThread());
- weak_factory_.InvalidateWeakPtrs();
-
if (backend_state_ != BACKEND_STATE_UNINITIALIZED &&
backend_state_ != BACKEND_STATE_INITIALIZED)
metrics::CastMetricsHelper::GetInstance()->RecordApplicationEvent(
"Cast.Platform.Ended");
-
- // Since av pipeline still need to access device components in their
- // destructor, it's important to delete them first.
- video_pipeline_.reset();
- audio_pipeline_.reset();
- audio_decoder_.reset();
- media_pipeline_backend_.reset();
- if (!client_.pipeline_backend_destroyed_cb.is_null())
- client_.pipeline_backend_destroyed_cb.Run();
}
void MediaPipelineImpl::Initialize(
@@ -126,9 +115,7 @@ void MediaPipelineImpl::Initialize(
CMALOG(kLogControl) << __FUNCTION__;
DCHECK(thread_checker_.CalledOnValidThread());
audio_decoder_.reset();
- media_pipeline_backend_.reset(media_pipeline_backend.release());
- if (!client_.pipeline_backend_created_cb.is_null())
- client_.pipeline_backend_created_cb.Run();
+ media_pipeline_backend_ = std::move(media_pipeline_backend);
if (load_type == kLoadTypeURL || load_type == kLoadTypeMediaSource) {
base::TimeDelta low_threshold(kLowBufferThresholdURL);
« no previous file with comments | « chromecast/media/cma/pipeline/media_pipeline_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698