Beispiel #1
0
        /// <summary>
        ///     <para> ---- </para>
        ///     <para>Establishes whether the data indicates the conversion is complete</para>
        /// </summary>
        /// <param name="data">Event data from the FFmpeg console.</param>
        /// <param name="conversionCompleteEvent">
        ///     <para>If successful, outputs a <see cref="ConversionCompleteEventArgs"/> which is </para>
        ///     <para>generated from the data. </para>
        /// </param>
        internal static bool IsConvertCompleteData(string data, out ConversionCompleteEventArgs conversionCompleteEvent)
        {
            conversionCompleteEvent = null;

            Match matchFrame = Index[Find.ConvertProgressFrame].Match(data);
            Match matchFps = Index[Find.ConvertProgressFps].Match(data);
            Match matchFinished = Index[Find.ConvertProgressFinished].Match(data);
            Match matchTime = Index[Find.ConvertProgressTime].Match(data);
            Match matchBitrate = Index[Find.ConvertProgressBitrate].Match(data);

            if (!matchFrame.Success || !matchFps.Success || !matchFinished.Success || !matchTime.Success ||
                !matchBitrate.Success) return false;

            TimeSpan processedDuration;
            TimeSpan.TryParse(matchTime.Groups[1].Value, out processedDuration);

            long frame = Convert.ToInt64(matchFrame.Groups[1].Value);
            double fps = Convert.ToDouble(matchFps.Groups[1].Value);
            int sizeKb = Convert.ToInt32(matchFinished.Groups[1].Value);
            double bitrate = Convert.ToDouble(matchBitrate.Groups[1].Value);

            conversionCompleteEvent = new ConversionCompleteEventArgs(processedDuration, TimeSpan.Zero, frame, fps, sizeKb, bitrate);

            return true;
        }
Beispiel #2
0
 private void OnComplete(object sender, ConversionCompleteEventArgs e)
 {
     output.AppendLine("Done!\n");
 }
Beispiel #3
0
        private void OnComplete(object sender, ConversionCompleteEventArgs e)
        {
            MainWindow mainWindow = (MainWindow)Application.Current.MainWindow;

            mainWindow.TaskbarLibria.ShowBalloonTip("Закачка заверщена", NameTitle, BalloonIcon.Info);
        }
Beispiel #4
0
 private void OnConversionCompleted(ConversionCompleteEventArgs eventArgs) => Completed?.Invoke(eventArgs);
        private void engine_ConversionCompleteEvent(object sender, ConversionCompleteEventArgs e)
        {
            if (!_printToConsoleEnabled) return;

            Console.WriteLine("\n------------\nConversion complete!\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);
        }
 private void OnConversionCompleteEvent(object sender, ConversionCompleteEventArgs conversionCompleteEventArgs)
 {
     Debug.WriteLine("END");
 }
Beispiel #7
0
 private void Engine_ConversionCompleteEvent(object sender, ConversionCompleteEventArgs e)
 {
     //pbConvert.Value = 100;
 }
Beispiel #8
0
 private void OnComplete(ConversionCompleteEventArgs e)
 {
     Complete?.Invoke(this, e);
 }
Beispiel #9
0
 private static void OnComplete(object sender, ConversionCompleteEventArgs e)
 => Console.WriteLine("Completed conversion from {0} to {1}", e.Input.FileInfo.FullName, e.Output?.FileInfo.FullName);
Beispiel #10
0
 private void CroppingCompleteEvent(object sender, ConversionCompleteEventArgs args)
 {
     CroppingFinished = true;
     //TODO: analysis, testing, recursive delete bug
 }
Beispiel #11
0
 private void MirroringCompleteEvent(object sender, ConversionCompleteEventArgs args)
 {
     MirroringFinished = true;
     //TODO: analysis, testing
 }
Beispiel #12
0
 private void ConversionCompleteEvent(object sender, ConversionCompleteEventArgs args)
 {
     ConversionCounter++;
 }
Beispiel #13
0
 private void OnComplete(object sender, ConversionCompleteEventArgs e)
 {
     LogMessage("Complited !");
     SetProgressValue(100);
 }