Beispiel #1
0
    // Chooses a video mode out of the list of modes.
    public bool SelectVideoMode(CameraDeviceMode mode)
    {
        if (cameraDeviceSelectVideoMode((int)mode) == 0)
        {
            return(false);
        }

        return(true);
    }
    // Chooses a video mode out of the list of modes.
    // This function can be only called after the camera device has been
    // initialized but not started yet. Once you have started the camera and
    // you need the select another video mode, you need to Stop(), Deinit(),
    // then Init() the camera before calling SelectVideoMode() again.
    public override bool SelectVideoMode(CameraDeviceMode mode)
    {
        if (QCARWrapper.Instance.CameraDeviceSelectVideoMode((int)mode) == 0)
        {
            return(false);
        }

        return(true);
    }
Beispiel #3
0
    // Get the video mode data that matches the given CameraDeviceMode.
    public VideoModeData GetVideoMode(CameraDeviceMode mode)
    {
        IntPtr videoModePtr = Marshal.AllocHGlobal(
            Marshal.SizeOf(typeof(VideoModeData)));

        cameraDeviceGetVideoMode((int)mode, videoModePtr);
        VideoModeData videoMode = (VideoModeData)Marshal.PtrToStructure
                                      (videoModePtr, typeof(VideoModeData));

        Marshal.FreeHGlobal(videoModePtr);

        return(videoMode);
    }
    // Get the video mode data that matches the given CameraDeviceMode.
    public override VideoModeData GetVideoMode(CameraDeviceMode mode)
    {
        if (QCARRuntimeUtilities.IsPlayMode())
        {
            return(WebCam.GetVideoMode());
        }

        else
        {
            IntPtr videoModePtr = Marshal.AllocHGlobal(
                Marshal.SizeOf(typeof(VideoModeData)));
            QCARWrapper.Instance.CameraDeviceGetVideoMode((int)mode, videoModePtr);
            VideoModeData videoMode = (VideoModeData)Marshal.PtrToStructure
                                          (videoModePtr, typeof(VideoModeData));
            Marshal.FreeHGlobal(videoModePtr);

            return(videoMode);
        }
    }
    // Chooses a video mode out of the list of modes.
    // This function can be only called after the camera device has been
    // initialized but not started yet. Once you have started the camera and
    // you need the select another video mode, you need to Stop(), Deinit(),
    // then Init() the camera before calling SelectVideoMode() again.
    public override bool SelectVideoMode(CameraDeviceMode mode)
    {
        if (QCARWrapper.Instance.CameraDeviceSelectVideoMode((int)mode) == 0)
        {
            return false;
        }

        return true;
    }
    // Get the video mode data that matches the given CameraDeviceMode.
    public override VideoModeData GetVideoMode(CameraDeviceMode mode)
    {
        if (QCARRuntimeUtilities.IsPlayMode())
            return WebCam.GetVideoMode();

        else
        {
            IntPtr videoModePtr = Marshal.AllocHGlobal(
                Marshal.SizeOf(typeof (VideoModeData)));
            QCARWrapper.Instance.CameraDeviceGetVideoMode((int)mode, videoModePtr);
            VideoModeData videoMode = (VideoModeData) Marshal.PtrToStructure
                                                          (videoModePtr, typeof (VideoModeData));
            Marshal.FreeHGlobal(videoModePtr);

            return videoMode;
        }
    }
Beispiel #7
0
 /// <summary>
 /// Chooses a video mode out of the list of modes.
 /// This function can be only called after the camera device has been
 /// initialized but not started yet. Once you have started the camera and
 /// you need the select another video mode, you need to Stop(), Deinit(),
 /// then Init() the camera before calling SelectVideoMode() again.
 /// </summary>
 public abstract bool SelectVideoMode(CameraDeviceMode mode);
Beispiel #8
0
 /// <summary>
 ///  Get the video mode data that matches the given CameraDeviceMode.
 /// </summary>
 public abstract VideoModeData GetVideoMode(CameraDeviceMode mode);
Beispiel #9
0
    // Chooses a video mode out of the list of modes.
    public bool SelectVideoMode(CameraDeviceMode mode)
    {
        if (cameraDeviceSelectVideoMode((int) mode) == 0)
        {
            return false;
        }

        return true;
    }
Beispiel #10
0
    // Get the video mode data that matches the given CameraDeviceMode.
    public VideoModeData GetVideoMode(CameraDeviceMode mode)
    {
        IntPtr videoModePtr = Marshal.AllocHGlobal(
                            Marshal.SizeOf(typeof(VideoModeData)));
        cameraDeviceGetVideoMode((int) mode, videoModePtr);
        VideoModeData videoMode = (VideoModeData) Marshal.PtrToStructure
                            (videoModePtr, typeof(VideoModeData));
        Marshal.FreeHGlobal(videoModePtr);

        return videoMode;
    }
Beispiel #11
0
 /// <summary>
 /// Chooses a video mode out of the list of modes.
 /// This function can be only called after the camera device has been
 /// initialized but not started yet. Once you have started the camera and
 /// you need the select another video mode, you need to Stop(), Deinit(),
 /// then Init() the camera before calling SelectVideoMode() again.
 /// </summary>
 public abstract bool SelectVideoMode(CameraDeviceMode mode);
Beispiel #12
0
 /// <summary>
 ///  Get the video mode data that matches the given CameraDeviceMode.
 /// </summary>
 public abstract VideoModeData GetVideoMode(CameraDeviceMode mode);