示例#1
0
    private void on_button_video_watch_clicked(object o, EventArgs args)
    {
        if (File.Exists(videoFileName))
        {
            LogB.Information("Exists and clicked " + videoFileName);

            /*
             * using mplayer
             *
             * Webcam webcam = new WebcamMplayer ();
             * Webcam.Result result = webcam.PlayFile(videoFileName);
             */

            //using ffmpeg
            Webcam        webcam = new WebcamFfmpeg(Webcam.Action.PLAYFILE, UtilAll.GetOSEnum(), "", "", "");
            Webcam.Result result = webcam.PlayFile(videoFileName);
        }
    }
示例#2
0
    private Webcam.Result recordPrepareDo(ref Webcam w, string videoDevice, string videoDeviceResolution, string videoDeviceFramerate)
    {
        if (videoDevice == "")
        {
            new DialogMessage(Constants.MessageTypes.WARNING, "Video device is not configured. Check Preferences / Multimedia.");
            return(new Webcam.Result(false, ""));
        }

        //w = new Webcam(preferences.videoDevice);
        LogB.Information("wRS at gui chronojump.cs 0, videoDevice: " + videoDevice);

        //w = new WebcamMplayer (videoDevice);
        w = new WebcamFfmpeg(Webcam.Action.CAPTURE, os, videoDevice, videoDeviceResolution, videoDeviceFramerate);
        Webcam.Result result = w.CapturePrepare(Webcam.CaptureTypes.VIDEO);

        LogB.Information("wRS at gui chronojump.cs 1, videoDevice: " + videoDevice);
        return(result);
    }