| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ | 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ |
| 6 #define MEDIA_BASE_VIDEO_RENDERER_H_ | 6 #define MEDIA_BASE_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 virtual void Preroll(base::TimeDelta time, | 84 virtual void Preroll(base::TimeDelta time, |
| 85 const PipelineStatusCB& callback) = 0; | 85 const PipelineStatusCB& callback) = 0; |
| 86 | 86 |
| 87 // Stop all operations in preparation for being deleted, executing |callback| | 87 // Stop all operations in preparation for being deleted, executing |callback| |
| 88 // when complete. | 88 // when complete. |
| 89 virtual void Stop(const base::Closure& callback) = 0; | 89 virtual void Stop(const base::Closure& callback) = 0; |
| 90 | 90 |
| 91 // Updates the current playback rate. | 91 // Updates the current playback rate. |
| 92 virtual void SetPlaybackRate(float playback_rate) = 0; | 92 virtual void SetPlaybackRate(float playback_rate) = 0; |
| 93 | 93 |
| 94 // Prepare decoder for shutdown. This is a HACK needed because | |
| 95 // PipelineImpl::Stop() goes through a Pause/Flush/Stop dance to all its | |
| 96 // filters, waiting for each state transition to complete before starting the | |
| 97 // next, but WebMediaPlayerImpl::Destroy() holds the renderer loop hostage for | |
| 98 // the duration. http://crbug.com/110228 tracks removing this. | |
| 99 virtual void PrepareForShutdownHack() = 0; | |
| 100 | |
| 101 protected: | 94 protected: |
| 102 friend class base::RefCountedThreadSafe<VideoRenderer>; | 95 friend class base::RefCountedThreadSafe<VideoRenderer>; |
| 103 | 96 |
| 104 VideoRenderer(); | 97 VideoRenderer(); |
| 105 virtual ~VideoRenderer(); | 98 virtual ~VideoRenderer(); |
| 106 | 99 |
| 107 private: | 100 private: |
| 108 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 101 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
| 109 }; | 102 }; |
| 110 | 103 |
| 111 } // namespace media | 104 } // namespace media |
| 112 | 105 |
| 113 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 106 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
| OLD | NEW |