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