public async Task <ServiceResultModel> CaptureAsync(string fileName, string outPath, string interval) { try { await Task.Run(() => _videoLib.ExtractImage(fileName, outPath, int.Parse(interval))); return(ServiceResultModel.CreateOkResult()); } catch (Exception ex) { Debug.WriteLine(ex.Message); return(ServiceResultModel.CreateErrorResult("Error")); } }
public ServiceResultModel Capture(string fileName, string outPath, string interval) { try { _videoLib.ExtractImage(fileName, outPath, int.Parse(interval)); return(ServiceResultModel.CreateOkResult()); } catch (Exception ex) { Debug.WriteLine(ex.Message); return(ServiceResultModel.CreateErrorResult("Error")); } }