blob: edbaba12faa91ad707d3cef2092f0535775a8e0a [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/brightness_detection.h"
17#include "webrtc/modules/video_processing/deflickering.h"
18#include "webrtc/modules/video_processing/frame_preprocessor.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000019
20namespace webrtc {
21class CriticalSectionWrapper;
22
mflodmana8565422015-12-07 01:09:52 -080023class VideoProcessingImpl : public VideoProcessing {
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000024 public:
mflodmana8565422015-12-07 01:09:52 -080025 VideoProcessingImpl();
26 ~VideoProcessingImpl() override;
henrik.lundin@webrtc.org33df5332011-11-14 15:30:26 +000027
mflodmana8565422015-12-07 01:09:52 -080028 // Implements VideoProcessing.
Miguel Casas-Sanchez47650702015-05-29 17:21:40 -070029 int32_t Deflickering(VideoFrame* frame, FrameStats* stats) override;
Miguel Casas-Sanchez47650702015-05-29 17:21:40 -070030 int32_t BrightnessDetection(const VideoFrame& frame,
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000031 const FrameStats& stats) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000032 void EnableTemporalDecimation(bool enable) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000033 void SetInputFrameResampleMode(VideoFrameResampling resampling_mode) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000034 void EnableContentAnalysis(bool enable) override;
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000035 int32_t SetTargetResolution(uint32_t width,
36 uint32_t height,
37 uint32_t frame_rate) override;
jackychen6e2ce6e2015-07-13 16:26:33 -070038 void SetTargetFramerate(int frame_rate) override;
mflodmana8565422015-12-07 01:09:52 -080039 uint32_t GetDecimatedFrameRate() override;
40 uint32_t GetDecimatedWidth() const override;
41 uint32_t GetDecimatedHeight() const override;
42 void EnableDenosing(bool enable) override;
43 const VideoFrame* PreprocessFrame(const VideoFrame& frame) override;
44 VideoContentMetrics* GetContentMetrics() const override;
niklase@google.com470e71d2011-07-07 08:21:25 +000045
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000046 private:
Peter Boströmf4aa4c22015-09-18 12:24:25 +020047 mutable rtc::CriticalSection mutex_;
48 VPMDeflickering deflickering_ GUARDED_BY(mutex_);
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000049 VPMBrightnessDetection brightness_detection_;
tommi@webrtc.org41617152015-01-29 12:12:49 +000050 VPMFramePreprocessor frame_pre_processor_;
niklase@google.com470e71d2011-07-07 08:21:25 +000051};
52
mflodmana8565422015-12-07 01:09:52 -080053} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000054
Henrik Kjellander0f59a882015-11-18 22:31:24 +010055#endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_