Commit 564ce1fc authored by alokp's avatar alokp Committed by Commit bot

[chromecast] Deletes dead code to track MediaPipelineBackend.

BUG=571155

Review-Url: https://codereview.chromium.org/2340423002
Cr-Commit-Position: refs/heads/master@{#418999}
parent bb27517d
......@@ -30,11 +30,6 @@ struct MediaPipelineClient {
// Callback used to report the buffering status.
::media::BufferingStateCB buffering_state_cb;
// Callback used to report the creation and destruction of
// MediaPipelineBackend
base::Closure pipeline_backend_created_cb;
base::Closure pipeline_backend_destroyed_cb;
};
} // namespace media
......
......@@ -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);
......
......@@ -99,10 +99,12 @@ class MediaPipelineImpl {
// Cached here because CMA pipeline backend does not support rate == 0,
// which is emulated by pausing the backend.
float playback_rate_;
// Since av pipeline still need to access device components in their
// destructor, it's important to delete them first.
std::unique_ptr<MediaPipelineBackend> media_pipeline_backend_;
std::unique_ptr<AudioDecoderSoftwareWrapper> audio_decoder_;
MediaPipelineBackend::VideoDecoder* video_decoder_;
std::unique_ptr<AudioPipelineImpl> audio_pipeline_;
std::unique_ptr<VideoPipelineImpl> video_pipeline_;
std::unique_ptr<FlushTask> pending_flush_task_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment