Exemplo n.º 1
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (aac != null)
     {
         grid_codec.Children.Remove(aac);
         aac = null;
     }
     else if (qaac != null)
     {
         grid_codec.Children.Remove(qaac);
         qaac = null;
     }
     else if (mp3 != null)
     {
         grid_codec.Children.Remove(mp3);
         mp3 = null;
     }
     else if (ac3 != null)
     {
         grid_codec.Children.Remove(ac3);
         ac3 = null;
     }
     else if (fmp2 != null)
     {
         grid_codec.Children.Remove(fmp2);
         fmp2 = null;
     }
     else if (fpcm != null)
     {
         grid_codec.Children.Remove(fpcm);
         fpcm = null;
     }
     else if (flpcm != null)
     {
         grid_codec.Children.Remove(flpcm);
         flpcm = null;
     }
     else if (fflac != null)
     {
         grid_codec.Children.Remove(fflac);
         fflac = null;
     }
     else if (copyordisabled != null)
     {
         grid_codec.Children.Remove(copyordisabled);
         copyordisabled = null;
     }
 }
Exemplo n.º 2
0
 private void UpdateMassive()
 {
     if (aac != null)
     {
         m = aac.m.Clone();
         m = NeroAAC.EncodeLine(m);
     }
     else if (qaac != null)
     {
         m = qaac.m.Clone();
         m = QuickTimeAAC.EncodeLine(m);
     }
     else if (mp3 != null)
     {
         m = mp3.m.Clone();
         m = LameMP3.EncodeLine(m);
     }
     else if (ac3 != null)
     {
         m = ac3.m.Clone();
         m = AftenAC3.EncodeLine(m);
     }
     else if (fmp2 != null)
     {
         m = fmp2.m.Clone();
         m = FMP2.EncodeLine(m);
     }
     else if (fpcm != null)
     {
         m = fpcm.m.Clone();
         m = FPCM.EncodeLine(m);
     }
     else if (flpcm != null)
     {
         m = flpcm.m.Clone();
         m = FLPCM.EncodeLine(m);
     }
     else if (fflac != null)
     {
         m = fflac.m.Clone();
         m = FFLAC.EncodeLine(m);
     }
 }
Exemplo n.º 3
0
        public static Massive DecodePresets(Massive m)
        {
            //расшифровываем видео параметры
            if (m.outvcodec == "x265")
            {
                m = x265.DecodeLine(m);
            }
            else if (m.outvcodec == "x264")
            {
                m = x264.DecodeLine(m);
            }
            else if (m.outvcodec == "x262")
            {
                m = x262.DecodeLine(m);
            }
            else if (m.outvcodec == "XviD")
            {
                m = XviD.DecodeLine(m);
            }
            else if (m.outvcodec == "MPEG2")
            {
                m = FMPEG2.DecodeLine(m);
            }
            else if (m.outvcodec == "MPEG1")
            {
                m = FMPEG1.DecodeLine(m);
            }
            else if (m.outvcodec == "MPEG4")
            {
                m = FMPEG4.DecodeLine(m);
            }
            else if (m.outvcodec == "DV")
            {
                m = FDV.DecodeLine(m);
            }
            else if (m.outvcodec == "HUFF")
            {
                m = FFHUFF.DecodeLine(m);
            }
            else if (m.outvcodec == "MJPEG")
            {
                m = FMJPEG.DecodeLine(m);
            }
            else if (m.outvcodec == "FFV1")
            {
                m = FFV1.DecodeLine(m);
            }
            else if (m.outvcodec == "FLV1")
            {
                m = FLV1.DecodeLine(m);
            }

            if (m.outaudiostreams.Count > 0)
            {
                AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

                //расшифровываем audio параметры
                if (outstream.codec == "AAC")
                {
                    m = NeroAAC.DecodeLine(m);
                }
                else if (outstream.codec == "QAAC")
                {
                    m = QuickTimeAAC.DecodeLine(m);
                }
                else if (outstream.codec == "MP3")
                {
                    m = LameMP3.DecodeLine(m);
                }
                else if (outstream.codec == "AC3")
                {
                    m = AftenAC3.DecodeLine(m);
                }
                else if (outstream.codec == "MP2")
                {
                    m = FMP2.DecodeLine(m);
                }
                else if (outstream.codec == "PCM")
                {
                    m = FPCM.DecodeLine(m);
                }
                else if (outstream.codec == "LPCM")
                {
                    m = FLPCM.DecodeLine(m);
                }
                else if (outstream.codec == "FLAC")
                {
                    m = FFLAC.DecodeLine(m);
                }
            }

            return(m);
        }
