Skip to content

Commit

Permalink
WIP: DXGISwapChain example for C++ users (does not work)
Browse files Browse the repository at this point in the history
  • Loading branch information
brabebhin committed Jan 24, 2025
1 parent a9d2f69 commit 4f0d66f
Show file tree
Hide file tree
Showing 17 changed files with 522 additions and 1 deletion.
34 changes: 34 additions & 0 deletions FFmpegInteropX.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFmpegInteropX.DotNet", "So
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFmpegInteropX.VideoEffects", "VideoEffects\FFmpegInteropX.VideoEffects.vcxproj", "{6C4BFF5E-7037-4EE8-9C9F-5381C35BA066}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssSsaRenderElement", "Samples\AssSsaRenderElement\AssSsaRenderElement.vcxproj", "{CBED4D40-9319-4AA3-9616-80144E8083AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_Desktop|ARM = Debug_Desktop|ARM
Expand Down Expand Up @@ -262,6 +264,38 @@ Global
{6C4BFF5E-7037-4EE8-9C9F-5381C35BA066}.Release_UWP|x64.Build.0 = Release_UWP|x64
{6C4BFF5E-7037-4EE8-9C9F-5381C35BA066}.Release_UWP|x86.ActiveCfg = Release_UWP|Win32
{6C4BFF5E-7037-4EE8-9C9F-5381C35BA066}.Release_UWP|x86.Build.0 = Release_UWP|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|ARM.ActiveCfg = Debug|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|ARM.Build.0 = Debug|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|ARM64.ActiveCfg = Debug|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|ARM64.Build.0 = Debug|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|x64.ActiveCfg = Debug|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|x64.Build.0 = Debug|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|x86.ActiveCfg = Debug|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_Desktop|x86.Build.0 = Debug|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|ARM.ActiveCfg = Debug|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|ARM.Build.0 = Debug|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|ARM64.ActiveCfg = Debug|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|ARM64.Build.0 = Debug|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|x64.ActiveCfg = Debug|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|x64.Build.0 = Debug|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|x86.ActiveCfg = Debug|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Debug_UWP|x86.Build.0 = Debug|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|ARM.ActiveCfg = Release|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|ARM.Build.0 = Release|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|ARM64.ActiveCfg = Release|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|ARM64.Build.0 = Release|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|x64.ActiveCfg = Release|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|x64.Build.0 = Release|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|x86.ActiveCfg = Release|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_Desktop|x86.Build.0 = Release|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|ARM.ActiveCfg = Release|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|ARM.Build.0 = Release|ARM
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|ARM64.ActiveCfg = Release|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|ARM64.Build.0 = Release|ARM64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|x64.ActiveCfg = Release|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|x64.Build.0 = Release|x64
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|x86.ActiveCfg = Release|Win32
{CBED4D40-9319-4AA3-9616-80144E8083AC}.Release_UWP|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 3 additions & 0 deletions Samples/AssSsaRenderElement/AssSsaRenderElement.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPORTS
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
156 changes: 156 additions & 0 deletions Samples/AssSsaRenderElement/AssSsaRenderElement.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
<MinimalCoreWin>true</MinimalCoreWin>
<ProjectGuid>{cbed4d40-9319-4aa3-9616-80144e8083ac}</ProjectGuid>
<ProjectName>AssSsaRenderElement</ProjectName>
<RootNamespace>AssSsaRenderElement</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.26100.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="PropertySheet.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<WarningLevel>Level4</WarningLevel>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<ModuleDefinitionFile>AssSsaRenderElement.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="AssSsaRenderer.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssSsaRenderer.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="AssSsaRenderElement.def" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="PropertySheet.props" />
<Text Include="readme.txt">
<DeploymentContent>false</DeploymentContent>
</Text>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Source\FFmpegInteropX.vcxproj">
<Project>{9cfa3b3e-b7af-4629-84e2-c962c5b046b1}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Midl Include="Source.idl" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.220531.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>
35 changes: 35 additions & 0 deletions Samples/AssSsaRenderElement/AssSsaRenderElement.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resources">
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{926ab91d-31b4-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="Class.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="AssSsaRenderer.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="AssSsaRenderer.h" />
</ItemGroup>
<ItemGroup>
<None Include="AssSsaRenderElement.def" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="PropertySheet.props" />
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
<ItemGroup>
<Midl Include="Source.idl" />
</ItemGroup>
</Project>
Binary file not shown.
4 changes: 4 additions & 0 deletions Samples/AssSsaRenderElement/AssSsaRenderer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "pch.h"
#include "AssSsaRenderer.h"
#include "AssSsaRenderer.g.cpp"

Loading

0 comments on commit 4f0d66f

Please sign in to comment.