private void cleanup() { if (this.clip != null) { ((IDisposable)this.clip).Dispose(); this.clip = null; } if (this.enviroment != null) { ((IDisposable)this.enviroment).Dispose(); this.enviroment = null; } GC.SuppressFinalize(this); }
// Methods private AvsFile(string script, bool parse) { try { this.enviroment = new AviSynthScriptEnvironment(); this.clip = parse ? this.enviroment.ParseScript(script, AviSynthColorspace.RGB24) : this.enviroment.OpenScriptFile(script, AviSynthColorspace.RGB24); videoWidth = (ulong)this.clip.VideoWidth; videoHeight = (ulong)this.clip.VideoHeight; } catch (Exception) { this.cleanup(); throw; } }
// Methods public AvsVideoReader(AviSynthClip clip, int width, int height) { this.clip = clip; this.width = width; this.height = height; }
// Methods public AvsAudioReader(AviSynthClip clip) { this.clip = clip; }