コード例 #1
0
        public VideoPlayer(string path, string chartPath, string ChartInfoPath, Chart.videoInfo videoinfo, Chart chart)
        {
            //under current logic, this means that it is a bitmap folder. we will proceed to conver to .cvid
            this._path       = path;
            this._fps        = videoinfo.framerate;
            this._frames     = videoinfo.frames;
            this._startPoint = videoinfo.startPoint;
            this._chart      = chart;
            if (!path.EndsWith(".cvid"))
            {
                ImageUtils.BMPToCVID(path, ChartInfoPath, videoinfo, out this._path, out this._startPoint, out this._frames);
            }



            _timePerFrame = 1 / (double)_fps;
            readStream    = new FileStream(_path, FileMode.Open);
            //ImageUtils.BMPToBinary(path, Path.Combine(Directory.GetCurrentDirectory(), "!Content", "testVid.cvid"));
        }