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

Side by Side Diff: media/tools/player_wtl/movie.cc

Issue 7484054: Migrate Pipeline & PipelineImpl to PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CR nits Created 9 years, 4 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/filters/ffmpeg_demuxer_unittest.cc ('k') | media/tools/player_x11/player_x11.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 "media/tools/player_wtl/movie.h" 5 #include "media/tools/player_wtl/movie.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "media/base/filter_collection.h" 10 #include "media/base/filter_collection.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (pipeline_) 124 if (pipeline_)
125 position = (pipeline_->GetCurrentTime()).InMicroseconds() / 1000000.0f; 125 position = (pipeline_->GetCurrentTime()).InMicroseconds() / 1000000.0f;
126 return position; 126 return position;
127 } 127 }
128 128
129 // Set current movie position in seconds. 129 // Set current movie position in seconds.
130 void Movie::SetPosition(float position) { 130 void Movie::SetPosition(float position) {
131 int64 us = static_cast<int64>(position * 1000000); 131 int64 us = static_cast<int64>(position * 1000000);
132 base::TimeDelta time = base::TimeDelta::FromMicroseconds(us); 132 base::TimeDelta time = base::TimeDelta::FromMicroseconds(us);
133 if (pipeline_) 133 if (pipeline_)
134 pipeline_->Seek(time, NULL); 134 pipeline_->Seek(time, media::PipelineStatusCB());
135 } 135 }
136 136
137 137
138 // Set playback pause. 138 // Set playback pause.
139 void Movie::SetPause(bool pause) { 139 void Movie::SetPause(bool pause) {
140 enable_pause_ = pause; 140 enable_pause_ = pause;
141 Play(play_rate_); 141 Play(play_rate_);
142 } 142 }
143 143
144 // Get playback pause state. 144 // Get playback pause state.
(...skipping 21 matching lines...) Expand all
166 enable_dump_yuv_file_ = enable_dump_yuv_file; 166 enable_dump_yuv_file_ = enable_dump_yuv_file;
167 } 167 }
168 168
169 bool Movie::GetDumpYuvFileEnable() { 169 bool Movie::GetDumpYuvFileEnable() {
170 return enable_dump_yuv_file_; 170 return enable_dump_yuv_file_;
171 } 171 }
172 172
173 // Teardown. 173 // Teardown.
174 void Movie::Close() { 174 void Movie::Close() {
175 if (pipeline_) { 175 if (pipeline_) {
176 pipeline_->Stop(NULL); 176 pipeline_->Stop(media::PipelineStatusCB());
177 pipeline_ = NULL; 177 pipeline_ = NULL;
178 } 178 }
179 179
180 message_loop_factory_.reset(); 180 message_loop_factory_.reset();
181 } 181 }
182 182
183 } // namespace media 183 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698