コード例 #1
0
        public TimeShiftCommentGetter_xml(
            string userId, RecordingManager rm,
            RecordFromUrl rfu, MainForm form,
            long openTime, string[] recFolderFile,
            string lvid, CookieContainer container,
            string programType, long _openTime,
            WebSocketRecorder rp, int startSecond,
            bool isVposStartTime, bool isRtmp)
        {
//			this.uri = util.getRegGroup(message, "messageServerUri\"\\:\"(ws.+?)\"");
//			this.thread = util.getRegGroup(message, "threadId\":\"(.+?)\"");
            this.rm            = rm;
            this.rfu           = rfu;
            this.userId        = userId;
            this.form          = form;
            this.openTime      = openTime;
            this.recFolderFile = recFolderFile[1];
            this.lvid          = lvid;
            this.container     = container;
            this.isGetXml      = bool.Parse(rm.cfg.get("IsgetcommentXml"));
//			this.programType = programType;
            this._openTime   = _openTime;
            this.rp          = rp;
            this.startSecond = startSecond;
            //this.tsConfig = tsConfig;
            this.isVposStartTime = isVposStartTime;
            this.isRtmp          = isRtmp;
        }
コード例 #2
0
 public RecordFromUrl(RecordingManager rm)
 {
     this.rm = rm;
     //CookieContainer container = new CookieContainer();
     //container.Add(cookie);
     //this.container = container;
 }
コード例 #3
0
 public JikkenRecordProcess(
     CookieContainer container, string[] recFolderFile,
     RecordingManager rm, RecordFromUrl rfu,
     JikkenRecorder jr, long openTime,
     bool isTimeShift, string lvid,
     TimeShiftConfig tsConfig, string userId,
     bool isPremium, TimeSpan programTime,
     WatchingInfo wi, long releaseTime, bool isSub, bool isRtmp)
 {
     this.container     = container;
     this.recFolderFile = recFolderFile;
     this.rm            = rm;
     this.rfu           = rfu;
     this.jr            = jr;
     this.openTime      = openTime;
     this.isTimeShift   = isTimeShift;
     this.lvid          = lvid;
     this.tsConfig      = tsConfig;
     this.userId        = userId;
     this.isPremium     = isPremium;
     this.programTime   = programTime;
     this.wi            = wi;
     this.msUri         = wi.msUri;
     isGetCommentXml    = bool.Parse(rm.cfg.get("IsgetcommentXml"));
     isJikken           = true;
     this.releaseTime   = releaseTime;
     this.isSub         = isSub;
     this.isRtmp        = isRtmp;
 }
コード例 #4
0
 public AnotherEngineRecorder(RecordingManager rm, RecordFromUrl rfu, Record rec)
 {
     this.rm  = rm;
     this.rfu = rfu;
     ext      = rfu.h5r.isFmp4 ? ".mp4" : ".ts";
     this.rec = rec;
 }
コード例 #5
0
        public FFMpegConcat(RecordingManager rm, RecordFromUrl rfu)
        {
            this.rm = rm;
//			this.isFFmpeg = isFFmpeg;
            this.rfu         = rfu;
            afterConvertMode = int.Parse(rm.cfg.get("afterConvertMode"));
        }
コード例 #6
0
 public NotHtmlCommentGetter(string[] messageInfo, RecordingManager rm, RecordFromUrl rfu, string[] recFolderFileInfo)
 {
     //0-url 1-port 2-thread
     this.messageInfo       = messageInfo;
     this.rm                = rm;
     this.rfu               = rfu;
     this.recFolderFileInfo = recFolderFileInfo;
 }
コード例 #7
0
 public NotHtml5Recorder(string url, CookieContainer container,
                         string lvid, RecordingManager rm, RecordFromUrl rfu)
 {
     this.url       = url;
     this.container = container;
     this.lvid      = lvid;
     this.rm        = rm;
     this.rfu       = rfu;
 }
コード例 #8
0
 public ChaseHokan(numTaskInfo nti, int lastSegmentNo, string[] name,
                   string lvid, RecordingManager rm, Html5Recorder h5r)
 {
     this.nti           = nti;
     this.lastSegmentNo = lastSegmentNo;
     this.name          = name;
     this.lvid          = lvid;
     this.rm            = rm;
     this.h5r           = h5r;
 }
