private void Initialise(InitCommand command) { if (this.handbrakeInstance == null) { this.handbrakeInstance = new HandBrakeInstance(); } if (this.logHandler == null) { this.logHandler = new LogHandler(command.LogDirectory, command.LogFile, command.EnableDiskLogging); } if (!command.AllowDisconnectedWorker) { ConsoleOutput.WriteLine("Worker: Disconnected worker monitoring enabled!", ConsoleColor.White, true); this.instanceWatcher = new InstanceWatcher(this); this.instanceWatcher.Start(5000); } this.completedState = null; this.handbrakeInstance.Initialize(command.LogVerbosity, !command.EnableHardwareAcceleration); this.handbrakeInstance.EncodeCompleted += this.HandbrakeInstance_EncodeCompleted; if (command.EnableLibDvdNav) { HandBrakeUtils.SetDvdNav(true); } }
private void Initialise(InitCommand command) { if (this.handbrakeInstance == null) { this.handbrakeInstance = new HandBrakeInstance(); } if (this.logHandler == null) { this.logHandler = new LogHandler(command.LogDirectory, command.LogFile, command.EnableDiskLogging); } if (!command.AllowDisconnectedWorker) { this.instanceWatcher = new InstanceWatcher(this); this.instanceWatcher.Start(5000); } this.handbrakeInstance.Initialize(command.LogVerbosity, command.EnableHardwareAcceleration); this.handbrakeInstance.EncodeCompleted += this.HandbrakeInstance_EncodeCompleted; if (command.DisableLibDvdNav) { HandBrakeUtils.SetDvdNav(true); // TODO check this is correct } }
public static void StopWatcher() { InstanceWatcher.Dispose(); }