TuSDKMediaMovieAssetExportSession Class Reference
Inherits from | NSObject |
---|---|
Conforms to | TuSDKMediaAssetExportSession |
Declared in | TuSDKMediaMovieAssetExportSession.h |
Other Methods
– initWithInputAsset:videoDecodeOutputSettings:audioDecodeOutputSettings:exportOutputSettings:
初始化视频导出会话
- (instancetype _Nullable)initWithInputAsset:(AVAsset *_Nonnull)inputAsset videoDecodeOutputSettings:(TuSDKMediaDecoderOutputSettings *_Nullable)videoDecodeOutputSettings audioDecodeOutputSettings:(TuSDKMediaDecoderOutputSettings *_Nullable)audioDecodeOutputSettings exportOutputSettings:(nullable TuSDKMediaMovieAssetExportSessionSettings *)exportEncodeOutputSettings
Parameters
inputAsset |
输入的视频资源 |
---|---|
exportEncodeOutputSettings |
输出设置 |
Return Value
TuSDKMediaAVAssetExportSession
Declared In
TuSDKMediaMovieAssetExportSession.h
inputAsset
输出的资产
@property (nonatomic, readonly) AVAsset *inputAsset
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
inputAssetInfo
获取视频信息,视频加载完成后可用
@property (nonatomic, readonly) TuSDKMediaAssetInfo *inputAssetInfo
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
videoTrackExtractor
视频数据分离器
@property (nonatomic, readonly) __kindof id<TuSDKMediaExtractor> _Nullable videoTrackExtractor
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
audioTrackExtractor
音频数据分离器
@property (nonatomic, readonly) __kindof id<TuSDKMediaExtractor> _Nullable audioTrackExtractor
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
videoDecodeOutputSettings
视频解码输出配置
@property (nonatomic, readonly) TuSDKMediaDecoderOutputSettings *videoDecodeOutputSettings
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
audioDecodeOutputSettings
音频解码输出配置
@property (nonatomic, readonly) TuSDKMediaDecoderOutputSettings *audioDecodeOutputSettings
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
status
当前状态
@property (nonatomic, readonly) TuSDKMediaExportSessionStatus status
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
outputRotation
设置视频输出的画面方向
@property (nonatomic) LSQGPUImageRotationMode outputRotation
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
outputURL
设置视频输出的地址
@property (nonatomic, strong) NSURL *outputURL
Availability
v3.4.2
Declared In
TuSDKMediaMovieAssetExportSession.h
– canExportAssetSound
验证是否可以输出视频原音
- (BOOL)canExportAssetSound
Return Value
true/false
Availability
3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– exportSessionDidResult:error:
导出完成
- (void)exportSessionDidResult:(NSURL *_Nullable)fileURL error:(NSError *_Nullable)error
Parameters
fileURL |
输出的文件路径 |
---|---|
error |
错误信息 |
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– notifyStatus:
通知当前Session状态
- (void)notifyStatus:(TuSDKMediaExportSessionStatus)status
Parameters
status |
状态 |
---|
Declared In
TuSDKMediaMovieAssetExportSession.h
Processing Methods
– inputRotation
输入的画面方向
- (LSQGPUImageRotationMode)inputRotation
Availability
3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– inputPixelFormatType
输入的采样数据类型 支持: kCVPixelFormatType_420YpCbCr8BiPlanarFullRange | kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange kCVPixelFormatType_32BGRA
- (OSType)inputPixelFormatType
Availability
3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– processVideoSampleBuffer:
处理分离的视频数据 默认:直接将数据写入到文件中 将会调用 writeVideoSampleBuffer 方法
- (void)processVideoSampleBuffer:(CMSampleBufferRef _Nullable)sampleBufferRef
Parameters
sampleBufferRef |
视频数据 |
---|
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– processVideoPixelBuffer:outputTime:
处理分离的视频数据 默认:直接将数据写入到文件中 将会调用 writeVideoSampleBuffer 方法
- (void)processVideoPixelBuffer:(CVPixelBufferRef _Nullable)pixelBufferRef outputTime:(CMTime)outputTime
Parameters
pixelBufferRef |
视频数据 |
---|---|
outputTime |
输出时间 |
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– processAudioSampleBuffer:
处理分离的音频数据 默认:直接将数据写入到文件中,将会调用 writeAudioSampleBuffer 方法
- (void)processAudioSampleBuffer:(CMSampleBufferRef _Nullable)sampleBufferRef
Parameters
sampleBufferRef |
音频数据 |
---|
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– writeVideoSampleBuffer:outputTime:
写入视频数据到文件中
- (void)writeVideoSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBufferRef outputTime:(CMTime)outputTime
Parameters
sampleBufferRef |
视频数据 |
---|---|
outputTime |
输出时间 |
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h
– writeAudioSampleBuffer:
写入视频数据到文件中
- (void)writeAudioSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBufferRef
Parameters
sampleBufferRef |
音频数据 |
---|
Availability
v3.0
Declared In
TuSDKMediaMovieAssetExportSession.h