コード例 #9
0
        public DropSegmentProcess(DateTime _lastWroteSegmentDt, int _lastSegmentNo, Record rec, string recFolderFileOrigin, RecordFromUrl rfu, RecordingManager rm, Html5Recorder h5r)
        {
//			this.nti = s;
            this.lastWroteSegmentDt = _lastWroteSegmentDt;
            this.lastSegmentNo      = _lastSegmentNo;
            this.rec = rec;
            this.recFolderFileOrigin = recFolderFileOrigin;
            this.rfu = rfu;
            this.rm  = rm;
            this.h5r = h5r;
        }
コード例 #10
0
 public Html5Recorder(string url, CookieContainer container,
                      string lvid, RecordingManager rm, RecordFromUrl rfu,
                      bool isTimeShift)
 {
     this.url         = url;
     this.container   = container;
     this.lvid        = lvid;
     this.rm          = rm;
     this.rfu         = rfu;
     this.isTimeShift = isTimeShift;
     //this.isSub = isSub;
 }
コード例 #11
0
 public RecordStateSetter(MainForm form, RecordingManager rm, RecordFromUrl rfu, bool isTimeShift, bool isJikken, string[] recFolderFile, bool isPlayOnlyMode, bool isRtmpOnlyPage, bool isChase)
 {
     this.form             = form;
     this.rm               = rm;
     this.rfu              = rfu;
     this.isTimeShift      = isTimeShift;
     this.isJikken         = isJikken;
     this.recFolderFile    = recFolderFile;
     this.isPlayOnlyMode   = isPlayOnlyMode;
     this.isDescriptionTag = bool.Parse(rm.cfg.get("IsDescriptionTag"));
     this.isRtmpOnlyPage   = isRtmpOnlyPage;
     this.isChase          = isChase;
 }
コード例 #12
0
 public ChaseLastRecord(string lvid,
                        CookieContainer container, RecordingManager rm,
                        string[] recFolderFileInfo, long openTime,
                        Html5Recorder h5r, TimeShiftConfig tsConfig, RecordFromUrl rfu)
 {
     this.lvid              = lvid;
     this.container         = container;
     this.rm                = rm;
     this.recFolderFileInfo = recFolderFileInfo;
     this.openTime          = openTime;
     this.h5r               = h5r;
     this.tsConfig          = tsConfig;
     this.rfu               = rfu;
 }
コード例 #13
0
        public RtmpRecorder(string lvid, CookieContainer container,
                            RecordingManager rm, RecordFromUrl rfu, bool isSub,
                            string[] recFolderFile, IRecorderProcess wr, long openTime)
        {
//			this.getPlayerStatusRes = getPlayerStatusRes;
            this.lvid      = lvid;
            this.container = container;
//			this.cfg = cfg;
            this.rm            = rm;
            this.rfu           = rfu;
            this.isSub         = isSub;
            this.wr            = wr;
            this.openTime      = openTime;
            this.recFolderFile = recFolderFile[1];
            rm.isTitleBarInfo  = bool.Parse(rm.cfg.get("IstitlebarInfo"));
            afterConvertMode   = int.Parse(rm.cfg.get("afterConvertMode"));
        }
コード例 #14
0
 public XmlCommentGetter_ontime(string lvid,
                                CookieContainer container, RecordingManager rm,
                                RecordFromUrl rfu, string recFolderFile,
                                IRecorderProcess rp, bool isTimeShift, bool isRtmp,
                                long openTime, long _openTime, long serverTime)
 {
     this.lvid            = lvid;
     this.container       = container;
     this.rm              = rm;
     this.rfu             = rfu;
     this.recFolderFile   = recFolderFile;
     this.rp              = rp;
     this.isTimeShift     = isTimeShift;
     this.isRtmp          = isRtmp;
     this.isGetComment    = rm.cfg.get("IsgetComment");
     this.isGetCommentXml = rm.cfg.get("IsgetcommentXml");
     this.openTime        = openTime;
     this._openTime       = _openTime;
     this.serverTime      = serverTime;
 }
