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 // the norms, we think 1/16x to 16x is a safe and useful range for now. | 86 // the norms, we think 1/16x to 16x is a safe and useful range for now. |
87 const double kMinRate = 0.0625; | 87 const double kMinRate = 0.0625; |
88 const double kMaxRate = 16.0; | 88 const double kMaxRate = 16.0; |
89 | 89 |
90 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { | 90 class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { |
91 public: | 91 public: |
92 explicit SyncPointClientImpl( | 92 explicit SyncPointClientImpl( |
93 blink::WebGraphicsContext3D* web_graphics_context) | 93 blink::WebGraphicsContext3D* web_graphics_context) |
94 : web_graphics_context_(web_graphics_context) {} | 94 : web_graphics_context_(web_graphics_context) {} |
95 virtual ~SyncPointClientImpl() {} | 95 virtual ~SyncPointClientImpl() {} |
96 virtual uint32 InsertSyncPoint() OVERRIDE { | 96 virtual uint32 InsertSyncPoint() override { |
97 return web_graphics_context_->insertSyncPoint(); | 97 return web_graphics_context_->insertSyncPoint(); |
98 } | 98 } |
99 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE { | 99 virtual void WaitSyncPoint(uint32 sync_point) override { |
100 web_graphics_context_->waitSyncPoint(sync_point); | 100 web_graphics_context_->waitSyncPoint(sync_point); |
101 } | 101 } |
102 | 102 |
103 private: | 103 private: |
104 blink::WebGraphicsContext3D* web_graphics_context_; | 104 blink::WebGraphicsContext3D* web_graphics_context_; |
105 }; | 105 }; |
106 | 106 |
107 } // namespace | 107 } // namespace |
108 | 108 |
109 namespace media { | 109 namespace media { |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 compositor_task_runner_->PostTask(FROM_HERE, | 1026 compositor_task_runner_->PostTask(FROM_HERE, |
1027 base::Bind(&GetCurrentFrameAndSignal, | 1027 base::Bind(&GetCurrentFrameAndSignal, |
1028 base::Unretained(compositor_), | 1028 base::Unretained(compositor_), |
1029 &video_frame, | 1029 &video_frame, |
1030 &event)); | 1030 &event)); |
1031 event.Wait(); | 1031 event.Wait(); |
1032 return video_frame; | 1032 return video_frame; |
1033 } | 1033 } |
1034 | 1034 |
1035 } // namespace media | 1035 } // namespace media |
OLD | NEW |