예제 #1
0
        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"));
            }
        }
예제 #2
0
        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"));
            }
        }