public string Capture() { process.StartInfo.Arguments = RaspistillParam.ToString(); Logger?.BeginInvoke(process.StartInfo.Arguments, null, null); process.Start(); using (var sr = process.StandardOutput) { while (!sr.EndOfStream) { _outputString.AppendLine(sr.ReadLine()); } } return(RaspistillParam.Output); }
public Camera() { if (Environment.OSVersion.Platform != PlatformID.Unix) { throw new NotSupportedException($"不支持此{Environment.OSVersion.Platform}平台"); } info = new ProcessStartInfo("ipconfig") { RedirectStandardOutput = true, UseShellExecute = false }; RaspistillParam = new RaspistillParam() { Output = "image.jpg" }; process = new Process(); _outputString = new StringBuilder(); process.StartInfo = info; }
public Camera(RaspistillParam _RaspistillParam) : this() { RaspistillParam = _RaspistillParam; }