public void encoder_works_with_mp3_correctly()
        {
            var vew = new NativeVideoEncoderProcess.VideoEncoderWrapper();
            var workingDir = vew.GetWorkingDirectory("Encoder");
            var outputPath = Path.Combine(workingDir, "output_mp3.wmv");

            if (File.Exists(outputPath))
                File.Delete(outputPath);

            vew.EncodingPercentageUpdated += (sender, args) =>
            {
                System.Diagnostics.Debug.WriteLine("Encoding complete: " + args.EncodingPercentage);
            };

            vew.Encode("C:\\Users\\chpink\\Home\\sandbox\\MusicianHelper\\TEST\\paper-stained-3-texture.bmp", "C:\\Users\\chpink\\Home\\sandbox\\MusicianHelper\\TEST\\sorry_dave.mp3", outputPath);
            //vew.Encode("C:\\Users\\user\\Dropbox\\Cloud\\GitHub\\MusicianHelper\\TEST\\paper-stained-3-texture.bmp", "C:\\Users\\user\\Dropbox\\Cloud\\GitHub\\MusicianHelper\\TEST\\sorry_dave.mp3", outputPath);

            Assert.True(File.Exists(outputPath));

            var fi = new FileInfo(outputPath);
            if (fi.Exists)
            {
                Assert.True(fi.Length > 1000000);
            }
        }
示例#2
0
        public void encoder_works_with_mp3_correctly()
        {
            var vew        = new NativeVideoEncoderProcess.VideoEncoderWrapper();
            var workingDir = vew.GetWorkingDirectory("Encoder");
            var outputPath = Path.Combine(workingDir, "output_mp3.wmv");

            if (File.Exists(outputPath))
            {
                File.Delete(outputPath);
            }

            vew.EncodingPercentageUpdated += (sender, args) =>
            {
                System.Diagnostics.Debug.WriteLine("Encoding complete: " + args.EncodingPercentage);
            };

            vew.Encode(GetBaseDirectory() + "\\TEST\\paper-stained-3-texture.bmp", GetBaseDirectory() + "\\TEST\\sorry_dave.mp3", outputPath);

            Assert.True(File.Exists(outputPath));

            var fi = new FileInfo(outputPath);

            if (fi.Exists)
            {
                Assert.True(fi.Length > 1000000);
            }
        }
        public void encoder_works_correctly()
        {
            var vew = new NativeVideoEncoderProcess.VideoEncoderWrapper();
            var workingDir = vew.GetWorkingDirectory("Encoder");
            var outputPath = Path.Combine(workingDir, "output.wmv");

            if (File.Exists(outputPath))
                File.Delete(outputPath);

            vew.EncodingPercentageUpdated += (sender, args) =>
            {
                System.Diagnostics.Debug.WriteLine("Encoding complete: " + args.EncodingPercentage);
            };

            vew.Encode("..\\..\\..\\TEST\\paper-stained-3-texture.bmp", "..\\..\\..\\TEST\\sorry_dave.wav", outputPath);

            Assert.True(File.Exists(outputPath));

            var fi = new FileInfo(outputPath);
            Assert.True(fi.Length > 1000000);
        }