Ejemplo n.º 1
0
        public void AddQueue(QueueItem item)
        {
            if (item.Priority < 1)
            {
                item.Priority = 1;
            }
            if (item.Priority > 5)
            {
                item.Priority = 5;
            }
            int key   = item.Profile.ReqResources[EncodePhase].Canonical();
            var level = queue[item.Priority - 1];

            if (level.ContainsKey(key) == false)
            {
                level[key] = new List <QueueItem>();
            }
            level[key].Add(item);
            WorkerPool.NotifyAddQueue();
        }
Ejemplo n.º 2
0
 public PauseScheduler(EncodeServer server, WorkerPool workerPool)
 {
     this.server     = server;
     this.workerPool = workerPool;
     NotifySettingChanged();
 }