Esempio n. 1
0
 private FramesGrabber(StorageFile currentStorageFile, VideoPropsViewModel videoPropsViewModel, double perc, TimeSpan start, TimeSpan end)
 {
     //we can do this in InitAsync, but loosing readonly modifiers...
     file = currentStorageFile;
     this.videoPropsViewModel = videoPropsViewModel;
     this.start             = start;
     this.end               = end;
     framesCount            = (int)Math.Round(RangeDuration.TotalSeconds * videoPropsViewModel.FrameRate);
     percentageOfResolution = perc;
 }
Esempio n. 2
0
        //ctors
        public static async Task <FramesGrabber> CtorAsync(StorageFile currentStorageFile, VideoPropsViewModel videoPropsViewModel, double perc, TimeSpan start, TimeSpan end)
        {
            //how to make ctor async: https://stackoverflow.com/questions/8145479/can-constructors-be-async
            var thisObj = new FramesGrabber(currentStorageFile, videoPropsViewModel, perc, start, end);
            await thisObj.InitAsync();

            return(thisObj);
        }