summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdonais Romero Gonzalez <[email protected]>2025-01-16 15:16:11 -0800
committerAdonais Romero Gonzalez <[email protected]>2025-01-16 15:16:11 -0800
commit56fc6c5020c151de1822f263f64e4825685ca36c (patch)
tree3f8e44f2a1b0cb530a9b29c990ac84a17c792d71
parent1fd430c78971c31b624b0773bbea825d8b480d55 (diff)
[avstream/sampledevicemft] Use C++17
-rw-r--r--avstream/sampledevicemft/dllmain.cpp2
-rw-r--r--avstream/sampledevicemft/multipinmft.vcxproj26
-rw-r--r--avstream/sampledevicemft/multipinmftutils.cpp2
3 files changed, 9 insertions, 21 deletions
diff --git a/avstream/sampledevicemft/dllmain.cpp b/avstream/sampledevicemft/dllmain.cpp
index 88bfe6ab..64b6cf71 100644
--- a/avstream/sampledevicemft/dllmain.cpp
+++ b/avstream/sampledevicemft/dllmain.cpp
@@ -199,7 +199,7 @@ STDMETHODIMP_(BOOL) WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, void *)
// Hook up WIL tracing to our trace provider.
wil::SetResultLoggingCallback(
- [](const wil::FailureInfo &failure)
+ [](const wil::FailureInfo &failure) noexcept
{
wchar_t debugString[2048];
if (SUCCEEDED(wil::GetFailureLogString(debugString, ARRAYSIZE(debugString), failure)))
diff --git a/avstream/sampledevicemft/multipinmft.vcxproj b/avstream/sampledevicemft/multipinmft.vcxproj
index 3b9ddf87..f44fe4c3 100644
--- a/avstream/sampledevicemft/multipinmft.vcxproj
+++ b/avstream/sampledevicemft/multipinmft.vcxproj
@@ -160,26 +160,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<ExceptionHandling>Sync</ExceptionHandling>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
- <ClCompile>
- <ExceptionHandling>Sync</ExceptionHandling>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <ExceptionHandling>Sync</ExceptionHandling>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
- <ClCompile>
- <ExceptionHandling>Sync</ExceptionHandling>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;MF_WPP;SECURITY_WIN32;MFT_UNIQUE_METHOD_NAMES;MF_DEVICEMFT_ALLOW_MFT0_LOAD</PreprocessorDefinitions>
</ClCompile>
<Midl>
@@ -195,6 +177,8 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
+ <ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;MF_WPP;SECURITY_WIN32;MFT_UNIQUE_METHOD_NAMES;MF_DEVICEMFT_ALLOW_MFT0_LOAD</PreprocessorDefinitions>
</ClCompile>
<Midl>
@@ -210,6 +194,8 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
+ <ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;MF_WPP;SECURITY_WIN32;MFT_UNIQUE_METHOD_NAMES;MF_DEVICEMFT_ALLOW_MFT0_LOAD</PreprocessorDefinitions>
</ClCompile>
<Midl>
@@ -225,6 +211,8 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
+ <ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;MF_WPP;SECURITY_WIN32;MFT_UNIQUE_METHOD_NAMES;MF_DEVICEMFT_ALLOW_MFT0_LOAD</PreprocessorDefinitions>
</ClCompile>
<Midl>
diff --git a/avstream/sampledevicemft/multipinmftutils.cpp b/avstream/sampledevicemft/multipinmftutils.cpp
index cbd64f72..ba879ccc 100644
--- a/avstream/sampledevicemft/multipinmftutils.cpp
+++ b/avstream/sampledevicemft/multipinmftutils.cpp
@@ -1055,7 +1055,7 @@ HRESULT CreateDecoderFromLuid( _In_ LUID ullAdapterLuidRunningOn,
DMFTCHECKHR_GOTO(pOutputType->GetGUID(MF_MT_SUBTYPE, &OutputType.guidSubtype), done);
DMFTCHECKHR_GOTO(MFCreateAttributes(&spAttribs, 1), done);
- DMFTCHECKHR_GOTO(spAttribs->SetBlob(MFT_ENUM_ADAPTER_LUID, (byte*)&ullAdapterLuidRunningOn, sizeof(ullAdapterLuidRunningOn)), done);
+ DMFTCHECKHR_GOTO(spAttribs->SetBlob(MFT_ENUM_ADAPTER_LUID, (BYTE*)&ullAdapterLuidRunningOn, sizeof(ullAdapterLuidRunningOn)), done);
DMFTCHECKHR_GOTO(MFTEnum2(MFT_CATEGORY_VIDEO_DECODER, dwFlags, &InputType, &OutputType, spAttribs.Get(), &ppActivates, &cMFTActivate), done);
for (DWORD i = 0; i < cMFTActivate; i++)