Example #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);
        }
Example #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);
            }
        }
Example #3
0
 public bool GetFrame(CVideoStream stream, float time)
 {
     return(CVideo.GetFrame(stream, time));
 }