niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 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 Kjellander | 0f59a88 | 2015-11-18 22:31:24 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
Peter Boström | f4aa4c2 | 2015-09-18 12:24:25 +0200 | [diff] [blame] | 14 | #include "webrtc/base/criticalsection.h" |
Henrik Kjellander | 0f59a88 | 2015-11-18 22:31:24 +0100 | [diff] [blame] | 15 | #include "webrtc/modules/video_processing/include/video_processing.h" |
Henrik Kjellander | 0f59a88 | 2015-11-18 22:31:24 +0100 | [diff] [blame] | 16 | #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.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | class CriticalSectionWrapper; |
| 22 | |
mflodman | a856542 | 2015-12-07 01:09:52 -0800 | [diff] [blame] | 23 | class VideoProcessingImpl : public VideoProcessing { |
mikhal@webrtc.org | b43d807 | 2013-10-03 16:42:41 +0000 | [diff] [blame] | 24 | public: |
mflodman | a856542 | 2015-12-07 01:09:52 -0800 | [diff] [blame] | 25 | VideoProcessingImpl(); |
| 26 | ~VideoProcessingImpl() override; |
henrik.lundin@webrtc.org | 33df533 | 2011-11-14 15:30:26 +0000 | [diff] [blame] | 27 | |
mflodman | a856542 | 2015-12-07 01:09:52 -0800 | [diff] [blame] | 28 | // Implements VideoProcessing. |
Miguel Casas-Sanchez | 4765070 | 2015-05-29 17:21:40 -0700 | [diff] [blame] | 29 | int32_t Deflickering(VideoFrame* frame, FrameStats* stats) override; |
Miguel Casas-Sanchez | 4765070 | 2015-05-29 17:21:40 -0700 | [diff] [blame] | 30 | int32_t BrightnessDetection(const VideoFrame& frame, |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 31 | const FrameStats& stats) override; |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 32 | void EnableTemporalDecimation(bool enable) override; |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 33 | void SetInputFrameResampleMode(VideoFrameResampling resampling_mode) override; |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 34 | void EnableContentAnalysis(bool enable) override; |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 35 | int32_t SetTargetResolution(uint32_t width, |
| 36 | uint32_t height, |
| 37 | uint32_t frame_rate) override; |
jackychen | 6e2ce6e | 2015-07-13 16:26:33 -0700 | [diff] [blame] | 38 | void SetTargetFramerate(int frame_rate) override; |
mflodman | a856542 | 2015-12-07 01:09:52 -0800 | [diff] [blame] | 39 | 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.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 45 | |
mikhal@webrtc.org | b43d807 | 2013-10-03 16:42:41 +0000 | [diff] [blame] | 46 | private: |
Peter Boström | f4aa4c2 | 2015-09-18 12:24:25 +0200 | [diff] [blame] | 47 | mutable rtc::CriticalSection mutex_; |
| 48 | VPMDeflickering deflickering_ GUARDED_BY(mutex_); |
mikhal@webrtc.org | b43d807 | 2013-10-03 16:42:41 +0000 | [diff] [blame] | 49 | VPMBrightnessDetection brightness_detection_; |
tommi@webrtc.org | 4161715 | 2015-01-29 12:12:49 +0000 | [diff] [blame] | 50 | VPMFramePreprocessor frame_pre_processor_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 51 | }; |
| 52 | |
mflodman | a856542 | 2015-12-07 01:09:52 -0800 | [diff] [blame] | 53 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | |
Henrik Kjellander | 0f59a88 | 2015-11-18 22:31:24 +0100 | [diff] [blame] | 55 | #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ |