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 #include "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // evident at low speeds and on Vista. Since other speeds are risky and outside | 86 // evident at low speeds and on Vista. Since other speeds are risky and outside |
87 // the norms, we think 1/16x to 16x is a safe and useful range for now. | 87 // the norms, we think 1/16x to 16x is a safe and useful range for now. |
88 const double kMinRate = 0.0625; | 88 const double kMinRate = 0.0625; |
89 const double kMaxRate = 16.0; | 89 const double kMaxRate = 16.0; |
90 | 90 |
91 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { | 91 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { |
92 public: | 92 public: |
93 explicit SyncPointClientImpl( | 93 explicit SyncPointClientImpl( |
94 blink::WebGraphicsContext3D* web_graphics_context) | 94 blink::WebGraphicsContext3D* web_graphics_context) |
95 : web_graphics_context_(web_graphics_context) {} | 95 : web_graphics_context_(web_graphics_context) {} |
96 virtual ~SyncPointClientImpl() {} | 96 ~SyncPointClientImpl() override {} |
97 virtual uint32 InsertSyncPoint() override { | 97 uint32 InsertSyncPoint() override { |
98 return web_graphics_context_->insertSyncPoint(); | 98 return web_graphics_context_->insertSyncPoint(); |
99 } | 99 } |
100 virtual void WaitSyncPoint(uint32 sync_point) override { | 100 void WaitSyncPoint(uint32 sync_point) override { |
101 web_graphics_context_->waitSyncPoint(sync_point); | 101 web_graphics_context_->waitSyncPoint(sync_point); |
102 } | 102 } |
103 | 103 |
104 private: | 104 private: |
105 blink::WebGraphicsContext3D* web_graphics_context_; | 105 blink::WebGraphicsContext3D* web_graphics_context_; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace | 108 } // namespace |
109 | 109 |
110 namespace media { | 110 namespace media { |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 compositor_task_runner_->PostTask(FROM_HERE, | 1015 compositor_task_runner_->PostTask(FROM_HERE, |
1016 base::Bind(&GetCurrentFrameAndSignal, | 1016 base::Bind(&GetCurrentFrameAndSignal, |
1017 base::Unretained(compositor_), | 1017 base::Unretained(compositor_), |
1018 &video_frame, | 1018 &video_frame, |
1019 &event)); | 1019 &event)); |
1020 event.Wait(); | 1020 event.Wait(); |
1021 return video_frame; | 1021 return video_frame; |
1022 } | 1022 } |
1023 | 1023 |
1024 } // namespace media | 1024 } // namespace media |
OLD | NEW |