Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: webrtc/media/base/adaptedvideotracksource.cc

Issue 2557323002: Revert of Add ability to scale to arbitrary factors (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.h ('k') | webrtc/media/base/videoadapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
24 bool AdaptedVideoTrackSource::GetStats(Stats* stats) { 19 bool AdaptedVideoTrackSource::GetStats(Stats* stats) {
25 rtc::CritScope lock(&stats_crit_); 20 rtc::CritScope lock(&stats_crit_);
26 21
27 if (!stats_) { 22 if (!stats_) {
28 return false; 23 return false;
29 } 24 }
30 25
31 *stats = *stats_; 26 *stats = *stats_;
32 return true; 27 return true;
33 } 28 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // VideoAdapter dropped the frame. 102 // VideoAdapter dropped the frame.
108 return false; 103 return false;
109 } 104 }
110 105
111 *crop_x = (width - *crop_width) / 2; 106 *crop_x = (width - *crop_width) / 2;
112 *crop_y = (height - *crop_height) / 2; 107 *crop_y = (height - *crop_height) / 2;
113 return true; 108 return true;
114 } 109 }
115 110
116 } // namespace rtc 111 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.h ('k') | webrtc/media/base/videoadapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698