TuSDKFilterProcessorBase Class Reference

Inherits from SLGPUImageOutput : NSObject
Declared in TuSDKFilterProcessorBase.h

Overview

A GPU Output that provides frames from external source

Other Methods

  isOriginalOrientation

传入图像的方向是否为原始朝向,SDK 将依据该属性来调整人脸检测时图片的角度。如果没有对图片进行旋转,则为 YES

@property (nonatomic, readonly) BOOL isOriginalOrientation

Declared In

TuSDKFilterProcessorBase.h

  runBenchmark

This enables the benchmarking mode, which logs out instantaneous and average frame times to the console

@property (readwrite, nonatomic) BOOL runBenchmark

Declared In

TuSDKFilterProcessorBase.h

  outputImageOrientation

This determines the rotation applied to the output image, based on the source material

@property (readwrite, nonatomic) UIInterfaceOrientation outputImageOrientation

Declared In

TuSDKFilterProcessorBase.h

  horizontallyMirrorRearFacingCamera

These properties determine whether or not the two camera orientations should be mirrored. By default, both are NO.

@property (readwrite, nonatomic) BOOL horizontallyMirrorFrontFacingCamera , horizontallyMirrorRearFacingCamera

Declared In

TuSDKFilterProcessorBase.h

  canvasColor

画布背景色

@property (nonatomic) UIColor *canvasColor

Availability

3.0.8

Declared In

TuSDKFilterProcessorBase.h

  outputRotation

设置输出方向

@property (nonatomic) LSQGPUImageRotationMode outputRotation

Declared In

TuSDKFilterProcessorBase.h

  internalRotation

自定义输入方向

@property (nonatomic) LSQGPUImageRotationMode internalRotation

Availability

3.0.8

Declared In

TuSDKFilterProcessorBase.h

  inputSize

输入的视频宽高

@property (nonatomic, readonly) CGSize inputSize

Availability

3.0.8

Declared In

TuSDKFilterProcessorBase.h

  outputSize

输出宽高

@property (nonatomic) CGSize outputSize

Availability

3.0.8

Declared In

TuSDKFilterProcessorBase.h

  aspectOutputRatioInSideCanvas

输出比例与原视频比例不一致时是否自适应画布大小

@property (nonatomic) BOOL aspectOutputRatioInSideCanvas

Declared In

TuSDKFilterProcessorBase.h

– initWithFormatType:isOriginalOrientation:

初始化

- (id)initWithFormatType:(OSType)pixelFormatType isOriginalOrientation:(BOOL)isOriginalOrientation

Parameters

pixelFormatType

原始采样的pixelFormat Type

isOriginalOrientation

传入图像的方向是否为原始朝向,SDK 将依据该属性来调整人脸检测时图片的角度。如果没有对图片进行旋转,则为 YES

Return Value

instance

Discussion

支持: kCVPixelFormatType_420YpCbCr8BiPlanarFullRange | kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange kCVPixelFormatType_32BGRA

Declared In

TuSDKFilterProcessorBase.h

– initWithSharegroup:

初始化 处理textureID时使用此方法初始化

- (id)initWithSharegroup:(EAGLSharegroup *)sharegroup

Parameters

sharegroup

共享组

Return Value

instance

Declared In

TuSDKFilterProcessorBase.h

– initWithVideoDataOutput:

初始化

- (id)initWithVideoDataOutput:(AVCaptureVideoDataOutput *)videoOutput

Parameters

videoOutput

视频源

Return Value

instance

Declared In

TuSDKFilterProcessorBase.h

– processVideoSampleBuffer:

Process a video sample

- (void)processVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer

Parameters

sampleBuffer

sampleBuffer Buffer to process

Declared In

TuSDKFilterProcessorBase.h

– processPixelBuffer:frameTime:

Process a pixelBuffer

- (void)processPixelBuffer:(CVPixelBufferRef)cameraFrame frameTime:(CMTime)currentTime

Parameters

cameraFrame

pixelBuffer to process

Declared In

TuSDKFilterProcessorBase.h

– processTexture:textureSize:

Process a pixelBuffer

- (void)processTexture:(GLuint)texture textureSize:(CGSize)size

Parameters

texture

textureID to process

Declared In

TuSDKFilterProcessorBase.h

Benchmarking

– averageFrameDurationDuringCapture

When benchmarking is enabled, this will keep a running average of the time from uploading, processing, and final recording or display

- (CGFloat)averageFrameDurationDuringCapture

Declared In

TuSDKFilterProcessorBase.h

– setOutputSize:aspectOutputRatioInSideCanvas:

设置输出尺寸

- (void)setOutputSize:(CGSize)outputSize aspectOutputRatioInSideCanvas:(BOOL)aspectOutputRatioInSideCanvas

Parameters

outputSize

输出尺寸

aspectOutputRatioInSideCanvas

输出比例与原视频比例不一致时是否自适应画布大小

Declared In

TuSDKFilterProcessorBase.h