CameraEnhancerListener
The protocol to handle callback when previewed frame callback is returned.
@protocol CameraEnhancerListener <NSObject>
Method | Type | Description |
---|---|---|
onPreviewOriginalFrame |
required | The previewed original frame callback. |
onPreviewFilterFrame |
optional | The previewed filtered frame callback. |
onPreviewFastFrame |
optional | The previewed cropped frame callback. |
onPreviewOriginalFrame
The previewed original frame callback. Add code to use the original frames.
- (void)onPreviewOriginalFrame:(FramePackage*)frame;
Parameters
Original frames
: The data of original frame(s). The Camera Enhancer can make preprocessing on video frames. In this callback function, the input parameters are the original frames that are captured by the camera.
Code Snippet
- Objective-C
- Swift
[_dce addCameraListener:self]; - (void)onPreviewOriginalFrame:(FramePackage *) frame{ // TODO add your code for original frame }
dce.addTorchListener(self) func onPreviewOriginalFrame(_ frame: FramePackage){ // TODO add your code for original frame }
See also
onPreviewFilterFrame
The previewed filtered frame callback. Add code to use the filtered frames.
- (void)onPreviewFilterFrame:(FramePackage*)frame;
Parameters
Filtered frames
: The data of filtered frame(s). The Camera Enhancer can make preprocessing on video frames. If the frame filter processing is enabled, the input parameter of this function will be the filtered frames.
Code Snippet
- Objective-C
- Swift
[_dce addCameraListener:self]; - (void)onPreviewFilterFrame:(FramePackage *) frame{ // TODO add your code for filter frame }
dce.addTorchListener(self) func onPreviewFilterFrame(_ frame: FramePackage){ // TODO add your code for filter frame }
See also
onPreviewFastFrame
The previewed fast frame callback. Add code to use the cropped frames.
- (void)onPreviewFastFrame:(FramePackage*)frame;
Parameters
Fast frames
: The data of cropped frame(s). The Camera Enhancer can make preprocessing on video frames. If the fast mode is enabled, the input parameter of this function will be the specially cropped frames.
Code Snippet
- Objective-C
- Swift
[_dce addCameraListener:self]; - (void)onPreviewFastFrame:(FramePackage *) frame{ // TODO add your code for fast frame }
dce.addTorchListener(self) func onPreviewFastFrame(_ frame: FramePackage){ // TODO add your code for fast frame }
See also