示例#1
0
        // 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);
        }
示例#2
0
        // virtual dispose
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (reader != null)
                {
                    reader.Close();
                    reader.Dispose();
                    reader = null;
                }

                if (writer != null)
                {
                    writer.Close();
                    writer.Dispose();
                    writer = null;
                }
            }
        }