| 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 #ifndef MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void AttemptRead_Locked(); | 117 void AttemptRead_Locked(); |
| 118 | 118 |
| 119 // Called when VideoFrameStream::Reset() completes. | 119 // Called when VideoFrameStream::Reset() completes. |
| 120 void OnVideoFrameStreamResetDone(); | 120 void OnVideoFrameStreamResetDone(); |
| 121 | 121 |
| 122 // Returns true if the renderer has enough data for playback purposes. | 122 // Returns true if the renderer has enough data for playback purposes. |
| 123 // Note that having enough data may be due to reaching end of stream. | 123 // Note that having enough data may be due to reaching end of stream. |
| 124 bool HaveEnoughData_Locked(); | 124 bool HaveEnoughData_Locked(); |
| 125 void TransitionToHaveEnough_Locked(); | 125 void TransitionToHaveEnough_Locked(); |
| 126 void TransitionToHaveNothing(); | 126 void TransitionToHaveNothing(); |
| 127 void TransitionToHaveNothing_Locked(); |
| 127 | 128 |
| 128 // Runs |statistics_cb_| with |frames_decoded_| and |frames_dropped_|, resets | 129 // Runs |statistics_cb_| with |frames_decoded_| and |frames_dropped_|, resets |
| 129 // them to 0. | 130 // them to 0. |
| 130 void UpdateStats_Locked(); | 131 void UpdateStats_Locked(); |
| 131 | 132 |
| 132 // Returns true if there is no more room for additional buffered frames. | 133 // Returns true if there is no more room for additional buffered frames. |
| 133 bool HaveReachedBufferingCap(); | 134 bool HaveReachedBufferingCap(); |
| 134 | 135 |
| 135 // Starts or stops |sink_| respectively. Do not call while |lock_| is held. | 136 // Starts or stops |sink_| respectively. Do not call while |lock_| is held. |
| 136 void StartSink(); | 137 void StartSink(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // want to discard video frames that might be received after the stream has | 293 // want to discard video frames that might be received after the stream has |
| 293 // been reset. | 294 // been reset. |
| 294 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; | 295 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; |
| 295 | 296 |
| 296 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 297 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 } // namespace media | 300 } // namespace media |
| 300 | 301 |
| 301 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 302 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| OLD | NEW |