Skip to content

Commit 22c2ce3

Browse files
authored
Merge pull request #3032 from stride3d/video-cswin32
[Video] Drops dependency to SharpDX.MediaFoundation using Microsoft.Windows.CsWin32
2 parents 609a4c1 + 752ca51 commit 22c2ce3

File tree

6 files changed

+322
-90
lines changed

6 files changed

+322
-90
lines changed

sources/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0-preview.4" />
1515
<PackageVersion Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
1616
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
17+
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.264" />
1718
<PackageVersion Include="PolySharp" Version="1.15.0" />
1819
<PackageVersion Include="ServiceWire" Version="5.6.0" />
1920
<PackageVersion Include="SharpDX" Version="4.2.0" />
@@ -22,7 +23,6 @@
2223
<PackageVersion Include="SharpDX.Direct3D11" Version="4.2.0" />
2324
<PackageVersion Include="SharpDX.Direct3D12" Version="4.2.0" />
2425
<PackageVersion Include="SharpDX.DirectInput" Version="4.2.0" />
25-
<PackageVersion Include="SharpDX.MediaFoundation" Version="4.2.0" />
2626
<PackageVersion Include="SharpDX.RawInput" Version="4.2.0" />
2727
<PackageVersion Include="SharpDX.XInput" Version="4.2.0" />
2828
<PackageVersion Include="Silk.NET.Direct3D11" Version="2.22.0" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://aka.ms/CsWin32.schema.json",
3+
"allowMarshaling": false,
4+
"comInterop": { "preserveSigMethods": [ "IMFMediaEngine.OnVideoStreamTick" ] }
5+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MFStartup
2+
MFShutdown
3+
CLSID_MFMediaEngineClassFactory
4+
5+
CoCreateInstance
6+
IMFMediaEngine
7+
IMFMediaEngineEx
8+
IMFMediaEngineClassFactory
9+
IMFMediaEngineNotify
10+
MFCreateAttributes
11+
MFCreateDXGIDeviceManager
12+
MF_MEDIA_ENGINE_CALLBACK
13+
MF_MEDIA_ENGINE_EVENT
14+
MF_MEDIA_ENGINE_ERR
15+
MF_MEDIA_ENGINE_DXGI_MANAGER
16+
MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT
17+
MF_VERSION
18+
19+
IStream
20+
STATFLAG
21+
MFCreateMFByteStreamOnStream

sources/engine/Stride.Video/Stride.Video.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project>
1+
<Project>
22
<PropertyGroup>
33
<StrideRuntime>true</StrideRuntime>
44
<StrideGraphicsApiDependent>true</StrideGraphicsApiDependent>
@@ -24,7 +24,10 @@
2424
</ItemGroup>
2525
<ItemGroup>
2626
<ProjectReference Include="..\Stride.Engine\Stride.Engine.csproj" />
27-
<PackageReference Include="SharpDX.MediaFoundation" Condition="'$(TargetFramework)' == '$(StrideFramework)' Or '$(TargetFramework)' == '$(StrideFrameworkUWP)'" />
27+
<PackageReference Include="Microsoft.Windows.CsWin32" Condition="'$(TargetFramework)' == '$(StrideFramework)' Or '$(TargetFramework)' == '$(StrideFrameworkUWP)'" >
28+
<PrivateAssets>all</PrivateAssets>
29+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
30+
</PackageReference>
2831
<PackageReference Include="Silk.NET.Direct3D11" Condition="'$(TargetFramework)' == '$(StrideFramework)' Or '$(TargetFramework)' == '$(StrideFrameworkUWP)'" />
2932
<PackageReference Include="Silk.NET.Direct3D12" Condition="'$(TargetFramework)' == '$(StrideFramework)'" />
3033
</ItemGroup>

0 commit comments

Comments
 (0)