public int PresentImage(IntPtr dwUserID, ref VMR9PresentationInfo lpPresInfo) { if ((object)lpPresInfo == null) { return(E_POINTER); } else if (lpPresInfo.lpSurf == IntPtr.Zero) { return(E_POINTER); } lock (m_csLock) { Surface _source = Surface.FromPointer(lpPresInfo.lpSurf); if (_source != null && OnSurfaceReady != null) { if (m_PrivateTexture != null) { Surface _target = m_PrivateTexture.GetSurfaceLevel(0); m_Device.StretchRectangle(_source, _target, TextureFilter.None); OnSurfaceReady(ref _target); } else { OnSurfaceReady(ref _source); } } } return(NOERROR); }
public int PresentImage(IntPtr dwUserID, ref VMR9PresentationInfo lpPresInfo) { if ((object)lpPresInfo == null) { return E_POINTER; } else if (lpPresInfo.lpSurf == IntPtr.Zero) { return E_POINTER; } lock (m_csLock) { Surface _source = Surface.FromPointer(lpPresInfo.lpSurf); if (_source != null && OnSurfaceReady != null) { if (m_PrivateTexture != null) { Surface _target = m_PrivateTexture.GetSurfaceLevel(0); m_Device.StretchRectangle(_source, _target, TextureFilter.None); OnSurfaceReady(ref _target); } else { OnSurfaceReady(ref _source); } } } return NOERROR; }