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

Side by Side Diff: media/filters/adaptive_demuxer.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_output_dispatcher.cc ('k') | net/base/network_change_notifier_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 StreamSwitchManager::~StreamSwitchManager() {} 93 StreamSwitchManager::~StreamSwitchManager() {}
94 94
95 void StreamSwitchManager::Play() { 95 void StreamSwitchManager::Play() {
96 DCHECK_EQ(MessageLoop::current(), message_loop_); 96 DCHECK_EQ(MessageLoop::current(), message_loop_);
97 DCHECK(!playing_); 97 DCHECK(!playing_);
98 playing_ = true; 98 playing_ = true;
99 99
100 if (video_ids_.size() > 1) { 100 if (video_ids_.size() > 1) {
101 timer_.Start(FROM_HERE, 101 timer_.Start(base::TimeDelta::FromMilliseconds(kSwitchTimerPeriod),
102 base::TimeDelta::FromMilliseconds(kSwitchTimerPeriod),
103 this, &StreamSwitchManager::OnSwitchTimer); 102 this, &StreamSwitchManager::OnSwitchTimer);
104 } 103 }
105 } 104 }
106 105
107 void StreamSwitchManager::Pause() { 106 void StreamSwitchManager::Pause() {
108 DCHECK_EQ(MessageLoop::current(), message_loop_); 107 DCHECK_EQ(MessageLoop::current(), message_loop_);
109 DCHECK(playing_); 108 DCHECK(playing_);
110 playing_ = false; 109 playing_ = false;
111 timer_.Stop(); 110 timer_.Stop();
112 } 111 }
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 delete cb; 1030 delete cb;
1032 return; 1031 return;
1033 } 1032 }
1034 DemuxerAccumulator* accumulator = new DemuxerAccumulator( 1033 DemuxerAccumulator* accumulator = new DemuxerAccumulator(
1035 audio_index, video_index, urls.size(), cb); 1034 audio_index, video_index, urls.size(), cb);
1036 for (size_t i = 0; i < urls.size(); ++i) 1035 for (size_t i = 0; i < urls.size(); ++i)
1037 delegate_factory_->Build(urls[i], accumulator->GetNthCallback(i)); 1036 delegate_factory_->Build(urls[i], accumulator->GetNthCallback(i));
1038 } 1037 }
1039 1038
1040 } // namespace media 1039 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_dispatcher.cc ('k') | net/base/network_change_notifier_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698