コード例 #15
0
        public TimeShiftCommentGetter(string uri, string thread,
                                      string uriStore, string threadStore,
                                      string userId, RecordingManager rm,
                                      RecordFromUrl rfu, MainForm form,
                                      long openTime, string recFolderFile,
                                      string lvid, CookieContainer container,
                                      string programType, long _openTime,
                                      WebSocketRecorder rp, int startSecond,
                                      bool isVposStartTime, bool isRtmp,
                                      RtmpRecorder rr, RecordStateSetter rss,
                                      string roomName, TimeShiftConfig tsConfig)
        {
            this.uri    = uri;
            this.thread = thread;

            this.rm                  = rm;
            this.rfu                 = rfu;
            this.userId              = userId;
            this.form                = form;
            this.openTime            = openTime;
            this.recFolderFile       = recFolderFile;
            this.lvid                = lvid;
            this.container           = container;
            this.isGetXml            = bool.Parse(rm.cfg.get("IsgetcommentXml"));
            this.isGetCommentXmlInfo = bool.Parse(rm.cfg.get("IsgetcommentXmlInfo"));
            this.programType         = programType;
            this._openTime           = _openTime;
            this.rp                  = rp;
            this.startSecond         = startSecond;
            //this.tsConfig = tsConfig;
            this.isVposStartTime = isVposStartTime;
            this.isRtmp          = isRtmp;
            this.rr            = rr;
            isConvertSpace     = bool.Parse(rm.cfg.get("IsCommentConvertSpace"));
            isNormalizeComment = bool.Parse(rm.cfg.get("IsNormalizeComment"));
            this.roomName      = roomName;
            this.tsConfig      = tsConfig;

            this.uriStore    = uriStore;
            this.threadStore = threadStore;
        }
コード例 #16
0
        public WebSocketRecorder(string[] webSocketInfo,
                                 CookieContainer container, string[] recFolderFile,
                                 RecordingManager rm, RecordFromUrl rfu,
                                 Html5Recorder h5r, long openTime,
                                 int lastSegmentNo, bool isTimeShift, string lvid,
                                 TimeShiftConfig tsConfig, string userId,
                                 bool isPremium, TimeSpan programTime,
                                 string programType, long _openTime, bool isSub, bool isRtmp,
                                 string latency
                                 )
        {
            this.webSocketInfo = webSocketInfo;
            this.container     = container;
            this.recFolderFile = recFolderFile;
            this.rm            = rm;
            this.rfu           = rfu;
            this.h5r           = h5r;
            this.openTime      = openTime;
            this.lastSegmentNo = lastSegmentNo;
            this.isTimeShift   = isTimeShift;
            this.lvid          = lvid;
            this.tsConfig      = tsConfig;
            this.userId        = userId;
            this.isPremium     = isPremium;
            this.programTime   = programTime;
            isJikken           = false;
            this.programType   = programType;
            this._openTime     = _openTime;
            this.isSub         = isSub;
            this.isRtmp        = isRtmp;

            this.qualityRank     = rm.cfg.get("qualityRank");
            this.isGetComment    = rm.cfg.get("IsgetComment");
            this.isGetCommentXml = rm.cfg.get("IsgetcommentXml");
            this.engineMode      = rm.cfg.get("EngineMode");
            selectLatency        = latency;
        }
コード例 #17
0
        public JikkenRecorder(string res, string lvid, CookieContainer container, config.config config, RecordingManager rm, RecordFromUrl rfu, bool isSub)
        {
            this.lvid      = lvid;
            this.container = container;
            this.config    = config;
            this.rm        = rm;
            this.rfu       = rfu;
            var data = util.getRegGroup(res, "<script id=\"embedded-data\" data-props=\"([\\d\\D]+?)</script>");

            status = (data == null) ? null : util.getRegGroup(data, "&quot;status&quot;:&quot;(.+?)&quot;");
            //if (status != "ON_AIR" && status != "ENDED") return 5;
            isLive             = status == "ON_AIR";
            isTimeshiftEnabled = res.IndexOf("isTimeshiftEnabled&quot;:true") > -1;
//			userId = util.getRegGroup(res, "\"user_id\"\\:(\\d+),");
            var _isBroadcaster = util.getRegGroup(data, "&quot;isBroadcaster&quot;\\:(.+?),");

            if (_isBroadcaster != null)
            {
                isBroadcaster = bool.Parse(_isBroadcaster);
            }
            isBroadcaster = false;
            actionTrackId = getActionTrackId();
            //maxQuality = util.getRegGroup(data, "&quot;maxQuality&quot;\\:&quot;(.+?)&quot;");

            watchingUrl = "https://api.cas.nicovideo.jp/v1/services/live/programs/" + lvid + "/watching" +
                          ((isLive) ? "" : "-archive");
            this.streamCapacity = util.getRegGroup(data, "&quot;maxQuality&quot;\\:&quot;(.+?)&quot;");
            util.debugWriteLine("maxQuality " + streamCapacity + util.getMainSubStr(isSub, true));
            //var wc = new WebHeaderCollection();
            //var watchingRes = util.getPageSource
//				public static int getPageTypeJikken(string res) {

//			if (res.IndexOf("<!doctype html>") > -1 && data != null && status == "ON_AIR") return 0;
//			else if (res.IndexOf("<!doctype html>") > -1 && data != null && status == "ENDED") return 7;
            this.isSub = isSub;
        }
