| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 "webkit/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "media/filters/ffmpeg_audio_decoder.h" | 9 #include "media/filters/ffmpeg_audio_decoder.h" |
| 10 #include "media/filters/ffmpeg_demuxer.h" | 10 #include "media/filters/ffmpeg_demuxer.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 float WebMediaPlayerImpl::duration() const { | 282 float WebMediaPlayerImpl::duration() const { |
| 283 DCHECK(MessageLoop::current() == main_loop_); | 283 DCHECK(MessageLoop::current() == main_loop_); |
| 284 | 284 |
| 285 return static_cast<float>(pipeline_->GetDuration().InSecondsF()); | 285 return static_cast<float>(pipeline_->GetDuration().InSecondsF()); |
| 286 } | 286 } |
| 287 | 287 |
| 288 float WebMediaPlayerImpl::currentTime() const { | 288 float WebMediaPlayerImpl::currentTime() const { |
| 289 DCHECK(MessageLoop::current() == main_loop_); | 289 DCHECK(MessageLoop::current() == main_loop_); |
| 290 | 290 |
| 291 return static_cast<float>(pipeline_->GetTime().InSecondsF()); | 291 return static_cast<float>(pipeline_->GetCurrentTime().InSecondsF()); |
| 292 } | 292 } |
| 293 | 293 |
| 294 int WebMediaPlayerImpl::dataRate() const { | 294 int WebMediaPlayerImpl::dataRate() const { |
| 295 DCHECK(MessageLoop::current() == main_loop_); | 295 DCHECK(MessageLoop::current() == main_loop_); |
| 296 | 296 |
| 297 // TODO(hclam): Add this method call if pipeline has it in the interface. | 297 // TODO(hclam): Add this method call if pipeline has it in the interface. |
| 298 return 0; | 298 return 0; |
| 299 } | 299 } |
| 300 | 300 |
| 301 float WebMediaPlayerImpl::maxTimeBuffered() const { | 301 float WebMediaPlayerImpl::maxTimeBuffered() const { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 416 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 417 DCHECK(MessageLoop::current() == main_loop_); | 417 DCHECK(MessageLoop::current() == main_loop_); |
| 418 DCHECK(client_); | 418 DCHECK(client_); |
| 419 return client_; | 419 return client_; |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace webkit_glue | 422 } // namespace webkit_glue |
| OLD | NEW |