| OLD | NEW |
| (Empty) |
| 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 | |
| 11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ | |
| 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ | |
| 13 | |
| 14 #include "webrtc/modules/include/module_common_types.h" | |
| 15 #include "webrtc/modules/video_processing/include/video_processing_defines.h" | |
| 16 #include "webrtc/video_frame.h" | |
| 17 | |
| 18 // The module is largely intended to process video streams, except functionality | |
| 19 // provided by static functions which operate independent of previous frames. It | |
| 20 // is recommended, but not required that a unique instance be used for each | |
| 21 // concurrently processed stream. Similarly, it is recommended to call Reset() | |
| 22 // before switching to a new stream, but this is not absolutely required. | |
| 23 // | |
| 24 // The module provides basic thread safety by permitting only a single function | |
| 25 // to execute concurrently. | |
| 26 | |
| 27 namespace webrtc { | |
| 28 | |
| 29 class VideoProcessing { | |
| 30 public: | |
| 31 static VideoProcessing* Create(); | |
| 32 virtual ~VideoProcessing() {} | |
| 33 | |
| 34 // The following functions refer to the pre-processor unit within VPM. The | |
| 35 // pre-processor perfoms spatial/temporal decimation and content analysis on | |
| 36 // the frames prior to encoding. | |
| 37 | |
| 38 // Enable/disable temporal decimation | |
| 39 virtual void EnableTemporalDecimation(bool enable) = 0; | |
| 40 | |
| 41 virtual int32_t SetTargetResolution(uint32_t width, | |
| 42 uint32_t height, | |
| 43 uint32_t frame_rate) = 0; | |
| 44 | |
| 45 virtual uint32_t GetDecimatedFrameRate() = 0; | |
| 46 virtual uint32_t GetDecimatedWidth() const = 0; | |
| 47 virtual uint32_t GetDecimatedHeight() const = 0; | |
| 48 | |
| 49 // Set the spatial resampling settings of the VPM according to | |
| 50 // VideoFrameResampling. | |
| 51 virtual void SetInputFrameResampleMode( | |
| 52 VideoFrameResampling resampling_mode) = 0; | |
| 53 | |
| 54 virtual void EnableDenoising(bool enable) = 0; | |
| 55 virtual const VideoFrame* PreprocessFrame(const VideoFrame& frame) = 0; | |
| 56 }; | |
| 57 | |
| 58 } // namespace webrtc | |
| 59 | |
| 60 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ | |
| OLD | NEW |