Exemplo n.º 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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        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());
            }
        }