| OLD | NEW |
| 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/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/threading/platform_thread.h" | 7 #include "base/threading/platform_thread.h" |
| 8 #include "media/base/buffers.h" | 8 #include "media/base/buffers.h" |
| 9 #include "media/base/filter_host.h" | 9 #include "media/base/filter_host.h" |
| 10 #include "media/base/limits.h" | 10 #include "media/base/limits.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // Scale our sleep based on the playback rate. | 470 // Scale our sleep based on the playback rate. |
| 471 // TODO(scherkus): floating point badness and degrade gracefully. | 471 // TODO(scherkus): floating point badness and degrade gracefully. |
| 472 return base::TimeDelta::FromMicroseconds( | 472 return base::TimeDelta::FromMicroseconds( |
| 473 static_cast<int64>(sleep.InMicroseconds() / playback_rate)); | 473 static_cast<int64>(sleep.InMicroseconds() / playback_rate)); |
| 474 } | 474 } |
| 475 | 475 |
| 476 void VideoRendererBase::DoStopOrError_Locked() { | 476 void VideoRendererBase::DoStopOrError_Locked() { |
| 477 DCHECK(!pending_paint_); | 477 DCHECK(!pending_paint_); |
| 478 DCHECK(!pending_paint_with_last_available_); | 478 DCHECK(!pending_paint_with_last_available_); |
| 479 lock_.AssertAcquired(); | 479 lock_.AssertAcquired(); |
| 480 current_frame_ = NULL; |
| 480 last_available_frame_ = NULL; | 481 last_available_frame_ = NULL; |
| 481 DCHECK(!pending_read_); | 482 DCHECK(!pending_read_); |
| 482 } | 483 } |
| 483 | 484 |
| 484 } // namespace media | 485 } // namespace media |
| OLD | NEW |