Beispiel #1
0
 public static void Decode(Color32[] frame, int width, int height, NatCamDispatch dispatch, BarcodeCallback callback)
 {
     if (callback == null)
     {
         return;
     }
                     #if NATCAM_ZXING_DEPENDENCY
     results = reader.DecodeMultiple(frame, width, height);
     dispatch.Dispatch(() => results.ForEach(result => callback(NatCamBarcode(result))));
                     #endif
 }
Beispiel #2
0
 private static void Render(int request)
 {
     #if UNITY_ANDROID
     if (Dispatch == null)
     {
         return;
     }
     //Dispatch on the main thread
     Dispatch.Dispatch(() => {
         //Invocation
         Ext.LogVerbose("Native requested callback " + request + " on render thread");
         GL.IssuePluginEvent(NatCamNativeCallback(), request);
         //Release
         if (request == 3)
         {
             NatCamDispatch.Release(Dispatch);
             Dispatch = null;
         }
     });
     #endif
 }