Author: Roman

Wait for IAsyncAction on STA thread

Figured out how to elegantly do a blocking wait for an asynchronous coroutine-enabled function on a STA thread. You can’t do this: There is an assertion failure because .get() assumes ability to block. On STA this hits a failure in winrt::impl::blocking_suspend call. So you have to avoid doing .get() to synchronize and there should be…

Read the full article

Hardware AV1 video encoders are coming

There is something interesting finally happening with video encoding and also Media Foundation: Intel® Hybrid AV1 Encoder MFT 11 Attributes: MFT_TRANSFORM_CLSID_Attribute: {62C053CE-5357-4794-8C5A-FBEFFEFFB82D} (Type VT_CLSID) MF_TRANSFORM_FLAGS_Attribute: MFT_ENUM_FLAG_HARDWARE MFT_ENUM_HARDWARE_VENDOR_ID_Attribute: VEN_8086 (Type VT_LPWSTR) MFT_ENUM_HARDWARE_URL_Attribute: AA243E5D-2F73-48c7-97F7-F6FA17651651 (Type VT_LPWSTR) MFT_INPUT_TYPES_Attributes: {3231564E-3961-42AE-BA67-FF47CCC13EED}, MFVideoFormat_NV12 MFT_OUTPUT_TYPES_Attributes: MFVideoFormat_AV1 MFT_CODEC_MERIT_Attribute: 7 (Type VT_UI4) MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE: 1 (Type VT_UI4) MF_TRANSFORM_ASYNC: 1 (Type VT_UI4) Intel UHD graphics coming…

Read the full article

Modern asynchronous C++

Windows API offers asynchronously implemented functionality for file, network and other I/O since long ago. It was maybe one of the easiest way to make a simple thing messy and ridiculously bloated and sensitive to errors of sorts. If you’re sane and you don’t need to squeeze everything out something you would just not use…

Read the full article

So, what “W” is for in lstrcmpW

So I took time and submitted a request to update lstrcmpW documentation because it is inaccurate. It seemed pretty obvious that Syntax section shows W types (correct) and Parameters section shows T types trying to document the same thing. Some articles, for CRT functions specifically, solve this by documenting a set of similar functions at…

Read the full article

Internal E_UNEXPECTED in dxgi.dll

Someone asked a question on StackOverflow recently about suspicious debug output messages associated with DXGI/Direct3D initialization: DirectX12: dxgi dll catastrophic failure when creating IDXGIFactory. onecore\windows\directx\database\helperlibrary\lib\perappusersettingsqueryimpl.cpp(121)\dxgi.dll!00007FFBA0D6D7F8: (caller: 00007FFBA0D4D167) ReturnHr(1) tid(64d8) 8000FFFF Catastrophic failure onecore\windows\directx\database\helperlibrary\lib\perappusersettingsqueryimpl.cpp(98)\dxgi.dll!00007FFBA0D6D4D0: (caller: 00007FFBA0D3E221) ReturnHr(2) tid(64d8) 8000FFFF Catastrophic failure onecore\windows\directx\database\helperlibrary\lib\directxdatabasehelper.cpp(999)\dxgi.dll!00007FFBA0D6D4FC: (caller: 00007FFBA0D3E221) ReturnHr(3) tid(64d8) 8000FFFF Catastrophic failure This problem is not fatal or severe…

Read the full article