TuSDKMediaSampleBufferAssistant Class Reference

Inherits from NSObject
Declared in TuSDKMediaSampleBufferAssistant.h

Overview

CMSampleBufferRef 助手

+ processSampleBuffer:

获取CMSampleBufferRef音频数据地址

+ (int8_t *)processSampleBuffer:(CMSampleBufferRef)buffer

Parameters

buffer

原始数据buffer

Return Value

数据地址

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ createAudioSample:length:timing:audioStreamBasicDescription:

重新封包生成CMSampleBufferRef

+ (CMSampleBufferRef)createAudioSample:(int8_t *)audioData length:(UInt32)len timing:(CMSampleTimingInfo)timing audioStreamBasicDescription:(AudioStreamBasicDescription)asbd

Parameters

audioData

音频数据地址

len

音频数据长度

timing

音频数据时间信息

asbd

音频数据格式描述信息

Return Value

音频数据

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ createAudioSample:length:time:audioStreamBasicDescription:

重新封包生成CMSampleBufferRef

+ (CMSampleBufferRef)createAudioSample:(int8_t *)audioData length:(UInt32)len time:(long long)time audioStreamBasicDescription:(AudioStreamBasicDescription)asbd

Parameters

audioData

音频数据地址

len

音频数据长度

time

音频数据时间

asbd

音频数据格式描述信息

Return Value

音频数据

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ adjustPTS:bySpeed:

重设PTS后获取新的sampleBuffer

+ (CMSampleBufferRef)adjustPTS:(CMSampleBufferRef)sample bySpeed:(CGFloat)speed

Parameters

sample

原始sampleBuffer

speed

变速比率

Return Value

新的sampleBuffer

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ adjustPTS:byOffset:

重设PTS后获取新的sampleBuffer

+ (CMSampleBufferRef)adjustPTS:(CMSampleBufferRef)sample byOffset:(CMTime)offset

Parameters

sample

原始sampleBuffer

offset

时间间隔

Return Value

新的sampleBuffer

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ sampleBufferCreateCopyWithDeep:

深拷贝sampleBuffer

+ (CMSampleBufferRef)sampleBufferCreateCopyWithDeep:(CMSampleBufferRef)sampleBuffer

Parameters

sampleBuffer

CMSampleBufferRef

Return Value

CMSampleBufferRef

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h

+ sampleBufferCreateCopy:

拷贝sampleBuffer

+ (CMSampleBufferRef)sampleBufferCreateCopy:(CMSampleBufferRef)sampleBuffer

Parameters

sampleBuffer

CMSampleBufferRef

Return Value

CMSampleBufferRef

Availability

v3.0

Declared In

TuSDKMediaSampleBufferAssistant.h