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

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

Issue 15872004: Disable preroll duration increase on underflow for MediaSource playback. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address CR comments Created 7 years, 6 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 | « media/base/mock_filters.h ('k') | media/filters/audio_renderer_impl.h » ('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.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 if (!message_loop_->BelongsToCurrentThread()) { 921 if (!message_loop_->BelongsToCurrentThread()) {
922 message_loop_->PostTask(FROM_HERE, base::Bind( 922 message_loop_->PostTask(FROM_HERE, base::Bind(
923 &Pipeline::OnAudioUnderflow, base::Unretained(this))); 923 &Pipeline::OnAudioUnderflow, base::Unretained(this)));
924 return; 924 return;
925 } 925 }
926 926
927 if (state_ != kStarted) 927 if (state_ != kStarted)
928 return; 928 return;
929 929
930 if (audio_renderer_) 930 if (audio_renderer_)
931 audio_renderer_->ResumeAfterUnderflow(true); 931 audio_renderer_->ResumeAfterUnderflow();
932 } 932 }
933 933
934 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 934 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
935 lock_.AssertAcquired(); 935 lock_.AssertAcquired();
936 if (!waiting_for_clock_update_) 936 if (!waiting_for_clock_update_)
937 return; 937 return;
938 938
939 waiting_for_clock_update_ = false; 939 waiting_for_clock_update_ = false;
940 clock_->Play(); 940 clock_->Play();
941 } 941 }
942 942
943 } // namespace media 943 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/filters/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698