示例#1
0
        public File Convert(String fileName, String format)
        {
            ICodec       destinationCodec;
            VideoFile    file        = new VideoFile(fileName);
            CodecFactory sourceCodec = CodecFactory.Extract(file);

            if (format == "mp4")
            {
                destinationCodec = new MPEG4CompressionCodec();
            }
            else
            {
                destinationCodec = new OggCompressionCodec();
            }
            String buffer = BitrateReader.Read(fileName, sourceCodec);
            String result = BitrateReader.Convert(buffer, destinationCodec);

            result = AudioMixer.Fix(result);
            return(new File(result));
        }
示例#2
0
 public static String Read(String fileName, CodecFactory sourceCodec)
 {
     Console.WriteLine("Reading file: {0},", fileName);
     return("Buffer " + fileName);
 }