Esempio n. 1
0
        static void xfer_XferNotify(object sender, SapXferNotifyEventArgs args)
        {
            // refresh view
            SapView View = args.Context as SapView;

            View.Show();

            // refresh frame rate
            SapTransfer transfer = sender as SapTransfer;

            if (transfer.UpdateFrameRateStatistics())
            {
                SapXferFrameRateInfo stats = transfer.FrameRateStatistics;
                float framerate            = 0.0f;

                if (stats.IsLiveFrameRateAvailable)
                {
                    framerate = stats.LiveFrameRate;
                }

                // check if frame rate is stalled
                if (stats.IsLiveFrameRateStalled)
                {
                    Console.WriteLine("Live Frame rate is stalled.");
                }

                // update FPS only if the value changed by +/- 0.1
                else if ((framerate > 0.0f) && (Math.Abs(lastFrameRate - framerate) > 0.1f))
                {
                    Console.WriteLine("Grabbing at {0} frames/sec", framerate);
                    lastFrameRate = framerate;
                }
            }
        }
Esempio n. 2
0
 private void Slider_Scroll(object sender, EventArgs e)
 {
     if (m_pView != null && m_pView.Initialized)
     {
         m_pView.Buffer.Index = Slider.Value;
         m_pView.Show();
     }
 }
Esempio n. 3
0
        static void Xfer_XferNotify(object sender, SapXferNotifyEventArgs args)
        {
            SapView view = args.Context as SapView;

            view.Show();
        }