Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 | 71 |
| 72 // VideoFrameProvider implementation. | 72 // VideoFrameProvider implementation. |
| 73 void SetVideoFrameProviderClient( | 73 void SetVideoFrameProviderClient( |
| 74 cc::VideoFrameProvider::Client* client) override; | 74 cc::VideoFrameProvider::Client* client) override; |
| 75 bool UpdateCurrentFrame(base::TimeTicks deadline_min, | 75 bool UpdateCurrentFrame(base::TimeTicks deadline_min, |
| 76 base::TimeTicks deadline_max) override; | 76 base::TimeTicks deadline_max) override; |
| 77 bool HasCurrentFrame() override; | 77 bool HasCurrentFrame() override; |
| 78 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; | 78 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; |
| 79 void PutCurrentFrame() override; | 79 void PutCurrentFrame() override; |
| 80 | 80 |
| 81 // Return the current frame being rendered. | |
| 82 // Difference between GetCurrentFrame(): GetCurrentFrame() is designed for | |
| 83 // chrome compositor to pull frame from WebMediaPlayerMSCompositor, and thus | |
| 84 // calling GetCurrentFrame() will affect statistics like |dropped_frames_| | |
| 85 // etc. Calling this function has no side effect. | |
| 86 scoped_refptr<media::VideoFrame> current_frame(); | |
|
DaleCurtis
2016/04/28 17:51:37
hacker_style() methods must be inline. Please give
qiangchen
2016/04/28 21:02:40
Done.
| |
| 87 | |
| 81 void StartRendering(); | 88 void StartRendering(); |
| 82 void StopRendering(); | 89 void StopRendering(); |
| 83 void ReplaceCurrentFrameWithACopy(); | 90 void ReplaceCurrentFrameWithACopy(); |
| 84 | 91 |
| 85 private: | 92 private: |
| 86 friend class WebMediaPlayerMSTest; | 93 friend class WebMediaPlayerMSTest; |
| 87 | 94 |
| 88 bool MapTimestampsToRenderTimeTicks( | 95 bool MapTimestampsToRenderTimeTicks( |
| 89 const std::vector<base::TimeDelta>& timestamps, | 96 const std::vector<base::TimeDelta>& timestamps, |
| 90 std::vector<base::TimeTicks>* wall_clock_times); | 97 std::vector<base::TimeTicks>* wall_clock_times); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 base::Lock current_frame_lock_; | 157 base::Lock current_frame_lock_; |
| 151 | 158 |
| 152 // Make sure the weak pointer factory member is the last member of the class. | 159 // Make sure the weak pointer factory member is the last member of the class. |
| 153 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_; | 160 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_; |
| 154 | 161 |
| 155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor); | 162 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor); |
| 156 }; | 163 }; |
| 157 } // namespace content | 164 } // namespace content |
| 158 | 165 |
| 159 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ | 166 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_ |
| OLD | NEW |