Ejemplo n.º 1
0
 private void ConvertProgressEvent(object sender, MediaToolkit.ConvertProgressEventArgs e)
 {
     pbFileConversion.Invoke(new Action(() =>
     {
         pbFileConversion.Value = (int)(e.ProcessedDuration.TotalMilliseconds / e.TotalDuration.TotalMilliseconds * 100);
     }));
 }
Ejemplo n.º 2
0
        /// -------------------------------------------------------------------------------------------------
        /// <summary>   Raises the convert progress event. </summary>
        /// <param name="e">    Event information to send to registered event handlers. </param>
        private void OnProgressChanged(ConvertProgressEventArgs e)
        {
            EventHandler <ConvertProgressEventArgs> handler = this.ConvertProgressEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 3
0
 /// <summary>   Raises the convert progress event. </summary>
 /// <param name="e">    Event information to send to registered event handlers. </param>
 private void OnProgressChanged(ConvertProgressEventArgs e)
 {
     this.ConvertProgressEvent?.Invoke(this, e);
 }
Ejemplo n.º 4
0
 /// -------------------------------------------------------------------------------------------------
 /// <summary>   Raises the convert progress event. </summary>
 /// <param name="e">    Event information to send to registered event handlers. </param>
 private void OnProgressChanged(ConvertProgressEventArgs e)
 {
     EventHandler<ConvertProgressEventArgs> handler = this.ConvertProgressEvent;
     if (handler != null)
     {
         handler(this, e);
     }
 }
Ejemplo n.º 5
0
        public static void ConvertProgressEvent(object sender, ConvertProgressEventArgs e)
        {
            //Console.WriteLine("\n------------\nConverting...\n------------");
            //Console.WriteLine("Bitrate: {0}", e.Bitrate);
            //Console.WriteLine("Fps: {0}", e.Fps);
            //Console.WriteLine("Frame: {0}", e.Frame);
            //Console.WriteLine("ProcessedDuration: {0}", e.ProcessedDuration);
            //Console.WriteLine("SizeKb: {0}", e.SizeKb);
            //Console.WriteLine("TotalDuration: {0}\n", e.TotalDuration);
            //e.ProcessedDuration
            //bw.ReportProgress(50);

            if (bw.CancellationPending)
                engine.Dispose();
               // System.Windows.MessageBox.Show("");
            //Thread.Sleep(500);
        }