I'm handling ReplayKit2 in iOS, i would like to rotate the CMSampleBuffer to landscape (It always portrait). Could you please advice me a way to do that ?
Here is my code
override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
switch sampleBufferType {
case RPSampleBufferType.video:
// Handle video sample buffer
session.pushVideoBuffer(sampleBuffer)
break
case RPSampleBufferType.audioApp:
// Handle audio sample buffer for app audio
//session.pushAudioBuffer(sampleBuffer)
break
case RPSampleBufferType.audioMic:
// Handle audio sample buffer for mic audio
session.pushAudioBuffer(sampleBuffer)
break
@unknown default:
// Handle other sample buffer types
fatalError("Unknown type of sample buffer")
}
}