Esempio n. 1
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (x264c != null)
     {
         grid_codec.Children.Remove(x264c);
         x264c = null;
     }
     else if (x262c != null)
     {
         grid_codec.Children.Remove(x262c);
         x262c = null;
     }
     else if (xvid != null)
     {
         grid_codec.Children.Remove(xvid);
         xvid = null;
     }
     else if (mpeg1 != null)
     {
         grid_codec.Children.Remove(mpeg1);
         mpeg1 = null;
     }
     else if (mpeg2 != null)
     {
         grid_codec.Children.Remove(mpeg2);
         mpeg2 = null;
     }
     else if (mpeg4 != null)
     {
         grid_codec.Children.Remove(mpeg4);
         mpeg4 = null;
     }
     else if (dv != null)
     {
         grid_codec.Children.Remove(dv);
         dv = null;
     }
     else if (huff != null)
     {
         grid_codec.Children.Remove(huff);
         huff = null;
     }
     else if (ffv1 != null)
     {
         grid_codec.Children.Remove(ffv1);
         ffv1 = null;
     }
     else if (flv != null)
     {
         grid_codec.Children.Remove(flv);
         flv = null;
     }
     else if (mjpeg != null)
     {
         grid_codec.Children.Remove(mjpeg);
         mjpeg = null;
     }
     else if (copyordisabled != null)
     {
         grid_codec.Children.Remove(copyordisabled);
         copyordisabled = null;
     }
 }
Esempio n. 2
0
 private void LoadCodecWindow()
 {
     //загрузка
     if (m.outvcodec == "x264")
     {
         x264c = new x264(m, this, p);
         grid_codec.Children.Add(x264c);
     }
     else if (m.outvcodec == "x262")
     {
         x262c = new x262(m, this, p);
         grid_codec.Children.Add(x262c);
     }
     else if (m.outvcodec == "XviD")
     {
         xvid = new XviD(m, this, p);
         grid_codec.Children.Add(xvid);
     }
     else if (m.outvcodec == "MPEG1")
     {
         mpeg1 = new FMPEG1(m, this, p);
         grid_codec.Children.Add(mpeg1);
     }
     else if (m.outvcodec == "MPEG2")
     {
         mpeg2 = new FMPEG2(m, this, p);
         grid_codec.Children.Add(mpeg2);
     }
     else if (m.outvcodec == "MPEG4")
     {
         mpeg4 = new FMPEG4(m, this, p);
         grid_codec.Children.Add(mpeg4);
     }
     else if (m.outvcodec == "DV")
     {
         dv = new FDV(m, this, p);
         grid_codec.Children.Add(dv);
     }
     else if (m.outvcodec == "HUFF")
     {
         huff = new FFHUFF(m, this, p);
         grid_codec.Children.Add(huff);
     }
     else if (m.outvcodec == "FFV1")
     {
         ffv1 = new FFV1(m, this, p);
         grid_codec.Children.Add(ffv1);
     }
     else if (m.outvcodec == "FLV1")
     {
         flv = new FLV1(m, this, p);
         grid_codec.Children.Add(flv);
     }
     else if (m.outvcodec == "MJPEG")
     {
         mjpeg = new FMJPEG(m, this, p);
         grid_codec.Children.Add(mjpeg);
     }
     else if (m.outvcodec == "Copy")
     {
         copyordisabled = new CopyOrDisabled();
             copyordisabled.text_info.Content = "Codec: " + m.invcodecshort + Environment.NewLine;
             copyordisabled.text_info.Content += "Bitrate: " + m.invbitrate + " kbps" + Environment.NewLine;
             copyordisabled.text_info.Content += "Resolution: " + m.inresw + "x" + m.inresh + Environment.NewLine;
             copyordisabled.text_info.Content += "Framerate: " + m.inframerate + " fps";
         grid_codec.Children.Add(copyordisabled);
     }
 }
Esempio 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);
        }
Esempio n. 4
0
 private void UpdateMassive()
 {
     if (x265c != null)
     {
         m = x265c.m.Clone();
         m = x265.EncodeLine(m);
     }
     else if (x264c != null)
     {
         m = x264c.m.Clone();
         m = x264.EncodeLine(m);
     }
     else if (x262c != null)
     {
         m = x262c.m.Clone();
         m = x262.EncodeLine(m);
     }
     else if (xvid != null)
     {
         m = xvid.m.Clone();
         m = XviD.EncodeLine(m);
     }
     else if (mpeg1 != null)
     {
         m = mpeg1.m.Clone();
         m = FMPEG1.EncodeLine(m);
     }
     else if (mpeg2 != null)
     {
         m = mpeg2.m.Clone();
         m = FMPEG2.EncodeLine(m);
     }
     else if (mpeg4 != null)
     {
         m = mpeg4.m.Clone();
         m = FMPEG4.EncodeLine(m);
     }
     else if (dv != null)
     {
         m = dv.m.Clone();
         m = FDV.EncodeLine(m);
     }
     else if (huff != null)
     {
         m = huff.m.Clone();
         m = FFHUFF.EncodeLine(m);
     }
     else if (ffv1 != null)
     {
         m = ffv1.m.Clone();
         m = FFV1.EncodeLine(m);
     }
     else if (flv != null)
     {
         m = flv.m.Clone();
         m = FLV1.EncodeLine(m);
     }
     else if (mjpeg != null)
     {
         m = mjpeg.m.Clone();
         m = FMJPEG.EncodeLine(m);
     }
 }
