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

Side by Side Diff: media/base/pipeline_impl.cc

Issue 1815883002: Merge M50: "Fix media memory usage reporting after a pipeline suspend." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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
« no previous file with comments | « no previous file | media/base/pipeline_impl_unittest.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/base/pipeline_impl.h" 5 #include "media/base/pipeline_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 text_renderer_->StartPlaying(); 378 text_renderer_->StartPlaying();
379 379
380 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); 380 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK);
381 381
382 PlaybackRateChangedTask(GetPlaybackRate()); 382 PlaybackRateChangedTask(GetPlaybackRate());
383 VolumeChangedTask(GetVolume()); 383 VolumeChangedTask(GetVolume());
384 return; 384 return;
385 385
386 case kSuspended: 386 case kSuspended:
387 renderer_.reset(); 387 renderer_.reset();
388 statistics_.audio_memory_usage = 0;
389 statistics_.video_memory_usage = 0;
388 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); 390 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK);
389 return; 391 return;
390 392
391 case kStopping: 393 case kStopping:
392 case kStopped: 394 case kStopped:
393 case kCreated: 395 case kCreated:
394 case kSeeking: 396 case kSeeking:
395 case kSuspending: 397 case kSuspending:
396 case kResuming: 398 case kResuming:
397 NOTREACHED() << "State has no transition: " << state_; 399 NOTREACHED() << "State has no transition: " << state_;
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 metadata_cb_.Run(metadata); 861 metadata_cb_.Run(metadata);
860 } 862 }
861 863
862 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) { 864 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) {
863 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; 865 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") ";
864 DCHECK(task_runner_->BelongsToCurrentThread()); 866 DCHECK(task_runner_->BelongsToCurrentThread());
865 buffering_state_cb_.Run(new_buffering_state); 867 buffering_state_cb_.Run(new_buffering_state);
866 } 868 }
867 869
868 } // namespace media 870 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698