private void DoSkip() { _VideoSkipTime = _Gap; _SkipTime = _Start + _Gap; _BeforeLoop = false; if (_SkipTime > 0) { _VideoDecoderTime = _SkipTime; try { CAcinerella.ac_seek(_videodecoder, -1, (Int64)(_SkipTime * 1000f)); } catch (Exception e) { CLog.LogError("Error seeking video file \"" + _FileName + "\": " + e.Message); } } else { _VideoDecoderTime = 0f; try { CAcinerella.ac_seek(_videodecoder, -1, (Int64)0); } catch (Exception e) { CLog.LogError("Error seeking video file \"" + _FileName + "\": " + e.Message); } } lock (MutexSyncSignals) { _CurrentVideoTime = _VideoDecoderTime; } lock (MutexFramebuffer) { for (int i = 0; i < _FrameBuffer.Length; i++) { _FrameBuffer[i].displayed = true; _FrameBuffer[i].time = -1f; } } _BufferFull = false; _skip = false; _NewFrame = false; //EventDecode.Set(); }
public override void SetPosition(float Time) { if (!_Initialized && !_FileOpened) { return; } try { CAcinerella.ac_seek(_audiodecoder, 0, (Int64)(Time * 1000f)); } catch (Exception) { CLog.LogError("Error seeking in file: " + _FileName); Close(); } }