aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/video_processing/main/source/frame_preprocessor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webrtc/modules/video_processing/main/source/frame_preprocessor.cc')
-rw-r--r--webrtc/modules/video_processing/main/source/frame_preprocessor.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/webrtc/modules/video_processing/main/source/frame_preprocessor.cc b/webrtc/modules/video_processing/main/source/frame_preprocessor.cc
index cf4bc8113e..a9d77c2e0c 100644
--- a/webrtc/modules/video_processing/main/source/frame_preprocessor.cc
+++ b/webrtc/modules/video_processing/main/source/frame_preprocessor.cc
@@ -38,7 +38,6 @@ void VPMFramePreprocessor::Reset() {
frame_cnt_ = 0;
}
-
void VPMFramePreprocessor::EnableTemporalDecimation(bool enable) {
vd_->EnableTemporalDecimation(enable);
}
@@ -62,12 +61,19 @@ int32_t VPMFramePreprocessor::SetTargetResolution(
if (ret_val < 0) return ret_val;
- ret_val = vd_->SetTargetFramerate(frame_rate);
- if (ret_val < 0) return ret_val;
-
+ vd_->SetTargetFramerate(frame_rate);
return VPM_OK;
}
+void VPMFramePreprocessor::SetTargetFramerate(int frame_rate) {
+ if (frame_rate == -1) {
+ vd_->EnableTemporalDecimation(false);
+ } else {
+ vd_->EnableTemporalDecimation(true);
+ vd_->SetTargetFramerate(frame_rate);
+ }
+}
+
void VPMFramePreprocessor::UpdateIncomingframe_rate() {
vd_->UpdateIncomingframe_rate();
}