コード例 #18
0
 public ThroughFFMpeg(RecordingManager rm)
 {
     this.rm = rm;
 }
コード例 #19
0
 public AnotherEngineRecorder(RecordingManager rm, RecordFromUrl rfu)
 {
     this.rm  = rm;
     this.rfu = rfu;
 }
コード例 #20
0
 public ArgConcat(RecordingManager rm, string[] arr)
 {
     this.rm  = rm;
     this.arr = arr;
 }
コード例 #21
0
 public RecordFromUrl(RecordingManager rm, bool isPlayOnlyMode)
 {
     this.rm             = rm;
     isRtmpMain          = rm.cfg.get("EngineMode") == "2";
     this.isPlayOnlyMode = isPlayOnlyMode;
 }
コード例 #22
0
 public FFMpegRecord(RecordingManager rm, bool isFFmpeg, RecordFromUrl rfu)
 {
     this.rm       = rm;
     this.isFFmpeg = isFFmpeg;
     this.rfu      = rfu;
 }
コード例 #23
0
        public MainForm(string[] args)
        {
            madeThread = Thread.CurrentThread;

            //args = "-nowindo -stdIO -IsmessageBox=false -IscloseExit=true lv316762771 -ts-start=1785s -ts-end=0s -ts-list=false -ts-list-m3u8=false -ts-list-update=5 -ts-list-open=false -ts-list-command=\"notepad{i}\" -ts-vpos-starttime=true -afterConvertMode=4 -qualityRank=0,1,2,3,4,5 -IsLogFile=true".Split(' ');
            //read std
            if (Array.IndexOf(args, "-std-read") > -1)
            {
                startStdRead();
            }

            /*
             * if (false && !isFullAccessDirectory()) {
             *      MessageBox.Show("このディレクトリーにはファイルの読み書き権限がありませんでした。別のフォルダに移すかフォルダに権限を付与してください。");
             *      System.Environment.Exit(0);
             * }
             */

            System.Diagnostics.Debug.Listeners.Clear();
            System.Diagnostics.Debug.Listeners.Add(new Logger.TraceListener());

            InitializeComponent();
            Text    = "ニコ生新配信録画ツール(仮 " + util.versionStr;
            defIcon = Icon;

            this.args = args;

            rec    = new rec.RecordingManager(this, config);
            player = new Player(this, config);

            if (Array.IndexOf(args, "-stdIO") > -1)
            {
                util.isStdIO = true;
            }



            util.debugWriteLine("arg len " + args.Length);
            util.debugWriteLine("arg join " + string.Join(" ", args));


            //nicoSessionComboBox1.Selector.PropertyChanged += Selector_PropertyChanged;
//            checkBoxShowAll.Checked = bool.Parse(config.get("isAllBrowserMode"));
            //if (isInitRun) initRec();
            //MessageBox.Show(config.get("Isminimized") + " " + config.get("Width") + " " + config.get("Height") + " " + config.get("X") + " " + config.get("Y"));

            try {
                Width  = int.Parse(config.get("Width"));
                Height = int.Parse(config.get("Height"));
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
            }

            try {
                if (bool.Parse(config.get("IsRestoreLocation")))
                {
                    var x = config.get("X");
                    var y = config.get("Y");
                    if (x != "" && y != "" && int.Parse(x) >= 0 && int.Parse(y) >= 0)
                    {
                        StartPosition = FormStartPosition.Manual;
                        Location      = new Point(int.Parse(x), int.Parse(y));
                    }
                }
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
                StartPosition = FormStartPosition.WindowsDefaultLocation;
            }

            if (bool.Parse(config.get("IsMiniStart")))
            {
                changeSize(true);
            }
            setBackColor(Color.FromArgb(int.Parse(config.get("recBackColor"))));
            setForeColor(Color.FromArgb(int.Parse(config.get("recForeColor"))));
            setLinkColor(Color.FromArgb(int.Parse(config.get("recLinkColor"))));
        }
