Пример #1
0
        private void InternalChangeEncoding(AudioMediaFormatType inputFormat, AudioMediaFormatType outputFormat, string file)
        {
            _transcoding = new Transcoding
            {
                InputFormat = inputFormat,
                OutputFormat = outputFormat
            };

            if (_supportedTranscodings.Contains(_transcoding) == false)
                throw new NotSupportedException(string.Format("TXT_UNSUPPORTED_TRANSCODING: {0}", _transcoding));

            _transcoding.DoTranscoding(EncoderSettings, file);
        }
Пример #2
0
        public void ChangeEncoding(string file)
        {
            string inputFileType = PathUtils.GetExtension(file).ToUpperInvariant();

            AudioMediaFormatType inputFormat  = AudioMediaFormatType.WAV;
            AudioMediaFormatType outputFormat = EncoderSettings.FormatType;

            if (Enum.TryParse <AudioMediaFormatType>(inputFileType, out inputFormat) == false)
            {
                throw new NotSupportedException(string.Format("TXT_UNSUPPORTED_INPUT_FORMAT: {0}", inputFileType));
            }

            InternalChangeEncoding(inputFormat, outputFormat, file);
        }
Пример #3
0
        private void InternalChangeEncoding(AudioMediaFormatType inputFormat, AudioMediaFormatType outputFormat, string file)
        {
            _transcoding = new Transcoding
            {
                InputFormat  = inputFormat,
                OutputFormat = outputFormat
            };

            if (_supportedTranscodings.Contains(_transcoding) == false)
            {
                throw new NotSupportedException(string.Format("TXT_UNSUPPORTED_TRANSCODING: {0}", _transcoding));
            }

            _transcoding.DoTranscoding(EncoderSettings, file);
        }
Пример #4
0
        public static CdRipper CreateGrabber(AudioMediaFormatType outputType)
        {
            switch (outputType)
            {
            case AudioMediaFormatType.WAV:
                return(new GrabberToWave());

            case AudioMediaFormatType.MP3:
                return(new GrabberToMP3());

                //case AudioMediaFormatType.WMA:
                //    return new GrabberToWMA();

                //case AudioMediaFormatType.OGG:
                //    return new GrabberToOGG();
            }

            return(null);
        }
Пример #5
0
        public static CdRipper CreateGrabber(AudioMediaFormatType outputType)
        {
            switch (outputType)
            {
                case AudioMediaFormatType.WAV:
                    return new GrabberToWave();
                
                case AudioMediaFormatType.MP3:
                    return new GrabberToMP3();
                
                //case AudioMediaFormatType.WMA:
                //    return new GrabberToWMA();
                
                //case AudioMediaFormatType.OGG:
                //    return new GrabberToOGG();
            }

            return null;
        }
Пример #6
0
 public EncoderSettings(AudioMediaFormatType fmtType)
 {
     this.FormatType = fmtType;
 }