Example #1
0
        private string LoadMedia(string FileName, int scale)
        {
            mediaFileName=FileName;

            if (dxVideo != null)
            {

                dxVideo.DisposeExt();
                dxVideo = null;
            }

            dxVideo = new DXVideoWrapper(mediaFileName);
            dxVideo.SetDisplay(this.display);
            dxVideo.Play();
            dxVideo.Pause();
            playB.Text="Play";

            double scaleFactor = scale;
            scaleFactor/=100;

            int w = dxVideo.GetMediaWidth();
            int h = dxVideo.GetMediaHeight();

            w=(int)(w*scaleFactor);
            h=(int)(h*scaleFactor);

            display.Width=w;
            display.Height=h;
            stillDisplay.Width=display.Width;
            stillDisplay.Height=display.Height;

            videoLoaded=true;
            startFrame=0;
            currentFrame=0;
            mode="playback";
            status="pause";
            timeRepresentation=true;

            MediaLength=dxVideo.GetTotalTime();
            FrameRate=this.getFrameRate(mediaFileName);

            Message("Video loaded and paused...");
            mainTimer.Start();

            contrastCorrection=0;
            brightnessCorrection=0;
            grayscale=false;

            return FileName;
        }
Example #2
0
        private string LoadMedia(string FileName, int resX, int resY)
        {
            mediaFileName=FileName;

            if (dxVideo != null)
            {

                dxVideo.DisposeExt();
                dxVideo = null;
            }

            dxVideo = new DXVideoWrapper(mediaFileName);
            dxVideo.SetDisplay(this.display);
            dxVideo.Play();
            dxVideo.Pause();
            playB.Text="Play";

            display.Width=resX;
            display.Height=resY;
            stillDisplay.Width=display.Width;
            stillDisplay.Height=display.Height;

            videoLoaded=true;
            startFrame=0;
            currentFrame=0;
            mode="playback";
            status="pause";
            timeRepresentation=true;

            MediaLength=dxVideo.GetTotalTime();
            FrameRate=this.getFrameRate(mediaFileName);

            infoDisplayValue.Text="Video loaded and paused...";
            mainTimer.Start();

            contrastCorrection=0;
            brightnessCorrection=0;
            grayscale=false;

            return FileName;
        }