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 #include "media/capture/content/thread_safe_capture_oracle.h" | 5 #include "media/capture/content/thread_safe_capture_oracle.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bits.h" | 10 #include "base/bits.h" |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
12 #include "base/time/time.h" | 14 #include "base/time/time.h" |
13 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
14 #include "media/base/video_capture_types.h" | 16 #include "media/base/video_capture_types.h" |
15 #include "media/base/video_frame.h" | 17 #include "media/base/video_frame.h" |
16 #include "media/base/video_frame_metadata.h" | 18 #include "media/base/video_frame_metadata.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // destructor. |metadata| is still valid for read-access at this point. | 196 // destructor. |metadata| is still valid for read-access at this point. |
195 double utilization = -1.0; | 197 double utilization = -1.0; |
196 if (metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, | 198 if (metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, |
197 &utilization)) { | 199 &utilization)) { |
198 base::AutoLock guard(lock_); | 200 base::AutoLock guard(lock_); |
199 oracle_.RecordConsumerFeedback(frame_number, utilization); | 201 oracle_.RecordConsumerFeedback(frame_number, utilization); |
200 } | 202 } |
201 } | 203 } |
202 | 204 |
203 } // namespace media | 205 } // namespace media |
OLD | NEW |