示例#1
0
        /// <summary>
        /// SetScreenPreviewCallback
        /// </summary>
        public void DrawFrame(IDeckLinkVideoFrame theFrame)
        {
            if (theFrame == null)
            {
                return;
            }
            try
            {
                if (!_Streaming)
                {
                    return;
                }

                Interlocked.Increment(ref _PreviewCount);
                Run(() => previewCount.Text = _PreviewCount.ToString());

                _GLHelper.SetFrame(theFrame);

                previewBox.MakeCurrent();

                _GLHelper.PaintGL();

                previewBox.SwapBuffers();
                previewBox.Context.MakeCurrent(null);
            }
            finally
            {
                Marshal.ReleaseComObject(theFrame);
            }
        }
示例#2
0
 public void GLDrawFrame()
 {
     if (!glIsInitialized)
     {
         return;
     }
     m_previewHelper.PaintGL();
 }