OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 // Implementation file of class VideoCapturer. | 11 // Implementation file of class VideoCapturer. |
12 | 12 |
13 #include "webrtc/media/base/videocapturer.h" | 13 #include "webrtc/media/base/videocapturer.h" |
14 | 14 |
15 #include <algorithm> | 15 #include <algorithm> |
16 | 16 |
17 #include "webrtc/api/video/i420_buffer.h" | 17 #include "webrtc/api/video/i420_buffer.h" |
18 #include "webrtc/api/video/video_frame.h" | 18 #include "webrtc/api/video/video_frame.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/rtc_base/logging.h" |
20 | 20 |
21 namespace cricket { | 21 namespace cricket { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 static const int64_t kMaxDistance = ~(static_cast<int64_t>(1) << 63); | 25 static const int64_t kMaxDistance = ~(static_cast<int64_t>(1) << 63); |
26 #ifdef WEBRTC_LINUX | 26 #ifdef WEBRTC_LINUX |
27 static const int kYU12Penalty = 16; // Needs to be higher than MJPG index. | 27 static const int kYU12Penalty = 16; // Needs to be higher than MJPG index. |
28 #endif | 28 #endif |
29 | 29 |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 void VideoCapturer::UpdateInputSize(int width, int height) { | 364 void VideoCapturer::UpdateInputSize(int width, int height) { |
365 // Update stats protected from fetches from different thread. | 365 // Update stats protected from fetches from different thread. |
366 rtc::CritScope cs(&frame_stats_crit_); | 366 rtc::CritScope cs(&frame_stats_crit_); |
367 | 367 |
368 input_size_valid_ = true; | 368 input_size_valid_ = true; |
369 input_width_ = width; | 369 input_width_ = width; |
370 input_height_ = height; | 370 input_height_ = height; |
371 } | 371 } |
372 | 372 |
373 } // namespace cricket | 373 } // namespace cricket |
OLD | NEW |