mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
init
This commit is contained in:
31
libs/hwcodec/dev/vs/MFXTest/MFXTest.sln
Normal file
31
libs/hwcodec/dev/vs/MFXTest/MFXTest.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.33627.172
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MFXTest", "MFXTest.vcxproj", "{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Debug|x64.Build.0 = Debug|x64
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Release|x64.ActiveCfg = Release|x64
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Release|x64.Build.0 = Release|x64
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{1FBDACB6-9142-40DA-9B50-5F591F1DD0AD}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0B559C12-4403-4530-9A4E-7F4DF6235164}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
175
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj
Normal file
175
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{1fbdacb6-9142-40da-9b50-5f591f1dd0ad}</ProjectGuid>
|
||||
<RootNamespace>MFXTest</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CSO_DIR="../../render/res";MFX_D3D11_SUPPORT;NOMINMAX=1;MFX_DEPRECATED_OFF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>D:\rustdesk\gpucodec\externals\libvpl_v2023.4.0\tools\legacy\media_sdk_compatibility_headers;..\..\..\externals\libvpl_v2023.4.0\libvpl;..\..\..\externals\libvpl_v2023.4.0\api;..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src;..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\include;..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\include\vm;..\..\..\externals\nvEncDXGIOutputDuplicationSample;..\..\..\native\common;..\..\..\native\gpucodec;..\..\..\externals\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\..\externals\SDL\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>SDL2.lib;dxgi.lib;d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_config_interface\mfx_config_interface.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_config_interface\mfx_config_interface_string_api.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_config.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_loader.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_log.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_lowlatency.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_msdk.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_critical_section.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher_log.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher_main.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_driver_store_loader.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dxva2_device.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_function_table.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_library_iterator.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_load_dll.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_win_reg_key.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_bitstream.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_nal_spl.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_spl.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\base_allocator.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\d3d11_allocator.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\sample_utils.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\atomic.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\shared_object.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\thread_windows.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\time.cpp" />
|
||||
<ClCompile Include="..\..\..\externals\nvEncDXGIOutputDuplicationSample\DDAImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\native\common\log.cpp" />
|
||||
<ClCompile Include="..\..\..\native\common\platform\win\win.cpp" />
|
||||
<ClCompile Include="..\..\..\native\gpucodec\data.c" />
|
||||
<ClCompile Include="..\..\..\native\gpucodec\gpucodec_utils.c" />
|
||||
<ClCompile Include="..\..\..\native\vpl\vpl_decode.cpp" />
|
||||
<ClCompile Include="..\..\..\native\vpl\vpl_encode.cpp" />
|
||||
<ClCompile Include="..\..\capture\src\dxgi.cpp" />
|
||||
<ClCompile Include="..\..\render\src\dxgi_sdl.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
172
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj.filters
Normal file
172
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj.filters
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\capture">
|
||||
<UniqueIdentifier>{bd78eb0e-0894-4f11-a2f5-2cc02731bc52}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\codec">
|
||||
<UniqueIdentifier>{dd2d68d6-6559-413b-948b-f718b34cde0a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external">
|
||||
<UniqueIdentifier>{fd52358a-9b99-43b4-b717-f3a77580a52b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\nvEncDXGIOutputDuplicationSample">
|
||||
<UniqueIdentifier>{bdbd71f9-8ed4-4bdd-a8c3-612f5858504d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\render">
|
||||
<UniqueIdentifier>{2089080f-479d-4d89-8cf5-7ac8e52b11d1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\common">
|
||||
<UniqueIdentifier>{3514d21d-4a74-44b9-b21b-bea909cda0b2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl">
|
||||
<UniqueIdentifier>{ad9c7b01-cd0a-40a2-afe6-f81133ac0e15}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\libvpl">
|
||||
<UniqueIdentifier>{ad00df31-d9af-432b-b452-b3ab9c2b381c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\libvpl\src">
|
||||
<UniqueIdentifier>{b5498eaa-1ff8-4c2b-b5c3-7c71a0a2efcc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\libvpl\src\windows">
|
||||
<UniqueIdentifier>{bbca452b-a73f-4d37-a393-627c0db2617c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\libvpl\src\mfx_config_interface">
|
||||
<UniqueIdentifier>{cb497035-08af-4b38-9abd-e4616861d366}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\sample_common">
|
||||
<UniqueIdentifier>{85b55a79-fab7-428c-bc6c-fdf0a58b4704}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\external\vpl\sample_common\vm">
|
||||
<UniqueIdentifier>{a3824aee-0800-467f-964b-61a76000e160}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\capture\src\dxgi.cpp">
|
||||
<Filter>Source Files\capture</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\render\src\dxgi_sdl.cpp">
|
||||
<Filter>Source Files\render</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\common\log.cpp">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\common\platform\win\win.cpp">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\gpucodec\data.c">
|
||||
<Filter>Source Files\codec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\gpucodec\gpucodec_utils.c">
|
||||
<Filter>Source Files\codec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_critical_section.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher_log.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dispatcher_main.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_driver_store_loader.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_dxva2_device.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_function_table.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_library_iterator.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_load_dll.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\windows\mfx_win_reg_key.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_config_interface\mfx_config_interface.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\mfx_config_interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_config_interface\mfx_config_interface_string_api.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src\mfx_config_interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_config.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_loader.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_log.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_lowlatency.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\libvpl\src\mfx_dispatcher_vpl_msdk.cpp">
|
||||
<Filter>Source Files\external\vpl\libvpl\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_bitstream.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_nal_spl.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\avc_spl.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\base_allocator.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\sample_utils.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\atomic.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common\vm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\shared_object.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common\vm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\thread_windows.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common\vm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\vm\time.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common\vm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\nvEncDXGIOutputDuplicationSample\DDAImpl.cpp">
|
||||
<Filter>Source Files\external\nvEncDXGIOutputDuplicationSample</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\vpl\vpl_decode.cpp">
|
||||
<Filter>Source Files\codec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\native\vpl\vpl_encode.cpp">
|
||||
<Filter>Source Files\codec</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\externals\libvpl_v2023.4.0\tools\legacy\sample_common\src\d3d11_allocator.cpp">
|
||||
<Filter>Source Files\external\vpl\sample_common</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj.user
Normal file
4
libs/hwcodec/dev/vs/MFXTest/MFXTest.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
111
libs/hwcodec/dev/vs/MFXTest/main.cpp
Normal file
111
libs/hwcodec/dev/vs/MFXTest/main.cpp
Normal file
@@ -0,0 +1,111 @@
|
||||
#include <Windows.h>
|
||||
#include <callback.h>
|
||||
#include <common.h>
|
||||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
#include <system.h>
|
||||
|
||||
extern "C" {
|
||||
void *dxgi_new_capturer(int64_t luid);
|
||||
void *dxgi_device(void *self);
|
||||
int dxgi_width(const void *self);
|
||||
int dxgi_height(const void *self);
|
||||
void *dxgi_capture(void *self, int wait_ms);
|
||||
void destroy_dxgi_capturer(void *self);
|
||||
|
||||
void *vpl_new_encoder(void *hdl, int64_t luid, API api, DataFormat dataFormat,
|
||||
int32_t width, int32_t height, int32_t kbs,
|
||||
int32_t framerate, int32_t gop);
|
||||
int vpl_encode(void *e, void *tex, EncodeCallback callback, void *obj);
|
||||
int vpl_destroy_encoder(void *e);
|
||||
|
||||
void *vpl_new_decoder(void *device, int64_t luid, int32_t api,
|
||||
int32_t dataFormat, bool outputSharedHandle);
|
||||
int vpl_decode(void *decoder, uint8_t *data, int32_t length,
|
||||
DecodeCallback callback, void *obj);
|
||||
int vpl_destroy_decoder(void *decoder);
|
||||
|
||||
void *CreateDXGIRender(long long luid, bool inputSharedHandle);
|
||||
int DXGIRenderTexture(void *render, HANDLE shared_handle);
|
||||
void DestroyDXGIRender(void *render);
|
||||
void *DXGIDevice(void *render);
|
||||
}
|
||||
|
||||
static const uint8_t *encode_data;
|
||||
static int32_t encode_len;
|
||||
static void *decode_shared_handle;
|
||||
|
||||
extern "C" static void encode_callback(const uint8_t *data, int32_t len,
|
||||
int32_t key, const void *obj) {
|
||||
encode_data = data;
|
||||
encode_len = len;
|
||||
}
|
||||
|
||||
extern "C" static void decode_callback(void *shared_handle, const void *obj) {
|
||||
decode_shared_handle = shared_handle;
|
||||
}
|
||||
|
||||
extern "C" void log_gpucodec(int level, const char *message) {
|
||||
std::cout << message << std::endl;
|
||||
}
|
||||
int main() {
|
||||
Adapters adapters;
|
||||
adapters.Init(ADAPTER_VENDOR_INTEL);
|
||||
if (adapters.adapters_.size() == 0) {
|
||||
std::cout << "no intel adapter" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
int64_t luid = LUID(adapters.adapters_[0].get()->desc1_);
|
||||
DataFormat dataFormat = H264;
|
||||
void *dup = dxgi_new_capturer(luid);
|
||||
if (!dup) {
|
||||
std::cerr << "create duplicator failed" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
int width = dxgi_width(dup);
|
||||
int height = dxgi_height(dup);
|
||||
std::cout << "width: " << width << " height: " << height << std::endl;
|
||||
void *device = dxgi_device(dup);
|
||||
void *encoder = vpl_new_encoder(device, luid, API_DX11, dataFormat, width,
|
||||
height, 4000, 30, 0xFFFF);
|
||||
if (!encoder) {
|
||||
std::cerr << "create encoder failed" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void *render = CreateDXGIRender(luid, false);
|
||||
if (!render) {
|
||||
std::cerr << "create render failed" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void *decoder =
|
||||
vpl_new_decoder(DXGIDevice(render), luid, API_DX11, dataFormat, false);
|
||||
if (!decoder) {
|
||||
std::cerr << "create decoder failed" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
void *texture = dxgi_capture(dup, 100);
|
||||
if (!texture) {
|
||||
std::cerr << "texture is NULL" << std::endl;
|
||||
continue;
|
||||
}
|
||||
if (0 != vpl_encode(encoder, texture, encode_callback, NULL)) {
|
||||
std::cerr << "encode failed" << std::endl;
|
||||
continue;
|
||||
}
|
||||
if (0 != vpl_decode(decoder, (uint8_t *)encode_data, encode_len,
|
||||
decode_callback, NULL)) {
|
||||
std::cerr << "decode failed" << std::endl;
|
||||
continue;
|
||||
}
|
||||
if (0 != DXGIRenderTexture(render, decode_shared_handle)) {
|
||||
std::cerr << "render failed" << std::endl;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// no release temporarily
|
||||
}
|
||||
Reference in New Issue
Block a user