示例#1
0
    void OpenCamera(int orientation, int currDevice)
    {
#if UNITY_ANDROID
        if (device == currDevice && AppStarted)
        {
            return;
        }
        this.androidCameraActivity.Call("closeCamera");
        ImWidth  = 320;
        ImHeight = 240;

        this.androidCameraActivity.Call("GrabFromCamera", ImWidth, ImHeight, currDevice);
        AppStarted = true;
#else
        VisageTrackerNative._openCamera(orientation, currDevice);
#endif
    }
示例#2
0
 // if width and height are -1, values will be set internally
 void OpenCamera(int orientation, int currDevice, int width, int height, int mirrored)
 {
             #if UNITY_ANDROID
     if (device == currDevice && AppStarted)
     {
         return;
     }
     //camera needs to be opened on main thread
     this.androidCameraActivity.Call("runOnUiThread", new AndroidJavaRunnable(() => {
         this.androidCameraActivity.Call("closeCamera");
         this.androidCameraActivity.Call("GrabFromCamera", width, height, currDevice);
     }));
     AppStarted = true;
             #else
     VisageTrackerNative._openCamera(orientation, currDevice, width, height, mirrored);
             #endif
 }
示例#3
0
 // if width and height are -1, values will be set internally
 void OpenCamera(int orientation, int currDevice, int width, int height, int mirrored)
 {
     VisageTrackerNative._openCamera(orientation, currDevice, width, height, mirrored);
 }