Beispiel #1
0
 public void Release()
 {
     OnStart     =
         OnFrame = null;
     core.Call("release");
     if (preview != null)
     {
         MonoBehaviour.Destroy(preview);
     }
     preview = null;
     if (dispatch != null)
     {
         dispatch.Release();
     }
     dispatch = null;
 }
Beispiel #2
0
 private void SetDetection(bool state)
 {
     if (state)
     {
         OnFrame         -= MetadataUpdate;
         OnFrame         += MetadataUpdate;
         metadataDispatch = metadataDispatch ?? new ConcurrentDispatch();
     }
     else
     {
         OnFrame   -= MetadataUpdate;
         OnMetadata = null;
         if (metadataDispatch != null)
         {
             metadataDispatch.Release();
         }
         metadataDispatch = null;
     }
 }
Beispiel #3
0
 public void Release()
 {
     if (!preview)
     {
         return;
     }
     OnStart     =
         OnFrame = null;
     #if NATCAM_PRO || NATCAM_PROFESSIONAL
     ReleaseBuffer();
     #endif
     preview.Stop();
     MonoBehaviour.Destroy(preview);
     preview     = null;
     photoBuffer = null;
     dispatch.Release();
     dispatch = null;
     camera   = -1;
 }
Beispiel #4
0
 public void Release()
 {
     if (!preview)
     {
         return;
     }
     OnStart     =
         OnFrame = null;
     #if NATCAM_EXTENDED
     SetDetection(false);
     OnMetadata = null;
     #endif
     #if NATCAM_PROFESSIONAL
     ReleasePreviewBuffer();
     #endif
     preview.Stop();
     MonoBehaviour.Destroy(preview);
     preview = null;
     dispatch.Release();
     dispatch = null;
     camera   = -1;
 }