Ejemplo n.º 1
0
        private const long MediaChID = 1; //camera ID

        private static void SendingFrames()
        {
            VideoHub videoHub = new VideoHub();

            while (play)
            {
                try
                {
                    Thread.Sleep(GetTimeSleep()); // we calculate time span for 25FPS
                    videoHub.Send(v.GetFrame());
                }
                catch (Exception ex)
                {
                    Logger.ERROR(MethodBase.GetCurrentMethod(), "Error sending frames", ex);
                }
            }
        }
Ejemplo n.º 2
0
        public static void Picture()
        {
            //Send first frame

            VideoHub videoHub = new VideoHub();

            v.Viewer(GngViewerPlayMode.pmPlayForward, MediaChID);

            //wait until we have images in queue
            while (v.images.Count < 1)
            {
                ;
            }

            videoHub.Send(v.GetFrame());

            v.Dispose();
        }