以下の内容はhttps://fromatom.hatenablog.com/entry/2019/10/28/164818より取得しました。


RPBroadcastSampleHandlerで得られるCMSampleBufferのorientationを取得する

コード

override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
    if let orientationAttachment = CMGetAttachment(sampleBuffer, key: RPVideoSampleOrientationKey as CFString, attachmentModeOut: nil) as? NSNumber {
        if let orientation = CGImagePropertyOrientation(rawValue: orientationAttachment.uint32Value) {
                // orientationを使った処理
        }
    }
}

補足情報




以上の内容はhttps://fromatom.hatenablog.com/entry/2019/10/28/164818より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14