Inheritance: INotifyPropertyChanged
コード例 #1
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;
        }
コード例 #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);
            }
        }