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

Unified Diff: media/base/pipeline.cc

Issue 277123002: Rename AudioRenderer::Play/Pause() to Start/StopRendering(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 3cfe296155fd8a9d1b05458e6a3adb7cbe278d05..c0a4343bdf894d9e2af2a475755d80070437c4a1 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -421,7 +421,9 @@ void Pipeline::StateTransitionTask(PipelineStatus status) {
// We use audio stream to update the clock. So if there is such a
// stream, we pause the clock until we receive a valid timestamp.
waiting_for_clock_update_ = true;
- if (!audio_renderer_) {
+ if (audio_renderer_) {
+ audio_renderer_->StartRendering();
+ } else {
clock_->SetMaxTime(clock_->Duration());
StartClockIfWaitingForTimeUpdate_Locked();
}
@@ -482,10 +484,6 @@ void Pipeline::DoSeek(
SerialRunner::Queue bound_fns;
// Pause.
- if (audio_renderer_) {
- bound_fns.Push(base::Bind(
- &AudioRenderer::Pause, base::Unretained(audio_renderer_.get())));
- }
if (text_renderer_) {
bound_fns.Push(base::Bind(
&TextRenderer::Pause, base::Unretained(text_renderer_.get())));
@@ -533,11 +531,6 @@ void Pipeline::DoPlay(const PipelineStatusCB& done_cb) {
PlaybackRateChangedTask(GetPlaybackRate());
VolumeChangedTask(GetVolume());
- if (audio_renderer_) {
- bound_fns.Push(base::Bind(
- &AudioRenderer::Play, base::Unretained(audio_renderer_.get())));
- }
-
if (video_renderer_) {
bound_fns.Push(base::Bind(
&VideoRenderer::Play, base::Unretained(video_renderer_.get())));
@@ -758,6 +751,9 @@ void Pipeline::SeekTask(TimeDelta time, const PipelineStatusCB& seek_cb) {
// Kick off seeking!
{
+ if (audio_renderer_)
+ audio_renderer_->StopRendering();
+
base::AutoLock auto_lock(lock_);
if (clock_->IsPlaying())
clock_->Pause();

Powered by Google App Engine
This is Rietveld 408576698