public EncodingProcess() { EncodingOptions = TranscodeOptions.MPEGTS; SegmentOptions = new SegmentationOptions(); GenerateHlsStreamThread = new ThreadStart(GenerateHlsStream); SegmentHlsStreamThread = new ThreadStart(SegmentHlsStream); this.ProcessId = Guid.NewGuid().ToString(); ProcessHistory.Add(this.ProcessId, this); Current = this; }
internal static void EncodingStatusUpdateCallback(string processId, int segmentNumber, double segmentLength) { if (!ProcessHistory.ContainsKey(processId)) { return; } EncodingProcess proc = ProcessHistory[processId]; proc.AmountOfTimeEncodedAndSegmented += segmentLength; if (proc.PropertyChanged != null) { var e = new PropertyChangedEventArgs("PercentageComplete"); proc.PropertyChanged(proc, e); } }