Esempio n. 1
0
        public static MLMRCameraVideoSource CreateLocal(MLMRCamera.InputContext context, out MLResult result, string trackId = "")
        {
            MLMRCameraVideoSource mlMRCameraVideoSource = new MLMRCameraVideoSource(context, trackId);

#if PLATFORM_LUMIN
            result = MLWebRTC.AppDefinedVideoSource.InitializeLocal(mlMRCameraVideoSource);
            MLMRCamera.OnFrameCapture_NativeCallbackThread += mlMRCameraVideoSource.OnMLMRCameraFrameRGB;
            MLMRCamera.OnCaptureComplete += mlMRCameraVideoSource.OnCaptureCompleted;
#endif
            mlMRCameraVideoSource.StartCapture();

            return(mlMRCameraVideoSource);
        }
Esempio n. 2
0
 private MLMRCameraVideoSource(MLMRCamera.InputContext context, string trackId)
     : base(trackId)
 {
     this.inputContext = context;
 }