Example #1
0
        public static void Stop()
        {
            Thread th = new Thread(delegate()
            {
                FMLE.Stop();
                NLE.Stop();
                XSplit.Stop();
            });

            th.Name = "NivoLive.HQ.Stop()";
            th.Start();
        }
Example #2
0
        //-------------------------------------------------------------------------
        // 外部エンコーダー起動
        //-------------------------------------------------------------------------
        public static void Exec(string LiveID)
        {
            Thread th = new Thread(delegate()
            {
                // NLE
                if (Properties.Settings.Default.use_nle)
                {
                    if (NLE.IsAlive)
                    {
                        NLE.Start();
                        using (Bouyomi bm = new Bouyomi())
                        {
                            bm.Talk("えぬえるいー配信を開始します。");
                        }
                    }
                    else
                    {
                        using (Bouyomi bm = new Bouyomi())
                        {
                            bm.Talk("えぬえるいー配信なんてなかった。");
                        }
                    }
                    return;
                }

                // XSplit
                if (Properties.Settings.Default.use_xsplit)
                {
                    XSplit.Start();
                    using (Bouyomi bm = new Bouyomi())
                    {
                        bm.Talk("エックスプリット配信を開始します。");
                    }
                    return;
                }


                // FME
                if (Properties.Settings.Default.use_fme)
                {
                    string path = Properties.Settings.Default.fmle_profile_path + "\\" + Properties.Settings.Default.fmle_default_profile;;

                    if (!File.Exists(path) && !Properties.Settings.Default.use_xsplit && !Properties.Settings.Default.use_nle)
                    {
                        using (Bouyomi bm = new Bouyomi())
                        {
                            bm.Talk("えふえむいープロファイルが見つかりませんでした");
                        }
                        return;
                    }
                    Nico nico = Nico.Instance;
                    string fmle_profile_path = Properties.Settings.Default.fmle_profile_path + "\\" + Properties.Settings.Default.fmle_default_profile;

                    string lv = LiveID;
                    if (lv.Length > 2)
                    {
                        Dictionary <string, string> fme_profiles = nico.GetFMEProfile(lv);
                        if (fme_profiles == null)
                        {
                            return;
                        }
                        if (fme_profiles.Count <= 1)
                        {
                            return;
                        }
                        if (fme_profiles["status"].Equals("ok"))
                        {
                            FMLE.Start(fme_profiles, fmle_profile_path);
                        }
                    }
                }
            });

            th.Name = "NivoLive.HQ.Exec(): FME";
            th.Start();
        }