-
Notifications
You must be signed in to change notification settings - Fork 271
dataforuser
pengbin edited this page Oct 12, 2017
·
12 revisions
- 原始视频数据回调,是直接将KSYAVFCapture类的回调数据转发出来的。
_kit.videoProcessingCallback = ^(CMSampleBufferRef sampleBuffer){
processVideo(sampleBuffer);//de
};
kit component数据传递流程:KSYAVFCapture -> KSYGUPFilter -> KSYGUPView(显示)
|
_kit.videoProcessingCallback(CMSampleBufferRef sampleBuffer) = ^{//原始数据处理:美颜/特效...};
- 美颜后的视频数据回调
_kit.picOutput.videoProcessingCallback = ^(CVPixelBufferRef pixelBuffer, CMTime timeInfo ){
processVideo(pixelBuffer,timeInfo);
_kit.KSYStreamerBase(pixelBuffer,timeInfo);
};
kit component数据传递流程:_kit.KSYAVFCapture -> _kit.KSYGUPFilter ->_kit.KSYGUPView(显示)
|
_kit.KSYGPUPicOutput
|
_kit.picOutput.videoProcessingCallback(CVPixelBufferRef pixelBuffer, CMTime timeInfo )= ^{};
|
_kit.KSYStreamerBase(rtmp推流)
- 原始音频数据回调,是直接将KSYAUAudioCapture类的回调数据转发出来的。
_kit.audioProcessingCallback = ^(CMSampleBufferRef sampleBuffer){
processVideo(sampleBuffer);
};
kit component数据传递流程:_kit.KSYAUAudioCapture
|
_kit.audioProcessingCallback(CMSampleBufferRef sampleBuffer) = ^{//原始数据处理:混音/特效...};
- 处理(混音)后的音频数据回调
_kit.audioMixer.videoProcessingCallback = ^(CMSampleBufferRef sampleBuffer){
processVideo(sampleBuffer);
};
kit component数据传递流程:
_kit.KSYMoviePlayer ->
_kit.KSYAUAudioCapture ->
_kit.KSYBgmPlayer -> _kit.KSYMixer -> _kit.audioProcessingCallback(CMSampleBufferRef sampleBuffer) = ^{};
注意: 请尽量限制回调函数的处理时间,太长会导致卡顿。