MissionPlanner.OSDVideo.GetBitMap C# (CSharp) Method

GetBitMap() public method

capture the next image
public GetBitMap ( ) : IntPtr
return IntPtr
        public IntPtr GetBitMap()
        {
            if (m_handle == IntPtr.Zero)
                m_handle = Marshal.AllocCoTaskMem(m_stride*m_videoHeight);

            try
            {
                // Start waiting
                //  if (!m_PictureReady.WaitOne(5000, false))
                {
                    //throw new Exception("Timeout waiting to get picture");
                }
            }
            catch
            {
                Marshal.FreeCoTaskMem(m_handle);
                throw;
            }

            // Got one
            return m_handle;
        }