Beispiel #1
0
        /// <summary>
        ///     Debug Write
        /// </summary>
        public static void DebugWrite(DebugConsole debugconsole, ViewModel vm)
        {
            // -------------------------
            // Write Variables to Console
            // -------------------------

            // Clear Old Text
            debugParagraph.Inlines.Clear();

            debugconsole.rtbDebug.Document = new FlowDocument(debugParagraph); // start

            //debugconsole.rtbDebug.BeginChange();
            //debugconsole.rtbDebug.SelectAll();
            //debugconsole.rtbDebug.Selection.Text = "";
            //debugconsole.rtbDebug.EndChange();

            // Write New Text
            //debugconsole.rtbDebug.Document = new FlowDocument(debugParagraph); // start

            // begin change
            debugconsole.rtbDebug.BeginChange();
            //////////////////////////////////////////////////

            debugParagraph.Inlines.Add(new Bold(new Run("Program Variables"))
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());


            // System
            debugParagraph.Inlines.Add(new Bold(new Run("System "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("ready ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(MainWindow.ready.ToString()) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ready "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.ReadyHalts(vm).ToString())
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("script ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(MainWindow.script.ToString()) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("ffCheckCleared ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(MainWindow.ffCheckCleared.ToString()) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffCheckCleared "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.FFcheck(vm).ToString())
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("threads "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Configure.threads)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("maxthreads "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Configure.maxthreads)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("appDir "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.appDir)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Configure
            debugParagraph.Inlines.Add(new Bold(new Run("Configure "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("theme "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Configure.theme)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffmpeg "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFmpeg.ffmpeg)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffprobe "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.ffprobe)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffmpegPath "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(vm.FFmpegPath_Text)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffprobePath "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(vm.FFprobePath_Text)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("logPath "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(vm.LogPath_Text)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("logEnable "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(vm.LogCheckBox_IsChecked.ToString())
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Input
            debugParagraph.Inlines.Add(new Bold(new Run("Input "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputDir "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.inputDir)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputFileName "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.inputFileName)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputExt "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.inputExt)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("input "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.input)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Output
            debugParagraph.Inlines.Add(new Bold(new Run("Output "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("outputDir "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.outputDir)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("outputFileName "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.outputFileName)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("outputNewFileName "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.outputNewFileName)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("outputExt "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.outputExt)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("output "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.output)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Batch
            debugParagraph.Inlines.Add(new Bold(new Run("Batch "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("batchInputAuto "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(MainWindow.batchInputAuto)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("batchExt ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(MainWindow.batchExt) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("batchFFprobeAuto "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.batchFFprobeAuto)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("batchVideoAuto "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.batchVideoAuto)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("batchAudioAuto "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.batchAudioAuto)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Video
            debugParagraph.Inlines.Add(new Bold(new Run("Video "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("hwaccel "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.hwacceleration)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vEncodeSpeed "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vEncodeSpeed)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vQuality "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vQuality)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vLossless "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vLossless)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("vBitMode ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(Video.vBitMode) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vMaxRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vMaxRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vBufSize "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vBufSize)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vOptions "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vOptions)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("crf "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vCRF)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("x265params "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.x265params)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("fps "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.fps)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("image "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.image)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vEncodeSpeed "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vEncodeSpeed)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("passUserSelected "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(VideoControls.passUserSelected.ToString())
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("pass1 "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.pass1)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("pass2 "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.pass2)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("v2passArgs "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.v2PassArgs)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("optTune "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.optTune)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("optProfile "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.optProfile)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("optLevel "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.optLevel)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("optimize "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.optimize)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());


            debugParagraph.Inlines.Add(new Bold(new Run("width "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.width)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("height "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.height)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("cropWidth "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(CropWindow.cropWidth)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("cropHeight "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(CropWindow.cropHeight)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("cropX "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(CropWindow.cropX)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("cropY "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(CropWindow.cropY)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("crop "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(CropWindow.crop)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vAspectRatio "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Video.vAspectRatio)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("geq "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(VideoFilters.geq)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vFilter "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(VideoFilters.vFilter)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Audio
            debugParagraph.Inlines.Add(new Bold(new Run("Audio "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aQuality "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aQuality)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aBitMode "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aBitMode)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aChannel "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aChannel)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aSamplerate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aSamplerate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aBitDepth "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aBitDepth)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("volume "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aVolume)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aHardLimiter "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Audio.aHardLimiter)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aFilter "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(AudioFilters.aFilter)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("aBitRateLimiter ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(Audio.aBitRateLimiter) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Streams
            debugParagraph.Inlines.Add(new Bold(new Run("Streams "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vMap "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Streams.vMap)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aMap "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Streams.aMap)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("cMap "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Streams.cMap)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("sMap "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Streams.sMap)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("mMap "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Streams.mMap)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("map ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(Streams.map) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // Cut
            debugParagraph.Inlines.Add(new Bold(new Run("Cut "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("trimStart "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Format.trimStart)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("trimEnd "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(Format.trimEnd)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("trim ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(Format.trim) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // FFprobe
            debugParagraph.Inlines.Add(new Bold(new Run("FFprobe "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsProperties "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsProperties)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsVideoCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsVideoCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsAudioCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsAudioCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsVideoBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsVideoBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsAudioBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsAudioBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsSize "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsSize)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsDuration "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsDuration)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("argsFrameRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.argsFrameRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());


            debugParagraph.Inlines.Add(new Bold(new Run("inputFileProperties "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputFileProperties)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputVideoCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputVideoCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputVideoBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputVideoBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputAudioCodec "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputAudioCodec)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputAudioBitRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputAudioBitRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputSize "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputSize)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputDuration "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputDuration)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("inputFrameRate "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.inputFrameRate)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("vEntryType "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.vEntryType)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("aEntryType "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFprobe.aEntryType)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new LineBreak());
            debugParagraph.Inlines.Add(new LineBreak());


            // FFmpeg
            debugParagraph.Inlines.Add(new Bold(new Run("FFmpeg "))
            {
                Foreground = Heading
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //debugParagraph.Inlines.Add(new Bold(new Run("cmdWindow ")) { Foreground = Variable });
            //debugParagraph.Inlines.Add(new Run(FFmpeg.cmdWindow) { Foreground = Value });
            //debugParagraph.Inlines.Add(new LineBreak());

            debugParagraph.Inlines.Add(new Bold(new Run("ffmpegArgs "))
            {
                Foreground = Variable
            });
            debugParagraph.Inlines.Add(new Run(FFmpeg.ffmpegArgs)
            {
                Foreground = Value
            });
            debugParagraph.Inlines.Add(new LineBreak());

            //////////////////////////////////////////////////
            debugconsole.rtbDebug.EndChange(); // end change
        }
Beispiel #2
0
        /// <summary>
        ///     Debug Test Button
        /// </summary>
        private void btnDebugTest_Click(object sender, RoutedEventArgs e)
        {
            // -------------------------
            // Keep FFmpeg Window Toggle
            // -------------------------
            //MainWindow.KeepWindow(mainwindow);

            // -------------------------
            // Batch Extention Period Check
            // -------------------------
            MainWindow.BatchExtCheck(mainwindow);

            // -------------------------
            // Set FFprobe Path
            // -------------------------
            MainWindow.FFprobePath(mainwindow);

            // -------------------------
            // Ready Halts
            // -------------------------
            MainWindow.ReadyHalts(mainwindow);


            // -------------------------
            // Background Thread Worker
            // -------------------------
            BackgroundWorker fileprocess = new BackgroundWorker();

            fileprocess.WorkerSupportsCancellation = true;
            fileprocess.WorkerReportsProgress      = true;

            fileprocess.DoWork += new DoWorkEventHandler(delegate(object o, DoWorkEventArgs args)
            {
                BackgroundWorker b = o as BackgroundWorker;

                // Cross-Thread Communication
                this.Dispatcher.Invoke(() =>
                {
                    // -------------------------
                    // Single
                    // -------------------------
                    if (mainwindow.tglBatch.IsChecked == false)
                    {
                        // -------------------------
                        // FFprobe Detect Metadata
                        // -------------------------
                        FFprobe.Metadata(mainwindow);

                        // -------------------------
                        // FFmpeg Generate Arguments (Single)
                        // -------------------------
                        //disabled if batch
                        FFmpeg.FFmpegSingleGenerateArgs(mainwindow);
                    }

                    // -------------------------
                    // Batch
                    // -------------------------
                    else if (mainwindow.tglBatch.IsChecked == true)
                    {
                        // -------------------------
                        // FFprobe Video Entry Type Containers
                        // -------------------------
                        //FFprobe.VideoEntryTypeBatch(this);
                        FFprobe.VideoEntryType(mainwindow);

                        // -------------------------
                        // FFprobe Video Entry Type Containers
                        // -------------------------
                        //FFprobe.AudioEntryTypeBatch(this);
                        FFprobe.AudioEntryType(mainwindow);

                        // -------------------------
                        // FFmpeg Generate Arguments (Batch)
                        // -------------------------
                        //disabled if single file
                        FFmpeg.FFmpegBatchGenerateArgs(mainwindow);
                    }
                }); //end dispatcher
            });     //end thread


            // When background worker completes task
            fileprocess.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delegate(object o, RunWorkerCompletedEventArgs args)
            {
                // -------------------------
                // Write Variables to Debug Window
                // -------------------------
                DebugWrite(this, mainwindow);

                // -------------------------
                // Close the Background Worker
                // -------------------------
                fileprocess.CancelAsync();
                fileprocess.Dispose();

                // -------------------------
                // Clear Variables for next Run
                // -------------------------
                MainWindow.ClearVariables(mainwindow);
                GC.Collect();
            }); //end worker completed task


            // -------------------------
            // Background Worker Run Async
            // -------------------------
            fileprocess.RunWorkerAsync();
        }
Beispiel #3
0
        /// <summary>
        ///     Debug Test Button
        /// </summary>
        private void btnDebugTest_Click(object sender, RoutedEventArgs e)
        {
            MainWindow mainwindow = (MainWindow)System.Windows.Application.Current.MainWindow;
            ViewModel  vm         = mainwindow.DataContext as ViewModel;

            // -------------------------
            // Clear Variables before Run
            // -------------------------
            MainWindow.ClearGlobalVariables(vm);

            // -------------------------
            // Batch Extention Period Check
            // -------------------------
            MainWindow.BatchExtCheck(vm);

            // -------------------------
            // Set FFprobe Path
            // -------------------------
            MainWindow.FFprobePath(vm);

            // -------------------------
            // Set youtube-dl Path
            // -------------------------
            MainWindow.youtubedlPath(vm);

            // -------------------------
            // Ready Halts
            // -------------------------
            if (MainWindow.ReadyHalts(vm) == true)
            {
                // -------------------------
                // Single
                // -------------------------
                if (vm.Batch_IsChecked == false)
                {
                    // -------------------------
                    // FFprobe Detect Metadata
                    // -------------------------
                    FFprobe.Metadata(vm);

                    // -------------------------
                    // FFmpeg Generate Arguments (Single)
                    // -------------------------
                    //disabled if batch
                    FFmpeg.FFmpegSingleGenerateArgs(vm);
                }

                // -------------------------
                // Batch
                // -------------------------
                else if (vm.Batch_IsChecked == true)
                {
                    // -------------------------
                    // FFprobe Video Entry Type Containers
                    // -------------------------
                    FFprobe.VideoEntryType(vm);

                    // -------------------------
                    // FFprobe Video Entry Type Containers
                    // -------------------------
                    FFprobe.AudioEntryType(vm);

                    // -------------------------
                    // FFmpeg Generate Arguments (Batch)
                    // -------------------------
                    //disabled if single file
                    FFmpeg.FFmpegBatchGenerateArgs(vm);
                }

                // -------------------------
                // Write Variables to Debug Window
                // -------------------------
                DebugWrite(this, vm);

                // -------------------------
                // Clear Variables for next Run
                // -------------------------
                MainWindow.ClearGlobalVariables(vm);
                GC.Collect();
            }
        }