OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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/common_types.h" | 11 #include "webrtc/common_types.h" |
12 | 12 |
13 #include <algorithm> // std::max | 13 #include <algorithm> // std::max |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
17 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" | 17 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h" |
18 #include "webrtc/modules/video_coding/main/source/encoded_frame.h" | 18 #include "webrtc/modules/video_coding/main/source/encoded_frame.h" |
19 #include "webrtc/modules/video_coding/main/source/video_coding_impl.h" | 19 #include "webrtc/modules/video_coding/main/source/video_coding_impl.h" |
20 #include "webrtc/modules/video_coding/utility/include/quality_scaler.h" | 20 #include "webrtc/modules/video_coding/utility/include/quality_scaler.h" |
21 #include "webrtc/system_wrappers/interface/clock.h" | 21 #include "webrtc/system_wrappers/include/clock.h" |
22 #include "webrtc/system_wrappers/interface/logging.h" | 22 #include "webrtc/system_wrappers/include/logging.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 namespace vcm { | 25 namespace vcm { |
26 | 26 |
27 VideoSender::VideoSender(Clock* clock, | 27 VideoSender::VideoSender(Clock* clock, |
28 EncodedImageCallback* post_encode_callback, | 28 EncodedImageCallback* post_encode_callback, |
29 VideoEncoderRateObserver* encoder_rate_observer, | 29 VideoEncoderRateObserver* encoder_rate_observer, |
30 VCMQMSettingsCallback* qm_settings_callback) | 30 VCMQMSettingsCallback* qm_settings_callback) |
31 : clock_(clock), | 31 : clock_(clock), |
32 process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), | 32 process_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 int window_bps = std::max(threshold_bps / 10, 10000); | 387 int window_bps = std::max(threshold_bps / 10, 10000); |
388 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); | 388 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); |
389 } | 389 } |
390 | 390 |
391 bool VideoSender::VideoSuspended() const { | 391 bool VideoSender::VideoSuspended() const { |
392 rtc::CritScope lock(&send_crit_); | 392 rtc::CritScope lock(&send_crit_); |
393 return _mediaOpt.IsVideoSuspended(); | 393 return _mediaOpt.IsVideoSuspended(); |
394 } | 394 } |
395 } // namespace vcm | 395 } // namespace vcm |
396 } // namespace webrtc | 396 } // namespace webrtc |
OLD | NEW |