MCPcopy Create free account
hub / github.com/axmolengine/axmol / UpdateVideoExtent

Method UpdateVideoExtent

core/media/MfMediaEngine.cpp:361–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void MfMediaEngine::UpdateVideoExtent()
362{
363 if (m_mediaEngine && m_readyToPlay)
364 {
365 DWORD x = 0, y = 0;
366 DX::ThrowIfFailed(m_mediaEngine->GetNativeVideoSize(&x, &y));
367
368 int mods = 0;
369 if (m_videoExtent.x != x)
370 {
371 m_videoExtent.x = x;
372 ++mods;
373 }
374 if (m_videoExtent.x != y)
375 {
376 m_videoExtent.y = y;
377 ++mods;
378 }
379
380 if (mods)
381 DX::ThrowIfFailed(m_wicFactory->CreateBitmap(x, y, GUID_WICPixelFormat32bppBGRA, WICBitmapCacheOnDemand,
382 m_wicBitmap.ReleaseAndGetAddressOf()));
383 }
384}
385
386}
387

Callers

nothing calls this directly

Calls 2

ThrowIfFailedFunction · 0.85
GetNativeVideoSizeMethod · 0.80

Tested by

no test coverage detected