Esempio n. 5
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (x265c != null)
     {
         grid_codec.Children.Remove(x265c);
         x265c = null;
     }
     else if (x264c != null)
     {
         grid_codec.Children.Remove(x264c);
         x264c = null;
     }
     else if (x262c != null)
     {
         grid_codec.Children.Remove(x262c);
         x262c = null;
     }
     else if (xvid != null)
     {
         grid_codec.Children.Remove(xvid);
         xvid = null;
     }
     else if (mpeg1 != null)
     {
         grid_codec.Children.Remove(mpeg1);
         mpeg1 = null;
     }
     else if (mpeg2 != null)
     {
         grid_codec.Children.Remove(mpeg2);
         mpeg2 = null;
     }
     else if (mpeg4 != null)
     {
         grid_codec.Children.Remove(mpeg4);
         mpeg4 = null;
     }
     else if (dv != null)
     {
         grid_codec.Children.Remove(dv);
         dv = null;
     }
     else if (huff != null)
     {
         grid_codec.Children.Remove(huff);
         huff = null;
     }
     else if (ffv1 != null)
     {
         grid_codec.Children.Remove(ffv1);
         ffv1 = null;
     }
     else if (flv != null)
     {
         grid_codec.Children.Remove(flv);
         flv = null;
     }
     else if (mjpeg != null)
     {
         grid_codec.Children.Remove(mjpeg);
         mjpeg = null;
     }
     else if (copyordisabled != null)
     {
         grid_codec.Children.Remove(copyordisabled);
         copyordisabled = null;
     }
 }
Esempio n. 6
0
 private void LoadCodecWindow()
 {
     //загрузка
     if (m.outvcodec == "x265")
     {
         x265c = new x265(m, this, p);
         grid_codec.Children.Add(x265c);
     }
     else if (m.outvcodec == "x264")
     {
         x264c = new x264(m, this, p);
         grid_codec.Children.Add(x264c);
     }
     else if (m.outvcodec == "x262")
     {
         x262c = new x262(m, this, p);
         grid_codec.Children.Add(x262c);
     }
     else if (m.outvcodec == "XviD")
     {
         xvid = new XviD(m, this, p);
         grid_codec.Children.Add(xvid);
     }
     else if (m.outvcodec == "MPEG1")
     {
         mpeg1 = new FMPEG1(m, this, p);
         grid_codec.Children.Add(mpeg1);
     }
     else if (m.outvcodec == "MPEG2")
     {
         mpeg2 = new FMPEG2(m, this, p);
         grid_codec.Children.Add(mpeg2);
     }
     else if (m.outvcodec == "MPEG4")
     {
         mpeg4 = new FMPEG4(m, this, p);
         grid_codec.Children.Add(mpeg4);
     }
     else if (m.outvcodec == "DV")
     {
         dv = new FDV(m, this, p);
         grid_codec.Children.Add(dv);
     }
     else if (m.outvcodec == "HUFF")
     {
         huff = new FFHUFF(m, this, p);
         grid_codec.Children.Add(huff);
     }
     else if (m.outvcodec == "FFV1")
     {
         ffv1 = new FFV1(m, this, p);
         grid_codec.Children.Add(ffv1);
     }
     else if (m.outvcodec == "FLV1")
     {
         flv = new FLV1(m, this, p);
         grid_codec.Children.Add(flv);
     }
     else if (m.outvcodec == "MJPEG")
     {
         mjpeg = new FMJPEG(m, this, p);
         grid_codec.Children.Add(mjpeg);
     }
     else if (m.outvcodec == "Copy")
     {
         copyordisabled = new CopyOrDisabled();
         copyordisabled.text_info.Content  = "Codec: " + m.invcodecshort + Environment.NewLine;
         copyordisabled.text_info.Content += "Bitrate: " + m.invbitrate + " kbps" + Environment.NewLine;
         copyordisabled.text_info.Content += "Resolution: " + m.inresw + "x" + m.inresh + Environment.NewLine;
         copyordisabled.text_info.Content += "Framerate: " + m.inframerate + " fps";
         grid_codec.Children.Add(copyordisabled);
     }
 }