void IDeckLinkScreenPreviewCallback.DrawFrame(IDeckLinkVideoFrame theFrame) { // First, pass the frame to the DeckLink screen preview helper m_previewHelper.SetFrame(theFrame); SetTimecode(theFrame); // Then draw the frame to the scene Render(); System.Runtime.InteropServices.Marshal.ReleaseComObject(theFrame); }
void IDeckLinkScreenPreviewCallback.DrawFrame(IDeckLinkVideoFrame theFrame) { // First, pass the frame to the DeckLink screen preview helper //if (theFrame == null) //{ // return; //} try { if (previewHelper != null) { previewHelper.SetFrame(theFrame); Render(); } } finally { Marshal.ReleaseComObject(theFrame); } }