blob: 7f6ef08a8d6a49a019267e306b358932685d1336 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
2 * Copyright (c) 2011 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
Henrik Kjellander0f59a882015-11-18 22:31:24 +010011#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_
12#define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
Peter Boströmf4aa4c22015-09-18 12:24:25 +020014#include "webrtc/base/criticalsection.h"
Henrik Kjellander0f59a882015-11-18 22:31:24 +010015#include "webrtc/modules/video_processing/include/video_processing.h"
Henrik Kjellander0f59a882015-11-18 22:31:24 +010016#include "webrtc/modules/video_processing/frame_preprocessor.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000017
18namespace webrtc {
19class CriticalSectionWrapper;
20
mflodmana8565422015-12-07 01:09:52 -080021class VideoProcessingImpl : public VideoProcessing {
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000022 public:
mflodmana8565422015-12-07 01:09:52 -080023 VideoProcessingImpl();
24 ~VideoProcessingImpl() override;
henrik.lundin@webrtc.org33df5332011-11-14 15:30:26 +000025
mflodmana8565422015-12-07 01:09:52 -080026 // Implements VideoProcessing.
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000027 void EnableTemporalDecimation(bool enable) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000028 void SetInputFrameResampleMode(VideoFrameResampling resampling_mode) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000029 void EnableContentAnalysis(bool enable) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000030 int32_t SetTargetResolution(uint32_t width,
31 uint32_t height,
32 uint32_t frame_rate) override;
mflodmana8565422015-12-07 01:09:52 -080033 uint32_t GetDecimatedFrameRate() override;
34 uint32_t GetDecimatedWidth() const override;
35 uint32_t GetDecimatedHeight() const override;
nisse90c335a2016-04-27 00:59:22 -070036 void EnableDenoising(bool enable) override;
mflodmana8565422015-12-07 01:09:52 -080037 const VideoFrame* PreprocessFrame(const VideoFrame& frame) override;
38 VideoContentMetrics* GetContentMetrics() const override;
niklase@google.com470e71d2011-07-07 08:21:25 +000039
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000040 private:
pbos5ad935c2016-01-25 03:52:44 -080041 rtc::CriticalSection mutex_;
nisse90c335a2016-04-27 00:59:22 -070042 VPMFramePreprocessor frame_pre_processor_ GUARDED_BY(mutex_);
niklase@google.com470e71d2011-07-07 08:21:25 +000043};
44
mflodmana8565422015-12-07 01:09:52 -080045} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000046
Henrik Kjellander0f59a882015-11-18 22:31:24 +010047#endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_