Skip to content

Instantly share code, notes, and snippets.

@standinga
Created December 14, 2020 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save standinga/6f8e8566c13fa69c65ea8d3aef98cbcd to your computer and use it in GitHub Desktop.
Save standinga/6f8e8566c13fa69c65ea8d3aef98cbcd to your computer and use it in GitHub Desktop.
view displaying CMSampleBuffer frames
import AVFoundation
import UIKit
class AVSampleBufferView: UIView {
var bufferLayer: AVSampleBufferDisplayLayer {
return layer as! AVSampleBufferDisplayLayer
}
override static var layerClass: AnyClass {
return AVSampleBufferDisplayLayer.self
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment