TuSDKRecordVideoCamera Class Reference

Inherits from TuSDKVideoCameraBase : SLGPUImageStillCamera
Declared in TuSDKRecordVideoCamera.h

Overview

视频录制相机 (采集 + 处理 + 录制)

+ initWithSessionPreset:cameraPosition:cameraView:

初始化相机

+ (instancetype)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition cameraView:(UIView *)view

Parameters

sessionPreset

相机分辨率

cameraPosition

相机设备标识 (前置或后置)

view

相机显示容器视图

Return Value

相机对象

Declared In

TuSDKRecordVideoCamera.h

  videoDelegate

相机事件委托

@property (nonatomic, weak) id<TuSDKRecordVideoCameraDelegate> videoDelegate

Declared In

TuSDKRecordVideoCamera.h

  maxRecordingTime

录制视频的总时长. 达到指定时长后,自动停止录制 (默认0,如设置为 0,则需要手动终止)

@property (nonatomic, assign) Float64 maxRecordingTime

Declared In

TuSDKRecordVideoCamera.h

  minRecordingTime

录制视频的最小时长

@property (nonatomic, assign) Float64 minRecordingTime

Declared In

TuSDKRecordVideoCamera.h

  minAvailableSpaceBytes

默认最小可用空间 50M
@property (nonatomic, assign) Float64 minAvailableSpaceBytes

Declared In

TuSDKRecordVideoCamera.h

  saveToAlbum

保存到系统相册 (默认保存, 当设置为NO时, 保存到临时目录)

@property (nonatomic) BOOL saveToAlbum

Declared In

TuSDKRecordVideoCamera.h

  saveToAlbumName

保存到系统相册的相册名称

@property (nonatomic, copy) NSString *saveToAlbumName

Declared In

TuSDKRecordVideoCamera.h

  fileType

录制的视频文件格式(默认:lsqFileTypeQuickTimeMovie)

@property (nonatomic, assign) lsqFileType fileType

Declared In

TuSDKRecordVideoCamera.h

  recordMode

录制模式 默认:lsqRecordModeNormal (lsqRecordModeNormal: 正常模式, lsqRecordModeKeep: 续拍模式,支持断点续拍)

@property (nonatomic, assign) lsqRecordMode recordMode

Declared In

TuSDKRecordVideoCamera.h

  speedMode

变速模式 默认:lsqSpeedMode_Normal (标准模式)

@property (nonatomic, assign) lsqSpeedMode speedMode

Declared In

TuSDKRecordVideoCamera.h

  soundPitch

设置音频变声器类型 默认:lsqSoundPitchNormal

@property (nonatomic, assign) lsqSoundPitch soundPitch

Availability

v3.0.1

Declared In

TuSDKRecordVideoCamera.h

  videoCameraStatue

相机当前状态

@property (nonatomic, assign) lsqRecordState videoCameraStatue

Declared In

TuSDKRecordVideoCamera.h

  videoQuality

输出视频的画质,主要包含码率、压缩级别等参数 (默认为空,采用系统设置)

@property (nonatomic, strong) TuSDKVideoQuality *videoQuality

Declared In

TuSDKRecordVideoCamera.h

  canChangeRatio

验证当前相机状态是否可以切换比例

@property (nonatomic, readonly) BOOL canChangeRatio

Availability

2.2.0

Declared In

TuSDKRecordVideoCamera.h

– startRecording

开始视频录制

- (void)startRecording

Declared In

TuSDKRecordVideoCamera.h

– finishRecording

完成视频录制 返回录制结果

- (void)finishRecording

Declared In

TuSDKRecordVideoCamera.h

– cancelRecording

终止录制

- (void)cancelRecording

Declared In

TuSDKRecordVideoCamera.h

– isRecording

是否正在录制

- (BOOL)isRecording

Return Value

BOOL YES 正在录制

Declared In

TuSDKRecordVideoCamera.h

– pauseRecording

暂停视频录制

- (void)pauseRecording

Declared In

TuSDKRecordVideoCamera.h

– movieFragmentSize

已录制的视频片段数量

- (NSUInteger)movieFragmentSize

Return Value

NSUInteger

Declared In

TuSDKRecordVideoCamera.h

– popMovieFragment

删除最后一个视频片段

- (TuSDKTimeRange *)popMovieFragment

Return Value

TuSDKTimeRange

Declared In

TuSDKRecordVideoCamera.h

– lastMovieFragment

获取最后一个视频片段

- (TuSDKTimeRange *)lastMovieFragment

Return Value

TuSDKTimeRange

Declared In

TuSDKRecordVideoCamera.h