| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 if (delegate_.get()) | 345 if (delegate_.get()) |
| 346 delegate_->DidPlay(this); | 346 delegate_->DidPlay(this); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void WebMediaPlayerImpl::pause() { | 349 void WebMediaPlayerImpl::pause() { |
| 350 DCHECK(main_loop_->BelongsToCurrentThread()); | 350 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 351 | 351 |
| 352 paused_ = true; | 352 paused_ = true; |
| 353 pipeline_.SetPlaybackRate(0.0f); | 353 pipeline_.SetPlaybackRate(0.0f); |
| 354 if (data_source_) | 354 if (data_source_) |
| 355 data_source_->MediaIsPaused(); | 355 data_source_->MediaIsPaused(is_local_source_); |
| 356 paused_time_ = pipeline_.GetMediaTime(); | 356 paused_time_ = pipeline_.GetMediaTime(); |
| 357 | 357 |
| 358 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PAUSE)); | 358 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PAUSE)); |
| 359 | 359 |
| 360 if (delegate_.get()) | 360 if (delegate_.get()) |
| 361 delegate_->DidPause(this); | 361 delegate_->DidPause(this); |
| 362 } | 362 } |
| 363 | 363 |
| 364 bool WebMediaPlayerImpl::supportsSave() const { | 364 bool WebMediaPlayerImpl::supportsSave() const { |
| 365 DCHECK(main_loop_->BelongsToCurrentThread()); | 365 DCHECK(main_loop_->BelongsToCurrentThread()); |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 compositor_task_runner_->PostTask(FROM_HERE, | 1375 compositor_task_runner_->PostTask(FROM_HERE, |
| 1376 base::Bind(&GetCurrentFrameAndSignal, | 1376 base::Bind(&GetCurrentFrameAndSignal, |
| 1377 base::Unretained(compositor_), | 1377 base::Unretained(compositor_), |
| 1378 &video_frame, | 1378 &video_frame, |
| 1379 &event)); | 1379 &event)); |
| 1380 event.Wait(); | 1380 event.Wait(); |
| 1381 return video_frame; | 1381 return video_frame; |
| 1382 } | 1382 } |
| 1383 | 1383 |
| 1384 } // namespace content | 1384 } // namespace content |
| OLD | NEW |