MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / UpdateAlphaBitmapParameters

Method UpdateAlphaBitmapParameters

Source/DX11VideoProcessor.cpp:4585–4611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4583}
4584
4585STDMETHODIMP CDX11VideoProcessor::UpdateAlphaBitmapParameters(const MFVideoAlphaBitmapParams *pBmpParms)
4586{
4587 CheckPointer(pBmpParms, E_POINTER);
4588 CAutoLock cRendererLock(&m_pFilter->m_RendererLock);
4589
4590 if (m_bAlphaBitmapEnable) {
4591 if (pBmpParms->dwFlags & MFVideoAlphaBitmap_SrcRect) {
4592 m_AlphaBitmapRectSrc = pBmpParms->rcSrc;
4593 m_pAlphaBitmapVertex.Release();
4594 }
4595 if (!m_pAlphaBitmapVertex) {
4596 HRESULT hr = CreateVertexBuffer(m_pDevice, &m_pAlphaBitmapVertex, m_TexAlphaBitmap.desc.Width, m_TexAlphaBitmap.desc.Height, m_AlphaBitmapRectSrc, 0, false);
4597 if (FAILED(hr)) {
4598 m_bAlphaBitmapEnable = false;
4599 return hr;
4600 }
4601 }
4602 if (pBmpParms->dwFlags & MFVideoAlphaBitmap_DestRect) {
4603 m_AlphaBitmapNRectDest = pBmpParms->nrcDest;
4604 }
4605 DWORD validFlags = MFVideoAlphaBitmap_SrcRect|MFVideoAlphaBitmap_DestRect;
4606
4607 return ((pBmpParms->dwFlags & validFlags) == validFlags) ? S_OK : S_FALSE;
4608 } else {
4609 return MF_E_NOT_INITIALIZED;
4610 }
4611}
4612
4613void CDX11VideoProcessor::SetCallbackDevice()
4614{

Callers

nothing calls this directly

Calls 2

CreateVertexBufferFunction · 0.85
ReleaseMethod · 0.45

Tested by

no test coverage detected