// Constructor public VsRawEncoder(long syncTimer) : base(syncTimer) { timeMaxLength = 0; this.syncTimer = syncTimer; // // timer defines the time interval between two motions. // this.stimer = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.stimer)).BeginInit(); this.stimer.Interval = 1000; this.stimer.Elapsed += new System.Timers.ElapsedEventHandler(this.process_MaxlengthStop); ((System.ComponentModel.ISupportInitialize)(this.stimer)).EndInit(); this.stimer.Start(); // convertor vsConvert = new VsEncodeConverter(); vsConvert.Start(); EncodeOut += new VsEncodeEventHandler(vsConvert.FrameIn); }
protected override void Dispose(bool disposing) { // stop timer timer.Stop(); stimer.Stop(); // stop convertor if (vsConvert != null) { vsConvert.Dispose(); vsConvert = null; } // stop encoder if (vsEncoder != null) { vsEncoder.Dispose(); vsEncoder = null; } base.Dispose(true); }
protected override void Dispose(bool disposing) { // stop timer timer.Stop(); stimer.Stop(); // stop convertor if (vsConvert != null) { vsConvert.Dispose(); vsConvert = null; } // stop encoder if (vsEncoder != null) { vsEncoder.Dispose(); vsEncoder = null; } base.Dispose(true); }
// Constructor public VsRawEncoder(long syncTimer):base(syncTimer) { timeMaxLength = 0; this.syncTimer = syncTimer; // // timer defines the time interval between two motions. // this.stimer = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.stimer)).BeginInit(); this.stimer.Interval = 1000; this.stimer.Elapsed += new System.Timers.ElapsedEventHandler(this.process_MaxlengthStop); ((System.ComponentModel.ISupportInitialize)(this.stimer)).EndInit(); this.stimer.Start(); // convertor vsConvert = new VsEncodeConverter(); vsConvert.Start(); EncodeOut += new VsEncodeEventHandler(vsConvert.FrameIn); }