상속: INotifyPropertyChanged
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
            }
        }