示例#1
0
        private void AnalyseFolder(PandaVideoConv conv, string sourceFilePath)
        {
            try
            {
                Mouse.OverrideCursor = Cursors.Wait;

                // make sure its still there

                if (Directory.Exists(sourceFilePath))
                {
                    conv.DiscMode = true;
                    conv.AnalyseFile(sourceFilePath);


                    // Allow convert
                    buttonConvert.IsEnabled = true;
                }
                else
                {
                    logging.Add(new LogItem("Failed to find folder: " + textBoxSourceFilePath.Text));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "PVC failure");
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
示例#2
0
        public void TestConvertSample50()
        {
            var convertFile = new PandaVideoConv
            {
                OutputFolder = _outputPath, WorkingFolder = _outputPath, SelectedDevice = new DeviceiPhone3GS()
            };

            Assert.IsTrue(convertFile.AnalyseFile(Path.Combine(_samplesPath, SAMPLE_FILE13))); // \VIDEO_TS

            // Test what we found
            Assert.IsTrue(convertFile.ConvertDisc());
        }
示例#3
0
        public void TestConvertSample4()
        {
            var convertFile = new PandaVideoConv();

            // set the output prop
            convertFile.OutputFolder   = _outputPath;
            convertFile.WorkingFolder  = _outputPath;
            convertFile.SelectedDevice = _device;

            convertFile.AnalyseFile(Path.Combine(_samplesPath, SAMPLE_FILE11));

            // Test what we found
            Assert.IsTrue(convertFile.ConvertFile());
        }
示例#4
0
        public void TestConvertSample10()
        {
            var convertFile = new PandaVideoConv();

            // set the output prop
            convertFile.OutputFolder   = _outputPath;
            convertFile.WorkingFolder  = _outputPath;
            convertFile.SelectedDevice = (IOutputDevice) new DeviceXBox360();

            Assert.IsTrue(
                convertFile.AnalyseFile(Path.Combine(_samplesPath,
                                                     SAMPLE_FILE8)),
                "Should have been okay");

            // Test what we found
            Assert.IsTrue(convertFile.ConvertFile());
        }
示例#5
0
        public void TestConvertSubtitlesSample()
        {
            var convertFile = new PandaVideoConv();

            // set the output prop
            convertFile.OutputFolder    = _outputPath;
            convertFile.WorkingFolder   = _outputPath;
            convertFile.SelectedDevice  = _device;
            convertFile.EncodeSubtitles = true;

            Assert.IsTrue(
                convertFile.AnalyseFile(Path.Combine(_samplesPath,
                                                     SAMPLE_FILE14)),
                "Should have been okay");

            // Test what we found
            Assert.IsTrue(convertFile.ConvertFile());
        }
示例#6
0
        public void TestConvertSample70()
        {
            var convertFile = new PandaVideoConv();

            // set the output prop
            convertFile.OutputFolder   = _outputPath;
            convertFile.WorkingFolder  = _outputPath;
            convertFile.SelectedDevice = _device;

            convertFile.AnalyseFile(Path.Combine(_samplesPath, SAMPLE_FILE12));

            List <AudioTrack> audList = convertFile.GetAudioTracks();

            convertFile.SelectedAudioTrack = audList[0];

            // Test what we found
            Assert.IsTrue(convertFile.ConvertFile());
        }
示例#7
0
        public void TestInitialAnalysis()
        {
            var samplesPath = Environment.CurrentDirectory + @"\..\..\PandaVideoSamples";
            var outputPath  = Path.Combine(samplesPath, "Output");

            Directory.CreateDirectory(outputPath);

            var convertFile = new PandaVideoConv
            {
                OutputFolder = outputPath, WorkingFolder = outputPath, SelectedDevice = new DevicePS3()
            };

            Assert.IsTrue(convertFile.AnalyseFile(Path.Combine(samplesPath, SAMPLE_FILE1)), "Failed Analysis");

            // Test what we found
            List <VideoTrack> vTracks = convertFile.GetVideoTracks();

            Assert.IsTrue(vTracks.Count > 0);
            VideoTrack vTrack1 = vTracks[0];

            Assert.IsTrue(vTrack1.Width == 1920, "Width is wrong");
            Assert.IsTrue(vTrack1.Height == 800, "Height is wrong");
        }