avfvideosrc: external session
Submitted by Ilya Konstantinov
I've implemented a 'session' property which allows both:
- getting the internal AVCaptureSession used by avfvideosrc
- giving avfvideosrc an external (already inited) AVCaptureSession; in such case, it avoids configuration, startRunning and stopRunning, assuming it'll be done externally
See my commit (which I'm dogfooding on iOS and OS X for the past 2 months):
It's useful for attaching additional AVCaptureOutputs to the session, externally to GStreamer.
One thing it's essential for, is to use AVCaptureVideoPreviewLayer, which is a high performance video primitive on OS X and iOS which can display a preview of the video input. It's a standard UI element, whose composition is performed by the system (out of process) and has better performance than any other option.
An alternative to support AVVideoCapturePreviewLayer specifically, which could be also nice, is to add a "preview-layer" property, accepting an AVVideoCapturePreviewLayer whose 'session' property will be set once we initialize the session.