예제 #1
0
        public void Draw()
        {
            if (!_Loaded)
            {
                return;
            }

            if (!_Finished)
            {
                float videoTime = _VideoTimer.ElapsedMilliseconds / 1000f;
                _Finished = CVideo.Finished(_VideoStream);

                CVideo.GetFrame(_VideoStream, videoTime);
            }
            if (_VideoStream.Texture == null)
            {
                return;
            }

            CDraw.DrawTexture(_VideoStream.Texture, CSettings.RenderRect, EAspect.Crop);
        }
예제 #2
0
        public void PreLoad()
        {
            if (!_Loaded || _VideoStream == null)
            {
                return;
            }
            bool paused = _VideoTimer.IsRunning;

            if (paused)
            {
                CVideo.Resume(_VideoStream);
            }
            float videoTime = 0f;

            while (_VideoStream.Texture == null && videoTime < 1f)
            {
                CVideo.GetFrame(_VideoStream, 0);
                videoTime += 0.05f;
            }
            if (paused)
            {
                CVideo.Pause(_VideoStream);
            }
        }
예제 #3
0
파일: CMain.cs 프로젝트: da-ka/Vocaluxe
 public bool GetFrame(CVideoStream stream, float time)
 {
     return(CVideo.GetFrame(stream, time));
 }