private static void Upload(string name, IList<string> args) { if (args.Count < 3) { MediaUpload.Help(); throw new SwitcherLibException("Invalid arguments"); } Switcher switcher = new Switcher(args[0]); int slot = MediaUpload.GetSlot(args[1]); Log.Debug(String.Format("Switcher: {0}", switcher.GetProductName())); Log.Debug(String.Format("Resolution: {0}x{1}", switcher.GetVideoWidth().ToString(), switcher.GetVideoHeight().ToString())); args.RemoveAt(0); args.RemoveAt(0); string filename = String.Join(" ", args); Upload upload = new Upload(switcher, filename, slot); if (name != "") { upload.SetName(name); } upload.Start(); while (upload.InProgress()) { Log.Info(String.Format("Progress: {0}%", upload.GetProgress().ToString())); Thread.Sleep(100); } }
public StillsMonitor(Upload upload) { this.upload = upload; }