当前位置: 首页>>代码示例>>C#>>正文


C# XviD4PSP.Massive类代码示例

本文整理汇总了C#中XviD4PSP.Massive的典型用法代码示例。如果您正苦于以下问题:C# Massive类的具体用法?C# Massive怎么用?C# Massive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Massive类属于XviD4PSP命名空间,在下文中一共展示了Massive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DecodeLine

        public static Massive DecodeLine(Massive m)
        {
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //берём пока что за основу последнюю строку
            string line = outstream.passes;

            string[] separator = new string[] { " " };
            string[] cli = line.Split(separator, StringSplitOptions.None);
            int n = 0;

            foreach (string value in cli)
            {
                if (value == "-acodec")
                {
                    string bit = cli[n + 1];

                    if (bit == "pcm_s16be")
                        outstream.bits = 16;
                    if (bit == "pcm_s24be")
                        outstream.bits = 24;
                    if (bit == "pcm_s32be")
                        outstream.bits = 32;
                }
            }

            outstream.bitrate = (int)(0.016 * outstream.channels * (double)Convert.ToInt32(outstream.samplerate) * (double)outstream.bits / 16.0);

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:30,代码来源:FLPCM.xaml.cs

示例2: DecodeLine

        public static Massive DecodeLine(Massive m)
        {
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //создаём свежий массив параметров
            m.ac3_options = new ac3_arguments();

            //берём пока что за основу последнюю строку
            string line = outstream.passes;

            string[] separator = new string[] { " " };
            string[] cli = line.Split(separator, StringSplitOptions.None);
            int n = 0;

            foreach (string value in cli)
            {
                if (value == "-b") outstream.bitrate = Convert.ToInt32(cli[n + 1]);
                else if (value == "-dnorm") m.ac3_options.dnorm = Convert.ToInt32(cli[n + 1]);
                else if (value == "-w") m.ac3_options.bandwidth = Convert.ToInt32(cli[n + 1]);

                n++;
            }

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:25,代码来源:AftenAC3.xaml.cs

示例3: FFV1

        public FFV1(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent)
        {
            this.InitializeComponent();

            this.m = mass.Clone();
            this.p = parent;
            this.root_window = VideoEncWindow;

            //прогружаем colorspace
            combo_color.Items.Add("YV12");
            combo_color.Items.Add("YUY2");
            combo_color.Items.Add("RGB32");
            combo_color.Items.Add("YUV410P");
            combo_color.Items.Add("YUV411P");
            combo_color.Items.Add("YUV444P");

            //codertype
            combo_codertype.Items.Add("VLC");
            combo_codertype.Items.Add("AC");

            //context model
            combo_contextmodel.Items.Add("Small");
            combo_contextmodel.Items.Add("Large");

            LoadFromProfile();
            SetToolTips();
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:27,代码来源:FFV1.xaml.cs

示例4: DecodePresets

        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;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:33,代码来源:PresetLoader.cs

示例5: QuickTimeAAC

        public QuickTimeAAC(Massive mass, AudioEncoding AudioEncWindow)
        {
            this.InitializeComponent();

            this.m = mass.Clone();
            this.root_window = AudioEncWindow;

            //--check    Show library versions and exit
            //--formats  Show available AAC formats and exit

            combo_mode.Items.Add("CBR");             //-c, --cbr <bitrate>   AAC CBR mode / bitrate
            combo_mode.Items.Add("ABR");             //-a, --abr <bitrate>   AAC ABR mode / bitrate
            combo_mode.Items.Add("Constrained VBR"); //-v, --cvbr <bitrate>  AAC Constrained VBR mode / bitrate
            combo_mode.Items.Add("True VBR");        //-V, --tvbr <quality>  AAC True VBR mode / quality [0-127] (AAC-HE не поддерживается)
            combo_mode.Items.Add("Lossless (ALAC)"); //-A, --alac            ALAC encoding mode

            combo_accuracy.Items.Add("0 - Fast");
            combo_accuracy.Items.Add("1");
            combo_accuracy.Items.Add("2 - Slow");

            combo_aac_profile.Items.Add("AAC-LC");
            combo_aac_profile.Items.Add("AAC-HE");

            //Предупреждение о неточности битрейта
            combo_bitrate.Tag = Languages.Translate("Do not expect that selected bitrate will be strictly observed by the encoder!") + "\r\n" +
                Languages.Translate("The actual value will varies with encoding mode (ABR/CBR/CVBR), profile (LC/HE), sample rate and number of channels.") + "\r\n" +
                Languages.Translate("Click on \"Bitrate\" label to get detailed information about all supported combinations.");

            text_mode.Content = Languages.Translate("Encoding mode") + ":";
            text_accuracy.Content = Languages.Translate("Accuracy") + ":";

            LoadFromProfile();
        }
开发者ID:BrunoReX,项目名称:xvid4psp,代码行数:33,代码来源:QAAC.xaml.cs

示例6: Normalize

        public Normalize(Massive mass)
        {
            this.InitializeComponent();
            this.Owner = App.Current.MainWindow;
            this.m = mass.Clone();

            //колличество обрабатываемых фреймов
            int accuratepr = Convert.ToInt32(m.volumeaccurate.Replace("%", ""));
            vtrim = Calculate.GetProcentValue(m.inframes, accuratepr);
            if (vtrim < 10000) vtrim = Math.Min(10000, m.inframes);

            //забиваем
            prCurrent.Maximum = vtrim;
            prCurrent.ToolTip = Languages.Translate("Current progress");
            Title = Languages.Translate("Normalizer");
            text_info.Content = Languages.Translate("Please wait... Work in progress...");

            //BackgroundWorker
            CreateBackgroundWorker();
            worker.RunWorkerAsync();

            //Сворачиваем окно, если программа минимизирована или свернута в трей
            if (!Owner.IsVisible || Owner.WindowState == WindowState.Minimized)
            {
                this.WindowState = WindowState.Minimized;
                this.SizeToContent = System.Windows.SizeToContent.Manual;
                this.StateChanged += new EventHandler(Window_StateChanged);
                this.Name = "Hidden";
            }

            ShowDialog();
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:32,代码来源:Normalizer.xaml.cs

示例7: AviSynthEncoder

 public AviSynthEncoder(Massive mass)
 {
     m = mass.Clone();
     this.script = m.script;
     AudioStream stream = (AudioStream)m.outaudiostreams[0];
     this.outfilepath = stream.audiopath;
 }
开发者ID:BrunoReX,项目名称:xvid4psp,代码行数:7,代码来源:AviSynthEncoder.cs

示例8: DecodeLine

        public static Massive DecodeLine(Massive m)
        {
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //создаём свежий массив параметров FFmpeg FLAC
            m.flac_options = new flac_arguments();

            //берём пока что за основу последнюю строку
            string line = outstream.passes;

            string[] separator = new string[] { " " };
            string[] cli = line.Split(separator, StringSplitOptions.None);
            int n = 0;

            foreach (string value in cli)
            {
                if (value == "-compression_level") m.flac_options.level = Convert.ToInt32(cli[n + 1]);
                else if (value == "-use_lpc") m.flac_options.use_lpc = Convert.ToInt32(cli[n + 1]);
                else if (value == "-lpc_coeff_precision ") m.flac_options.lpc_precision = Convert.ToInt32(cli[n + 1]);

                n++;
            }

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:25,代码来源:FFFLAC.xaml.cs

示例9: NeroAAC

        public NeroAAC(Massive mass, AudioEncoding AudioEncWindow)
        {
            this.InitializeComponent();

            this.m = mass.Clone();
            this.root_window = AudioEncWindow;

            combo_mode.Items.Add("CBR");
            combo_mode.Items.Add("VBR");
            combo_mode.Items.Add("ABR");
            combo_mode.Items.Add("ABR 2-Pass");

            combo_aac_profile.Items.Add("Auto");
            combo_aac_profile.Items.Add("AAC-LC");
            combo_aac_profile.Items.Add("AAC-HE");
            combo_aac_profile.Items.Add("AAC-HEv2");

            this.num_period.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_period_ValueChanged);
            num_period.ToolTip = "2-Pass encoding bitrate averaging period, milliseconds. \r\nDefault and recommended: 0 (Auto).\r\n" +
            "\r\nWARNING! Low values may produce crash of neroAacEnc.exe!";

            text_mode.Content = Languages.Translate("Encoding mode") + ":";

            LoadFromProfile();
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:25,代码来源:NeroAAC.xaml.cs

示例10: FFHUFF

        public FFHUFF(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent)
        {
            this.InitializeComponent();

            this.m = mass.Clone();
            this.p = parent;
            this.root_window = VideoEncWindow;

            //прогружаем fourcc
            combo_fourcc.Items.Add("HFYU");
            combo_fourcc.Items.Add("FFVH");

            //прогружаем colorspace
            combo_color.Items.Add("YV12");
            combo_color.Items.Add("YUY2");
            combo_color.Items.Add("RGB32");

            //предиктор
            combo_predictor.Items.Add("Left");
            combo_predictor.Items.Add("Plane");
            combo_predictor.Items.Add("Median");

            LoadFromProfile();
            SetToolTips();
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:25,代码来源:FFHUFF.xaml.cs

示例11: GetFriendFilesList

        public static Massive GetFriendFilesList(Massive m)
        {
            string friendfile;
            ArrayList fileslist = new ArrayList();

            if (Calculate.IsValidVOBName(m.infilepath))
            {
                if (Path.GetFileName(m.infilepath).ToUpper() != "VIDEO_TS.VOB")
                {
                    string title = Calculate.GetTitleNum(m.infilepath);
                    string dir = Path.GetDirectoryName(m.infilepath).TrimEnd(new char[] { '\\' }); //C:\, но C:\Some_Path
                    for (int i = 1; i <= 20; i++)
                    {
                        friendfile = dir + "\\VTS_" + title + "_" + i.ToString() + ".VOB";
                        if (File.Exists(friendfile)) fileslist.Add(friendfile);
                    }

                    //Если каким-то чудесным образом ни одного файла не нашлось
                    if (fileslist.Count == 0) fileslist.Add(m.infilepath);
                }
                else
                    fileslist.Add(m.infilepath);
            }
            else
            {
                fileslist.Add(m.infilepath);
                char[] chars = Path.GetFileNameWithoutExtension(m.infilepath).ToCharArray();
                int pos = 0;
                foreach (char c in chars)
                {
                    pos += 1;
                    string cstring = c.ToString();
                    if (cstring == "1")
                    {
                        string dir = Path.GetDirectoryName(m.infilepath).TrimEnd(new char[] { '\\' }) + "\\"; //Так надо
                        string file_name = Path.GetFileNameWithoutExtension(m.infilepath);
                        string ext = Path.GetExtension(m.infilepath);
                        for (int i = 2; i <= 9; i++)
                        {
                            friendfile = dir + file_name.Remove(pos - 1, 1).Insert(pos - 1, i.ToString()) + ext;
                            if (File.Exists(friendfile)) fileslist.Add(friendfile);
                        }
                    }
                }
            }

            //забиваем все найденные файлы
            m.infileslist = Calculate.ConvertArrayListToStringArray(fileslist);

            //диалог выбора файлов если их больше одного
            if (fileslist.Count > 1)
            {
                FilesListWindow f = new FilesListWindow(m);
                if (f.m != null) m = f.m.Clone();
                else m = null;
            }

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:59,代码来源:Open.cs

示例12: DVDImport

        public DVDImport(Massive mass, string dvdpath)
        {
            this.InitializeComponent();
            this.Owner = App.Current.MainWindow;
            this.m = mass.Clone();
            this.dpi = SysInfo.dpi;

            DDHelper ddh = new DDHelper(this);
            ddh.GotFiles += new DDEventHandler(DD_GotFiles);

            //tooltips
            label_title.Content = Languages.Translate("Select title:");
            button_cancel.Content = Languages.Translate("Cancel");
            button_ok.Content = Languages.Translate("OK");
            button_play.ToolTip = Languages.Translate("Play-Pause");
            button_stop.ToolTip = Languages.Translate("Stop");

            //events
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            this.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing);
            this.KeyUp += new KeyEventHandler(MainWindow_KeyUp);

            //подготавливаем список титлов
            string[] maintitles = Directory.GetFiles(dvdpath, "VTS_*1.VOB", SearchOption.AllDirectories);
            int titlescount = maintitles.Length;

            //если нет ни одного титла
            if (titlescount == 0)
            {
                Message message = new Message(this.Owner);
                message.ShowMessage(Languages.Translate("Can`t find any VOB file in:") +
                    " \"" + dvdpath + "\"!", Languages.Translate("Error"));
                m = null;
                Close();
                return;
            }

            //сортируем и забиваем вобы в список
            dvd = new ArrayList();
            string[] vobs = new string[] { "" };
            for (int n = 0; n < titlescount; n++)
            {
                string title = Calculate.GetTitleNum(maintitles[n]);
                vobs = Directory.GetFiles(dvdpath, "VTS_" + title + "*.VOB", SearchOption.AllDirectories);
                ArrayList vobs_ar = Calculate.ConvertStringArrayToArrayList(vobs);
                if (vobs_ar[0].ToString().ToUpper().EndsWith("0.VOB"))
                    vobs_ar.RemoveAt(0);
                vobs = Calculate.ConvertArrayListToStringArray(vobs_ar);
                dvd.Add(vobs);
            }

            //забиваем и выделяем пустой титл
            combo_titles.Items.Add(Calculate.GetTimeline(0));
            combo_titles.SelectedIndex = 0;
            Title = "DVD: " + Calculate.GetDVDName(vobs[0]);

            this.ShowDialog();
        }
开发者ID:BrunoReX,项目名称:xvid4psp,代码行数:58,代码来源:DVDImport.xaml.cs

示例13: DecodeLine

        public static Massive DecodeLine(Massive m)
        {
            //создаём свежий массив параметров ffmpeg
            m.ffmpeg_options = new ffmpeg_arguments();

            m.encodingmode = Settings.EncodingModes.OnePass;

            //берём пока что за основу последнюю строку
            string line = m.vpasses[m.vpasses.Count - 1].ToString();

            string[] separator = new string[] { " " };
            string[] cli = line.Split(separator, StringSplitOptions.None);
            int n = 0;

            foreach (string value in cli)
            {
                if (value == "-vtag")
                    m.ffmpeg_options.fourcc_dv = cli[n + 1];

                if (value == "-pix_fmt")
                {
                    string dvstandart = cli[n + 1];
                    if (dvstandart == "yuv420p") m.ffmpeg_options.dvpreset = "DVCAM";
                    else if (dvstandart == "yuv411p") m.ffmpeg_options.dvpreset = "DVCPRO25";
                    else if (dvstandart == "yuv422p") m.ffmpeg_options.dvpreset = "DVCPRO50";

                    //dvcam
                    //-f mov -vcodec dvvideo -r 25 -pix_fmt yuv420p -vtag dvcp -acodec pcm_s16be -ac 2

                    //dvcpro25
                    //-f mov -vcodec dvvideo -r 25 -pix_fmt yuv411p -vtag dvpp -acodec pcm_s16be -ac 2

                    //dvcpro50
                    //-f mov -vcodec dvvideo -r 25 -pix_fmt yuv422p -vtag dv5p -acodec pcm_s16be -ac 2
                }

                n++;
            }

            //битрейт
            if (m.format == Format.ExportFormats.AviDVPAL)
            {
                if (m.ffmpeg_options.dvpreset == "DVCPRO50")
                    m.outvbitrate = 57600;
                else
                    m.outvbitrate = 28800;
            }
            if (m.format == Format.ExportFormats.AviDVNTSC)
            {
                if (m.ffmpeg_options.dvpreset == "DVCPRO50")
                    m.outvbitrate = 57543;
                else
                    m.outvbitrate = 28771;
            }

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:57,代码来源:FDV.xaml.cs

示例14: FMP2

        public FMP2(Massive mass, AudioEncoding AudioEncWindow)
        {
            this.InitializeComponent();

            this.m = mass.Clone();
            this.root_window = AudioEncWindow;

            LoadFromProfile();
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:9,代码来源:FMP2.xaml.cs

示例15: DecodeLine

        public static Massive DecodeLine(Massive m)
        {
            AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream];

            //создаём свежий массив параметров QuickTime AAC
            m.qaac_options = new qaac_arguments();

            //берём пока что за основу последнюю строку
            string line = outstream.passes;

            string[] separator = new string[] { " " };
            string[] cli = line.Split(separator, StringSplitOptions.None);
            int n = 0;

            foreach (string value in cli)
            {
                if (value == "-q")
                {
                    m.qaac_options.accuracy = Convert.ToInt32(cli[n + 1]);
                }
                else if (value == "--tvbr")
                {
                    m.qaac_options.encodingmode = Settings.AudioEncodingModes.VBR;
                    m.qaac_options.quality = Convert.ToInt32(cli[n + 1]) / 9;
                }
                else if (value == "--cbr" || value == "--abr" || value == "--cvbr")
                {
                    if (value == "--cbr") m.qaac_options.encodingmode = Settings.AudioEncodingModes.CBR;
                    else if (value == "--abr") m.qaac_options.encodingmode = Settings.AudioEncodingModes.ABR;
                    else m.qaac_options.encodingmode = Settings.AudioEncodingModes.CVBR;

                    outstream.bitrate = Convert.ToInt32(cli[n + 1]);
                }
                else if (value == "--alac")
                {
                    m.qaac_options.encodingmode = Settings.AudioEncodingModes.ALAC;
                }
                else if (value == "--he")
                {
                    m.qaac_options.aacprofile = "AAC-HE";
                }
                else if (value == "--no-delay")
                {
                    m.qaac_options.no_delay = true;
                }
                else if (value == "--gapless-mode")
                {
                    m.qaac_options.gapless_mode = Convert.ToInt32(cli[n + 1]);
                }

                n++;
            }

            return m;
        }
开发者ID:MaksHDR,项目名称:xvid4psp,代码行数:55,代码来源:QAAC.xaml.cs


注:本文中的XviD4PSP.Massive类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。