// start record /* * public void StartRecord(string fname, int frate, int width, int height) * { * if (writer != null) * { * writer.Dispose(); * writer = null; * } * * writer = new AVIWriter(); * writer.Open(fname, frate, width, height); * } */ // start record public void StartRecord(string codec, string fname, int frate, int width, int height) { if (writer != null) { writer.Dispose(); writer = null; } writer = new AVIWriter(codec); writer.Open(fname, frate, width, height); }
// start record /* public void StartRecord(string fname, int frate, int width, int height) { if (writer != null) { writer.Dispose(); writer = null; } writer = new AVIWriter(); writer.Open(fname, frate, width, height); } */ // start record public void StartRecord(string codec, string fname, int frate, int width, int height) { if (writer != null) { writer.Dispose(); writer = null; } writer = new AVIWriter(codec); writer.Open(fname, frate, width, height); }
public void StartConvert() { // begin read file reader.Open(fileFrom); // begin write file writer.Open(fileTo, (int)reader.FrameRate, reader.Width, reader.Height); while (reader.CurrentPosition < reader.Length) { writer.AddFrame(reader.GetNextFrame()); } }