Exemple #1
0
        // 停止录制
        private void RecordStop()
        {
            t2 = DateTime.Now;
            if (sbRecordTea.Value && teaVideoPreviewerId > 0)
            {
                m_csAVFrm.stopRecordMp4(teaRtspRecorderId);
            }
            if (sbRecordScreen.Value && stuVideoPreviewerId > 0)
            {
                m_csAVFrm.stopRecordMp4(stuRtspRecorderId);
            }
            if (sbRecordScreen.Value && screenVideoPreviewerId > 0)
            {
                m_csAVFrm.stopRecordMp4(screenRecorderId);
            }
            lbRecordTime.Text = Convert.ToDateTime((t2 - t1).ToString()).ToString("HH:mm:ss");
            isRecord          = false;

            btnRecordControl.Text  = "开始录制";
            btnRecordControl.Image = Properties.Resources.record;
            btnPlay.Enabled        = true;

            timer1.Stop();
            CopyTemplate();

            FileInfo screenVideoFileInfo = new FileInfo(screenVideoFileName);

            if (screenVideoFileInfo.Exists)
            {
                resource.File    = screenVideoFileInfo;
                resource.Apptype = AppType.录播;
                AppInterface.CreateNewResource(resource);
            }

            FileInfo teaVideoFileInfo = new FileInfo(teaVideoFileName);

            if (teaVideoFileInfo.Exists)
            {
                resource.File    = teaVideoFileInfo;
                resource.Apptype = AppType.录播;
                AppInterface.CreateNewResource(resource);
            }

            FileInfo stuVideoFileInfo = new FileInfo(stuVideoFileName);

            if (stuVideoFileInfo.Exists)
            {
                resource.File    = stuVideoFileInfo;
                resource.Apptype = AppType.录播;
                AppInterface.CreateNewResource(resource);
            }

            resource.File    = new FileInfo(palyPage);
            resource.Apptype = AppType.录播;
            AppInterface.CreateNewResource(resource);

            RLog.ToDB("停止录像,生成新资源:" + packName);
        }
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            var font      = Content.Load <SpriteFont>("font");
            var uiDisplay = Content.Load <Texture2D>("interface");

            _interface = new AppInterface(GraphicsDevice, font, uiDisplay);

            /*
             * Points are displayed as 2D so-called billboards.
             * Each point is represented as a flat square composed of two triangles.
             * When camera moves, these flat squares rotate to be always in front of the camera.
             * Drawing such amount of points as 3D models would be impossible on mobile devices.
             * This effect was used in old video games - notice how the trees are rendered: https://www.youtube.com/watch?v=h-U889j84O8
             * */
            var billBoardEffect = Content.Load <Effect>("BillBoard");

            _point2dSystem = new Point2dSystem(_camera, billBoardEffect, GraphicsDevice, _allRealColors);
        }
Exemple #3
0
 //Initiate the app while launching
 private void backgroundWorker1_DoWork_1(object sender, DoWorkEventArgs e)
 {
     for (int i = 1; i <= 1000; i++)
     {
         // Wait 100 milliseconds.
         if ((i < 350) | (i > 700))
         {
             System.Threading.Thread.Sleep(1);
         }
         // Report progress.
         backgroundWorker1.ReportProgress(i);
         if (i == 899)
         {
             _started = true;
         }
         if (i == 900)
         {
             _app = new AppInterface(4568);
         }
         if (i == 901)
         {
             _app.NetworkStart();
         }
         if (i == 902)
         {
             SetLocalIP();
         }
         if (i == 903)
         {
             backgroundWorker2.RunWorkerAsync();
         }
         if (i == 904)
         {
             _draw = true;
         }
         if (i == 905)
         {
             file = new System.IO.StreamWriter(@"C:\Users\Alexandros\Desktop\stats.txt", true);
         }
     }
 }
Exemple #4
0
 //Stop Stream Button
 private void metroTile4_Click(object sender, EventArgs e)
 {
     _app.Dispose();
     _app = new AppInterface(4568);
     _app.NetworkStart();
 }