コード例 #24
0
        public MainForm(string[] args)
        {
            madeThread = Thread.CurrentThread;

                        #if !DEBUG
            FormBorderStyle = FormBorderStyle.FixedSingle;
//				if (config.get("IsLogFile") == "true")
//					config.set("IsLogFile", "false");
                        #endif

            System.Diagnostics.Debug.Listeners.Clear();
            System.Diagnostics.Debug.Listeners.Add(new Logger.TraceListener());

            InitializeComponent();
            Text = "視聴プラグイン(仮 " + util.versionStr;

            this.args = args;

            rec    = new rec.RecordingManager(this, config);
            player = new Player(this, config);

            if (Array.IndexOf(args, "-stdIO") > -1)
            {
                util.isStdIO = true;
            }

            var lv = (args.Length == 0) ? null : util.getRegGroup(args[0], "(lv\\d+(,\\d+)*)");
            util.setLog(config, lv);



            util.debugWriteLine("arg len " + args.Length);
            util.debugWriteLine("arg join " + string.Join(" ", args));


            //nicoSessionComboBox1.Selector.PropertyChanged += Selector_PropertyChanged;
//            checkBoxShowAll.Checked = bool.Parse(config.get("isAllBrowserMode"));
            //if (isInitRun) initRec();
            try {
                //Width = int.Parse(config.get("Width"));
                //Height = int.Parse(config.get("Height"));
                Width  = 492;
                Height = 201;
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
            }
            try {
                var x = config.get("X");
                var y = config.get("Y");
                if (x != "" && y != "")
                {
                    StartPosition = FormStartPosition.Manual;
                    Location      = new Point(int.Parse(x), int.Parse(y));
                }
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
                StartPosition = FormStartPosition.WindowsDefaultLocation;
            }

            setBackColor(Color.FromArgb(int.Parse(config.get("recBackColor"))));
            setForeColor(Color.FromArgb(int.Parse(config.get("recForeColor"))));

            if (bool.Parse(config.get("Isminimized")))
            {
                WindowState = FormWindowState.Minimized;
                if (bool.Parse(config.get("IsMinimizeNotify")))
                {
                    Visible       = false;
                    ShowInTaskbar = false;
                }
            }

            var qr  = config.get("qualityRank").Split(',').ToList();
            var qrD = config.defaultConfig["qualityRank"].Split(',');
            if (qr.Count != qrD.Length)
            {
                foreach (var q in qrD)
                {
                    if (qr.IndexOf(q) == -1)
                    {
                        qr.Add(q);
                    }
                }
            }
            config.set("qualityRank", string.Join(",", qr.ToArray()));
        }
コード例 #25
0
        public MainForm(string[] args)
        {
            string lv = null;

            foreach (var arg in args)
            {
                lv = util.getRegGroup(arg, "(lv\\d+(,\\d+)*)");
                if (lv != null)
                {
                    break;
                }
            }
            util.setLog(config, lv);

            madeThread = Thread.CurrentThread;

            //read std
            if (Array.IndexOf(args, "-std-read") > -1)
            {
                startStdRead();
            }

            System.Diagnostics.Debug.Listeners.Clear();
            System.Diagnostics.Debug.Listeners.Add(new Logger.TraceListener());

            InitializeComponent();
            Text    = "ニコ生新配信録画ツール(仮 " + util.versionStr;
            defIcon = Icon;

            this.args = args;

            rec    = new rec.RecordingManager(this, config);
            player = new Player(this, config);

            if (Array.IndexOf(args, "-stdIO") > -1)
            {
                util.isStdIO = true;
            }

            util.debugWriteLine("arg len " + args.Length);
            util.debugWriteLine("arg join " + string.Join(" ", args));

            var fontSize = config.get("fontSize");

            if (fontSize != "9")
            {
                util.setFontSize(int.Parse(fontSize), this, true, 400);
            }

            try {
                Width  = int.Parse(config.get("Width"));
                Height = int.Parse(config.get("Height"));
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
            }

            try {
                if (bool.Parse(config.get("IsRestoreLocation")))
                {
                    var x = config.get("X");
                    var y = config.get("Y");
                    if (x != "" && y != "" && int.Parse(x) >= 0 && int.Parse(y) >= 0)
                    {
                        StartPosition = FormStartPosition.Manual;
                        Location      = new Point(int.Parse(x), int.Parse(y));
                    }
                }
            } catch (Exception e) {
                util.debugWriteLine(e.Message + " " + e.StackTrace + " " + e.Source + " " + e.TargetSite);
                StartPosition = FormStartPosition.WindowsDefaultLocation;
            }

            if (bool.Parse(config.get("IsMiniStart")))
            {
                changeSize(true);
            }

            if (config.get("qualityRank").Split(',').Length == 5)
            {
                config.set("qualityRank", config.get("qualityRank") + ",5");
            }

            changeRecBtnClickEvent(bool.Parse(config.get("IsRecBtnOnlyMouse")));
        }
コード例 #26
0
 public OutputTimeShiftTsUrlList(TimeShiftConfig tsConfig, RecordingManager rm)
 {
     this.tsConfig = tsConfig;
     this.rm       = rm;
     ext           = rm.rfu.h5r.isFmp4 ? ".mp4" : ".ts";
 }