Exemplo n.º 4
0
        private void LoadCodecWindow()
        {
            //определяем аудио потоки
            AudioStream instream  = (AudioStream)m.inaudiostreams[m.inaudiostream];
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //загрузка
            if (outstream.codec == "AAC")
            {
                aac = new NeroAAC(m, this);
                grid_codec.Children.Add(aac);
            }
            else if (outstream.codec == "QAAC")
            {
                qaac = new QuickTimeAAC(m, this);
                grid_codec.Children.Add(qaac);
            }
            else if (outstream.codec == "MP3")
            {
                mp3 = new LameMP3(m, this);
                grid_codec.Children.Add(mp3);
            }
            else if (outstream.codec == "AC3")
            {
                ac3 = new AftenAC3(m, this);
                grid_codec.Children.Add(ac3);
            }
            else if (outstream.codec == "MP2")
            {
                fmp2 = new FMP2(m, this);
                grid_codec.Children.Add(fmp2);
            }
            else if (outstream.codec == "PCM")
            {
                fpcm = new FPCM(m, this);
                grid_codec.Children.Add(fpcm);
            }
            else if (outstream.codec == "LPCM")
            {
                flpcm = new FLPCM(m, this);
                grid_codec.Children.Add(flpcm);
            }
            else if (outstream.codec == "FLAC")
            {
                fflac = new FFLAC(m, this);
                grid_codec.Children.Add(fflac);
            }
            else if (outstream.codec == "Copy" ||
                     outstream.codec == "Disabled")
            {
                copyordisabled = new CopyOrDisabled();
                if (outstream.codec == "Disabled")
                {
                    copyordisabled.text_info.Content = Languages.Translate("Output file will be created without sound.");
                }
                else
                {
                    copyordisabled.text_info.Content  = "Codec: " + instream.codecshort + Environment.NewLine;
                    copyordisabled.text_info.Content += "Bitrate: " + instream.bitrate + " kbps" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Channels: " + instream.channels + " ch" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Samplerate: " + instream.samplerate + " Hz" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Bits: " + instream.bits + " bit";
                }
                grid_codec.Children.Add(copyordisabled);
            }
        }
Exemplo n.º 5
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (aac != null)
     {
         grid_codec.Children.Remove(aac);
         aac = null;
     }
     else if (qaac != null)
     {
         grid_codec.Children.Remove(qaac);
         qaac = null;
     }
     else if (mp3 != null)
     {
         grid_codec.Children.Remove(mp3);
         mp3 = null;
     }
     else if (ac3 != null)
     {
         grid_codec.Children.Remove(ac3);
         ac3 = null;
     }
     else if (fmp2 != null)
     {
         grid_codec.Children.Remove(fmp2);
         fmp2 = null;
     }
     else if (fpcm != null)
     {
         grid_codec.Children.Remove(fpcm);
         fpcm = null;
     }
     else if (flpcm != null)
     {
         grid_codec.Children.Remove(flpcm);
         flpcm = null;
     }
     else if (fflac != null)
     {
         grid_codec.Children.Remove(fflac);
         fflac = null;
     }
     else if (copyordisabled != null)
     {
         grid_codec.Children.Remove(copyordisabled);
         copyordisabled = null;
     }
 }
Exemplo n.º 6
0
        private void LoadCodecWindow()
        {
            //определяем аудио потоки
            AudioStream instream = (AudioStream)m.inaudiostreams[m.inaudiostream];
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //загрузка
            if (outstream.codec == "AAC")
            {
                aac = new NeroAAC(m, this);
                grid_codec.Children.Add(aac);
            }
            else if (outstream.codec == "QAAC")
            {
                qaac = new QuickTimeAAC(m, this);
                grid_codec.Children.Add(qaac);
            }
            else if (outstream.codec == "MP3")
            {
                mp3 = new LameMP3(m, this);
                grid_codec.Children.Add(mp3);
            }
            else if (outstream.codec == "AC3")
            {
                ac3 = new AftenAC3(m, this);
                grid_codec.Children.Add(ac3);
            }
            else if (outstream.codec == "MP2")
            {
                fmp2 = new FMP2(m, this);
                grid_codec.Children.Add(fmp2);
            }
            else if (outstream.codec == "PCM")
            {
                fpcm = new FPCM(m, this);
                grid_codec.Children.Add(fpcm);
            }
            else if (outstream.codec == "LPCM")
            {
                flpcm = new FLPCM(m, this);
                grid_codec.Children.Add(flpcm);
            }
            else if (outstream.codec == "FLAC")
            {
                fflac = new FFLAC(m, this);
                grid_codec.Children.Add(fflac);
            }
            else if (outstream.codec == "Copy" ||
                outstream.codec == "Disabled")
            {
                copyordisabled = new CopyOrDisabled();
                if (outstream.codec == "Disabled")
                    copyordisabled.text_info.Content = Languages.Translate("Output file will be created without sound.");
                else
                {
                    copyordisabled.text_info.Content = "Codec: " + instream.codecshort + Environment.NewLine;
                    copyordisabled.text_info.Content += "Bitrate: " + instream.bitrate  + " kbps" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Channels: " + instream.channels +  " ch" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Samplerate: " + instream.samplerate + " Hz" + Environment.NewLine;
                    copyordisabled.text_info.Content += "Bits: " + instream.bits + " bit";
                }
                grid_codec.Children.Add(copyordisabled);
            }
        }