Skip to content

Commit

Permalink
[avstream/sampledevicemft] Use C++17 (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoAdonis authored Jan 22, 2025
1 parent 1fd430c commit 30bc6de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
2 changes: 1 addition & 1 deletion avstream/sampledevicemft/SampleSocDeviceMFTutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,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++)
Expand Down
2 changes: 1 addition & 1 deletion avstream/sampledevicemft/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
26 changes: 7 additions & 19 deletions avstream/sampledevicemft/multipinmft.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion avstream/sampledevicemft/multipinmftutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 30bc6de

Please sign in to comment.