//private Process process = null; public Job(filePathStorage tempQueue) { // 从storage读取num this.num = tempQueue.Count(); this.threadsNum = 1; this.finishedNum = 0; //MessageBox.Show("Get: " + this.num); // 初始化task数组来feed下面的queue this.tasks = new qaacTask[num]; this.PIDs = new int[threadsNum]; this.isfinished = new bool[threadsNum]; this.commonCode = tempQueue.c; for (int i = 0; i < num; i++) { // 从临时队列读取文件路径 string path = tempQueue.get(i); this.tasks[i] = new qaacTask(path); //MessageBox.Show("Get: " + this.tasks[i].filePath); } // 初始化运行池pool this.rp = new runningPool(this.num, this.tasks); // 运行池持有队列,需传递队列的相关参数 // 初始化运行状态窗口 this.rsForm = new RunningStatusForm(); }
//private Process process = null; public Job(filePathStorage tempQueue) { // 从storage读取num this.num = tempQueue.Count(); this.threadsNum = 1; this.finishedNum = 0; encoding = false; audioProcessing = false; muxing = false; // 初始化task数组来feed下面的queue this.tasks = new videoTask[num]; this.PIDs = new int[threadsNum]; this.subTaskPID = Int32.MaxValue; this.isfinished = new bool[threadsNum]; reportCount = 0; checkPattern = 80; int cpx2 = checkPattern + checkPattern; checkTime = new int[cpx2]; checkFrame = new int[cpx2]; this.fps = new double[cpx2]; for (int i = 0; i < cpx2; i++) { this.fps[i] = 0; } for (int i = 0; i < num; i++) { this.tasks[i] = tempQueue.get(i); } // 初始化运行池pool this.rp = new runningPool(this.num, this.tasks); // 运行池持有队列,需传递队列的相关参数 // 初始化运行状态窗口 this.rsForm = new RunningStatusForm(); log = new StringBuilder(""); this.rsForm.AbortEvent += saveLog2File; this.rsForm.ClosingEvent += AllThreadKill; }