OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/media/base/adaptedvideotracksource.h" | 11 #include "webrtc/media/base/adaptedvideotracksource.h" |
12 | 12 |
13 namespace rtc { | 13 namespace rtc { |
14 | 14 |
15 AdaptedVideoTrackSource::AdaptedVideoTrackSource() { | 15 AdaptedVideoTrackSource::AdaptedVideoTrackSource() { |
16 thread_checker_.DetachFromThread(); | 16 thread_checker_.DetachFromThread(); |
17 } | 17 } |
18 | 18 |
| 19 AdaptedVideoTrackSource::AdaptedVideoTrackSource(int required_alignment) |
| 20 : video_adapter_(required_alignment) { |
| 21 thread_checker_.DetachFromThread(); |
| 22 } |
| 23 |
19 bool AdaptedVideoTrackSource::GetStats(Stats* stats) { | 24 bool AdaptedVideoTrackSource::GetStats(Stats* stats) { |
20 rtc::CritScope lock(&stats_crit_); | 25 rtc::CritScope lock(&stats_crit_); |
21 | 26 |
22 if (!stats_) { | 27 if (!stats_) { |
23 return false; | 28 return false; |
24 } | 29 } |
25 | 30 |
26 *stats = *stats_; | 31 *stats = *stats_; |
27 return true; | 32 return true; |
28 } | 33 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // VideoAdapter dropped the frame. | 107 // VideoAdapter dropped the frame. |
103 return false; | 108 return false; |
104 } | 109 } |
105 | 110 |
106 *crop_x = (width - *crop_width) / 2; | 111 *crop_x = (width - *crop_width) / 2; |
107 *crop_y = (height - *crop_height) / 2; | 112 *crop_y = (height - *crop_height) / 2; |
108 return true; | 113 return true; |
109 } | 114 } |
110 | 115 |
111 } // namespace rtc | 116 } // namespace rtc |
OLD | NEW |