| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #include "webrtc/modules/video_processing/video_processing_impl.h" | |
| 12 | |
| 13 #include <assert.h> | |
| 14 | |
| 15 #include "webrtc/base/checks.h" | |
| 16 #include "webrtc/base/logging.h" | |
| 17 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | |
| 18 | |
| 19 namespace webrtc { | |
| 20 | |
| 21 VideoProcessing* VideoProcessing::Create() { | |
| 22 return new VideoProcessingImpl(); | |
| 23 } | |
| 24 | |
| 25 VideoProcessingImpl::VideoProcessingImpl() {} | |
| 26 VideoProcessingImpl::~VideoProcessingImpl() {} | |
| 27 | |
| 28 void VideoProcessingImpl::EnableTemporalDecimation(bool enable) { | |
| 29 rtc::CritScope mutex(&mutex_); | |
| 30 frame_pre_processor_.EnableTemporalDecimation(enable); | |
| 31 } | |
| 32 | |
| 33 void VideoProcessingImpl::SetInputFrameResampleMode( | |
| 34 VideoFrameResampling resampling_mode) { | |
| 35 rtc::CritScope cs(&mutex_); | |
| 36 frame_pre_processor_.SetInputFrameResampleMode(resampling_mode); | |
| 37 } | |
| 38 | |
| 39 int32_t VideoProcessingImpl::SetTargetResolution(uint32_t width, | |
| 40 uint32_t height, | |
| 41 uint32_t frame_rate) { | |
| 42 rtc::CritScope cs(&mutex_); | |
| 43 return frame_pre_processor_.SetTargetResolution(width, height, frame_rate); | |
| 44 } | |
| 45 | |
| 46 uint32_t VideoProcessingImpl::GetDecimatedFrameRate() { | |
| 47 rtc::CritScope cs(&mutex_); | |
| 48 return frame_pre_processor_.GetDecimatedFrameRate(); | |
| 49 } | |
| 50 | |
| 51 uint32_t VideoProcessingImpl::GetDecimatedWidth() const { | |
| 52 rtc::CritScope cs(&mutex_); | |
| 53 return frame_pre_processor_.GetDecimatedWidth(); | |
| 54 } | |
| 55 | |
| 56 uint32_t VideoProcessingImpl::GetDecimatedHeight() const { | |
| 57 rtc::CritScope cs(&mutex_); | |
| 58 return frame_pre_processor_.GetDecimatedHeight(); | |
| 59 } | |
| 60 | |
| 61 void VideoProcessingImpl::EnableDenoising(bool enable) { | |
| 62 rtc::CritScope cs(&mutex_); | |
| 63 frame_pre_processor_.EnableDenoising(enable); | |
| 64 } | |
| 65 | |
| 66 const VideoFrame* VideoProcessingImpl::PreprocessFrame( | |
| 67 const VideoFrame& frame) { | |
| 68 rtc::CritScope mutex(&mutex_); | |
| 69 return frame_pre_processor_.PreprocessFrame(frame); | |
| 70 } | |
| 71 | |
| 72 } // namespace webrtc | |
| OLD | NEW |