| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 5 #ifndef MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
| 6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Destruction must happen on the compositor thread; Stop() must have been | 71 // Destruction must happen on the compositor thread; Stop() must have been |
| 72 // called before destruction starts. | 72 // called before destruction starts. |
| 73 ~VideoFrameCompositor() override; | 73 ~VideoFrameCompositor() override; |
| 74 | 74 |
| 75 // cc::VideoFrameProvider implementation. These methods must be called on the | 75 // cc::VideoFrameProvider implementation. These methods must be called on the |
| 76 // |compositor_task_runner_|. | 76 // |compositor_task_runner_|. |
| 77 void SetVideoFrameProviderClient( | 77 void SetVideoFrameProviderClient( |
| 78 cc::VideoFrameProvider::Client* client) override; | 78 cc::VideoFrameProvider::Client* client) override; |
| 79 bool UpdateCurrentFrame(base::TimeTicks deadline_min, | 79 bool UpdateCurrentFrame(base::TimeTicks deadline_min, |
| 80 base::TimeTicks deadline_max) override; | 80 base::TimeTicks deadline_max) override; |
| 81 bool HasCurrentFrame() override; |
| 81 scoped_refptr<VideoFrame> GetCurrentFrame() override; | 82 scoped_refptr<VideoFrame> GetCurrentFrame() override; |
| 82 void PutCurrentFrame() override; | 83 void PutCurrentFrame() override; |
| 83 | 84 |
| 84 // VideoRendererSink implementation. These methods must be called from the | 85 // VideoRendererSink implementation. These methods must be called from the |
| 85 // same thread (typically the media thread). | 86 // same thread (typically the media thread). |
| 86 void Start(RenderCallback* callback) override; | 87 void Start(RenderCallback* callback) override; |
| 87 void Stop() override; | 88 void Stop() override; |
| 88 void PaintFrameUsingOldRenderingPath( | 89 void PaintFrameUsingOldRenderingPath( |
| 89 const scoped_refptr<VideoFrame>& frame) override; | 90 const scoped_refptr<VideoFrame>& frame) override; |
| 90 | 91 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // These values are updated and read from the media and compositor threads. | 165 // These values are updated and read from the media and compositor threads. |
| 165 base::Lock lock_; | 166 base::Lock lock_; |
| 166 VideoRendererSink::RenderCallback* callback_; | 167 VideoRendererSink::RenderCallback* callback_; |
| 167 | 168 |
| 168 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); | 169 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 } // namespace media | 172 } // namespace media |
| 172 | 173 |
| 173 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 174 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
| OLD | NEW |