| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void StartPlayingFrom(base::TimeDelta timestamp) override; | 72 void StartPlayingFrom(base::TimeDelta timestamp) override; |
| 73 void OnTimeProgressing() override; | 73 void OnTimeProgressing() override; |
| 74 void OnTimeStopped() override; | 74 void OnTimeStopped() override; |
| 75 | 75 |
| 76 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); | 76 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); |
| 77 void SetGpuMemoryBufferVideoForTesting( | 77 void SetGpuMemoryBufferVideoForTesting( |
| 78 std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool); | 78 std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool); |
| 79 size_t frames_queued_for_testing() const { | 79 size_t frames_queued_for_testing() const { |
| 80 return algorithm_->frames_queued(); | 80 return algorithm_->frames_queued(); |
| 81 } | 81 } |
| 82 size_t effective_frames_queued_for_testing() const { |
| 83 return algorithm_->effective_frames_queued(); |
| 84 } |
| 82 | 85 |
| 83 // VideoRendererSink::RenderCallback implementation. | 86 // VideoRendererSink::RenderCallback implementation. |
| 84 scoped_refptr<VideoFrame> Render(base::TimeTicks deadline_min, | 87 scoped_refptr<VideoFrame> Render(base::TimeTicks deadline_min, |
| 85 base::TimeTicks deadline_max, | 88 base::TimeTicks deadline_max, |
| 86 bool background_rendering) override; | 89 bool background_rendering) override; |
| 87 void OnFrameDropped() override; | 90 void OnFrameDropped() override; |
| 88 | 91 |
| 89 private: | 92 private: |
| 90 // Callback for |video_frame_stream_| initialization. | 93 // Callback for |video_frame_stream_| initialization. |
| 91 void OnVideoFrameStreamInitialized(bool success); | 94 void OnVideoFrameStreamInitialized(bool success); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // want to discard video frames that might be received after the stream has | 300 // want to discard video frames that might be received after the stream has |
| 298 // been reset. | 301 // been reset. |
| 299 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; | 302 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; |
| 300 | 303 |
| 301 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 304 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
| 302 }; | 305 }; |
| 303 | 306 |
| 304 } // namespace media | 307 } // namespace media |
| 305 | 308 |
| 306 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 309 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| OLD | NEW |