| 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/base/media_format.h" | 9 #include "media/base/media_format.h" |
| 10 #include "media/filters/ffmpeg_audio_decoder.h" | 10 #include "media/filters/ffmpeg_audio_decoder.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 return pipeline_->GetTotalBytes() != 0; | 328 return pipeline_->GetTotalBytes() != 0; |
| 329 } | 329 } |
| 330 | 330 |
| 331 bool WebMediaPlayerImpl::hasVideo() const { | 331 bool WebMediaPlayerImpl::hasVideo() const { |
| 332 DCHECK(MessageLoop::current() == main_loop_); | 332 DCHECK(MessageLoop::current() == main_loop_); |
| 333 | 333 |
| 334 return pipeline_->IsRendered(media::mime_type::kMajorTypeVideo); | 334 return pipeline_->IsRendered(media::mime_type::kMajorTypeVideo); |
| 335 } | 335 } |
| 336 | 336 |
| 337 bool WebMediaPlayerImpl::hasAudio() const { |
| 338 DCHECK(MessageLoop::current() == main_loop_); |
| 339 |
| 340 return pipeline_->IsRendered(media::mime_type::kMajorTypeAudio); |
| 341 } |
| 342 |
| 337 WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { | 343 WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { |
| 338 DCHECK(MessageLoop::current() == main_loop_); | 344 DCHECK(MessageLoop::current() == main_loop_); |
| 339 | 345 |
| 340 size_t width, height; | 346 size_t width, height; |
| 341 pipeline_->GetVideoSize(&width, &height); | 347 pipeline_->GetVideoSize(&width, &height); |
| 342 return WebKit::WebSize(width, height); | 348 return WebKit::WebSize(width, height); |
| 343 } | 349 } |
| 344 | 350 |
| 345 bool WebMediaPlayerImpl::paused() const { | 351 bool WebMediaPlayerImpl::paused() const { |
| 346 DCHECK(MessageLoop::current() == main_loop_); | 352 DCHECK(MessageLoop::current() == main_loop_); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 } | 552 } |
| 547 } | 553 } |
| 548 | 554 |
| 549 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { | 555 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { |
| 550 DCHECK(MessageLoop::current() == main_loop_); | 556 DCHECK(MessageLoop::current() == main_loop_); |
| 551 DCHECK(client_); | 557 DCHECK(client_); |
| 552 return client_; | 558 return client_; |
| 553 } | 559 } |
| 554 | 560 |
| 555 } // namespace webkit_glue | 561 } // namespace webkit_glue |
| OLD | NEW |