Beispiel #1
0
        private void DoEncodeAudio(EncodeInfo job)
        {
            FfMpeg     ffmpeg = new FfMpeg();
            OggEnc     oggEnc = new OggEnc();
            Lame       lame   = new Lame();
            NeroAACEnc aacEnc = new NeroAACEnc();

            switch (job.AudioProfile.Type)
            {
            case ProfileType.AC3:
                ffmpeg.SetJob(job);
                _worker.DoWork += ffmpeg.DoEncodeAc3;
                Log.Info("ffmpeg.DoEncodeAC3()");
                break;

            case ProfileType.OGG:
                oggEnc.SetJob(job);
                _worker.DoWork += oggEnc.DoEncode;
                Log.Info("oggenc.DoEncode()");
                break;

            case ProfileType.AAC:
                aacEnc.SetJob(job);
                _worker.DoWork += aacEnc.DoEncode;
                Log.Info("NeroAacEnc.DoEncode()");
                break;

            case ProfileType.MP3:
                lame.SetJob(job);
                _worker.DoWork += lame.DoEncode;
                Log.Info("lame.DoEncode()");
                break;

            case ProfileType.Copy:
                if (job.EncodingProfile.OutFormat == OutputType.OutputDvd &&
                    !Processing.CheckAudioDvdCompatible(job.AudioStreams[job.StreamId]))
                {
                    ffmpeg.SetJob(job);
                    _worker.DoWork += ffmpeg.DoEncodeAc3;
                    Log.Info("ffmpeg.DoEncodeAC3()");
                }
                break;
            }
        }