Exemplo n.º 1
0
        private void boxTimerTick(object sender, EventArgs e)
        {
            player = new VLCPlayer();
            string state = player.playerState(axVLCPlugin21.input.state); // input state 값을 문자열 상태로 변환

            textBox2.Text = state;
        }
Exemplo n.º 2
0
        // 모니터링 주요 로직
        private void Timer_Tick(object sender, EventArgs e)
        {
            player = new VLCPlayer();
            string state = player.playerState(axVLCPlugin21.input.state);        // input state 값을 문자열 상태로 변환

            System.Console.WriteLine("plugin fps : " + axVLCPlugin21.input.fps); // 1만찍힘


            LogFile logFile = new LogFile();

            if (state != "PLAYING")
            {
                cnt++; // 에러 카운트 증가
                logFile.log("error state : " + state + ", error count : " + cnt);
                if (cnt % playerRestart == 0)
                {
                    axVLCPlugin21.playlist.stop();
                    axVLCPlugin21.playlist.play();
                    logFile.log("Player restart!");
                }

                // 최초 문자는 문제 발생 후 30초, 1회 발송 후 3분 간격으로 발송
                if (sendSMS == "N" && cnt % sendFirstSMS == 0)
                {
                    System.Diagnostics.Process.Start("http://"); //테스트 URL 열기
                    //System.Diagnostics.Process.Start("http://www.kidis.co.kr/sms_gmedia_send.php"); //문자 발송

                    logFile.log("Send error msg! / " + sendSMS);
                    sendSMS = "Y";
                }
                else if (sendSMS == "Y" && cnt % sendNextSMS == 0)
                {
                    System.Diagnostics.Process.Start("http://"); //테스트 URL 열기
                    //System.Diagnostics.Process.Start("http://www.kidis.co.kr/sms_gmedia_send.php"); //문자 발송
                    logFile.log("Send error msg! / " + sendSMS);
                }
            }
            else
            {
                cnt     = 0;
                sendSMS = "N";
                logFile.log("player state : " + state + ", error count : " + cnt);
            }
        }