diff options
| author | Adonais Romero González <[email protected]> | 2018-12-18 16:53:21 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-12-18 16:53:21 -0800 |
| commit | 46da8a0d4f0de180dd15b6ca088e095b5e2c0b96 (patch) | |
| tree | f4f4891dfd03e68b97d15628a2e5a074a79521ad | |
| parent | 9d23d436df72766a24a4791acd916c7faf106d48 (diff) | |
| parent | 235421020861aa1cca3f1d5cd2fd4f27f0f247e8 (diff) | |
Merge pull request #322 from JoelCorley/avshws-DoesNotWorkOnX86-AddBuildForARM
Fix X86 support; Add ARM support.
| -rw-r--r-- | avstream/avshws/avshws.sln | 30 | ||||
| -rw-r--r-- | avstream/avshws/avshws.vcxproj | 162 | ||||
| -rw-r--r-- | avstream/avshws/capture.cpp | 41 | ||||
| -rw-r--r-- | avstream/avshws/device.cpp | 82 | ||||
| -rw-r--r-- | avstream/avshws/filter.cpp | 5 | ||||
| -rw-r--r-- | avstream/avshws/hwsim.cpp | 38 |
6 files changed, 175 insertions, 183 deletions
diff --git a/avstream/avshws/avshws.sln b/avstream/avshws/avshws.sln index b8aebb75..877a4ca9 100644 --- a/avstream/avshws/avshws.sln +++ b/avstream/avshws/avshws.sln @@ -1,28 +1,48 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.136 MinimumVisualStudioVersion = 12.0 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avshws", "avshws.vcxproj", "{77FA53EC-3637-411C-B708-C8EED64543A4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 Debug|x64 = Debug|x64 + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM.ActiveCfg = Debug|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM.Build.0 = Debug|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM.Deploy.0 = Debug|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM64.Build.0 = Debug|ARM64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|ARM64.Deploy.0 = Debug|ARM64 {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|Win32.ActiveCfg = Debug|Win32 {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|Win32.Build.0 = Debug|Win32 - {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|Win32.ActiveCfg = Release|Win32 - {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|Win32.Build.0 = Release|Win32 {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|x64.ActiveCfg = Debug|x64 {77FA53EC-3637-411C-B708-C8EED64543A4}.Debug|x64.Build.0 = Debug|x64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM.ActiveCfg = Release|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM.Build.0 = Release|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM.Deploy.0 = Release|ARM + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM64.ActiveCfg = Release|ARM64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM64.Build.0 = Release|ARM64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|ARM64.Deploy.0 = Release|ARM64 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|Win32.ActiveCfg = Release|Win32 + {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|Win32.Build.0 = Release|Win32 {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|x64.ActiveCfg = Release|x64 {77FA53EC-3637-411C-B708-C8EED64543A4}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5EBC439F-EC31-448F-B129-434D42485011} + EndGlobalSection EndGlobal +
\ No newline at end of file diff --git a/avstream/avshws/avshws.vcxproj b/avstream/avshws/avshws.vcxproj index b3909878..115a05c9 100644 --- a/avstream/avshws/avshws.vcxproj +++ b/avstream/avshws/avshws.vcxproj @@ -1,10 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <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="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> @@ -50,6 +66,22 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> @@ -58,6 +90,22 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> <OutDir>$(IntDir)</OutDir> @@ -71,9 +119,21 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </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')" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>avshws</TargetName> @@ -84,14 +144,28 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetName>avshws</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <TargetName>avshws</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetName>avshws</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetName>avshws</TargetName> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <TargetName>avshws</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetName>avshws</TargetName> + </PropertyGroup> + <ItemDefinitionGroup> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ks.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ks.lib;$(DDK_LIB_PATH)\ntoskrnl.lib</AdditionalDependencies> <AdditionalOptions>%(AdditionalOptions) -merge:PAGECONST=PAGE</AdditionalOptions> </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> @@ -110,10 +184,6 @@ </Midl> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ks.lib</AdditionalDependencies> - <AdditionalOptions>%(AdditionalOptions) -merge:PAGECONST=PAGE</AdditionalOptions> - </Link> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> @@ -132,10 +202,42 @@ </Midl> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ks.lib</AdditionalDependencies> - <AdditionalOptions>%(AdditionalOptions) -merge:PAGECONST=PAGE</AdditionalOptions> - </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </Midl> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </Midl> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> @@ -154,10 +256,42 @@ </Midl> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ks.lib</AdditionalDependencies> - <AdditionalOptions>%(AdditionalOptions) -merge:PAGECONST=PAGE</AdditionalOptions> - </Link> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </Midl> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> + </Midl> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;DEBUG_LEVEL=DEBUGLVL_BLAB;_WIN2K_COMPAT_SLIST_USAGE;_NO_SYS_GUID_OPERATOR_EQ_</PreprocessorDefinitions> diff --git a/avstream/avshws/capture.cpp b/avstream/avshws/capture.cpp index e998ac1b..d68ce1da 100644 --- a/avstream/avshws/capture.cpp +++ b/avstream/avshws/capture.cpp @@ -28,7 +28,7 @@ #include "avshws.h" #include <ksmedia.h> -#include "ntintsafe.h" +#include <ntintsafe.h> /************************************************************************** @@ -1339,27 +1339,6 @@ Return Value: PKSSTREAM_POINTER NextClone = KsStreamPointerGetNextClone (Clone); -#if defined(_X86_) - // - // Count up the number of bytes we've completed and mark this - // in the Stream Header. In mapped queues - // (KSPIN_FLAG_GENERATE_MAPPINGS), this is the responsibility of - // the minidriver. In non-mapped queues, AVStream performs this. - // - ULONG MappingsToCount = - (MappingsRemaining > Clone -> OffsetOut.Remaining) ? - Clone -> OffsetOut.Remaining : - MappingsRemaining; - - // - // Update DataUsed according to the mappings. - // - for (ULONG CurMapping = 0; CurMapping < MappingsToCount; CurMapping++) { - Clone -> StreamHeader -> DataUsed += - Clone -> OffsetOut.Mappings [CurMapping].ByteCount; - } -#endif - // // If we have completed all remaining mappings in this clone, it // is an indication that the clone is ready to be deleted and the @@ -1367,11 +1346,7 @@ Return Value: // has not yet been set. If we have a clock, we can timestamp the // sample. // -#if !defined(_X86_) if (Clone -> StreamHeader -> DataUsed >= Clone -> OffsetOut.Remaining) { -#else - if (MappingsRemaining >= Clone -> OffsetOut.Remaining) { -#endif Clone -> StreamHeader -> Duration = m_VideoInfoHeader -> AvgTimePerFrame; @@ -1434,11 +1409,7 @@ Return Value: // delete the clone. We've already updated DataUsed above. // -#if !defined(_X86_) MappingsRemaining--; -#else - MappingsRemaining -= Clone -> OffsetOut.Remaining; -#endif KsStreamPointerDelete (Clone); } else { @@ -1447,7 +1418,6 @@ Return Value: // update the pointers. Since we're guaranteed this won't advance // to a new frame by the check above, it won't fail. // -#if !defined(_X86_) (void)KsStreamPointerAdvanceOffsets ( Clone, 0, @@ -1455,15 +1425,6 @@ Return Value: FALSE ); -#else - (void)KsStreamPointerAdvanceOffsets ( - Clone, - 0, - MappingsRemaining, - FALSE - ); - -#endif MappingsRemaining = 0; } diff --git a/avstream/avshws/device.cpp b/avstream/avshws/device.cpp index 93376be4..44fc9704 100644 --- a/avstream/avshws/device.cpp +++ b/avstream/avshws/device.cpp @@ -343,88 +343,6 @@ Return Value: delete m_HardwareSimulation; } } -#if defined(_X86_) - // - // DMA operations illustrated in this sample are applicable only for 32bit platform. - // - INTERFACE_TYPE InterfaceBuffer; - ULONG InterfaceLength; - DEVICE_DESCRIPTION DeviceDescription; - - if (NT_SUCCESS (Status)) { - // - // Set up DMA... - // - // Ordinarilly, we'd be using InterfaceBuffer or - // InterfaceTypeUndefined if !NT_SUCCESS (IfStatus) as the - // InterfaceType below; however, for the purposes of this sample, - // we lie and say we're on the PCI Bus. Otherwise, we're using map - // registers on x86 32 bit physical to 32 bit logical and this isn't - // what I want to show in this sample. - // - // - // NTSTATUS IfStatus = - - IoGetDeviceProperty ( - m_Device -> PhysicalDeviceObject, - DevicePropertyLegacyBusType, - sizeof (INTERFACE_TYPE), - &InterfaceBuffer, - &InterfaceLength - ); - - // - // Initialize our fake device description. We claim to be a - // bus-mastering 32-bit scatter/gather capable piece of hardware. - // - DeviceDescription.Version = DEVICE_DESCRIPTION_VERSION; - DeviceDescription.DmaChannel = ((ULONG) ~0); - DeviceDescription.InterfaceType = PCIBus; - DeviceDescription.DmaWidth = Width32Bits; - DeviceDescription.DmaSpeed = Compatible; - DeviceDescription.ScatterGather = TRUE; - DeviceDescription.Master = TRUE; - DeviceDescription.Dma32BitAddresses = TRUE; - DeviceDescription.AutoInitialize = FALSE; - DeviceDescription.MaximumLength = (ULONG) -1; - - // - // Get a DMA adapter object from the system. - // - m_DmaAdapterObject = IoGetDmaAdapter ( - m_Device -> PhysicalDeviceObject, - &DeviceDescription, - &m_NumberOfMapRegisters - ); - - if (!m_DmaAdapterObject) { - Status = STATUS_UNSUCCESSFUL; - } - - } - - if (NT_SUCCESS (Status)) { - // - // Initialize our DMA adapter object with AVStream. This is - // **ONLY** necessary **IF** you are doing DMA directly into - // capture buffers as this sample does. For this, - // KSPIN_FLAG_GENERATE_MAPPINGS must be specified on a queue. - // - - // - // The (1 << 20) below is the maximum size of a single s/g mapping - // that this hardware can handle. Note that I have pulled this - // number out of thin air for the "fake" hardware. - // - KsDeviceRegisterAdapterObject ( - m_Device, - m_DmaAdapterObject, - (1 << 20), - sizeof (KSMAPPING) - ); - - } -#endif } return Status; diff --git a/avstream/avshws/filter.cpp b/avstream/avshws/filter.cpp index aea3acf7..251b4745 100644 --- a/avstream/avshws/filter.cpp +++ b/avstream/avshws/filter.cpp @@ -147,10 +147,7 @@ CaptureFilterPinDescriptors [CAPTURE_FILTER_PIN_COUNT] = { &g_PINNAME_VIDEO_CAPTURE, // Name 0 // Reserved }, -#ifdef _X86_ - KSPIN_FLAG_GENERATE_MAPPINGS | // Pin Flags -#endif - KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY, + KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY,// Pin Flags 1, // Instances Possible 1, // Instances Necessary &CapturePinAllocatorFraming, // Allocator Framing diff --git a/avstream/avshws/hwsim.cpp b/avstream/avshws/hwsim.cpp index 9a6d5f86..1e813bc2 100644 --- a/avstream/avshws/hwsim.cpp +++ b/avstream/avshws/hwsim.cpp @@ -556,7 +556,6 @@ Return Value: // If I could just remap physical in the list to virtual easily here, // I wouldn't need to do it. // -#if !defined(_X86_) do { PSCATTER_GATHER_ENTRY Entry = @@ -590,43 +589,6 @@ Return Value: } while(FALSE); -#else - for (ULONG MappingNum = 0; - MappingNum < MappingsCount && - m_ScatterGatherMappingsQueued < m_ScatterGatherMappingsMax; - MappingNum++) { - - PSCATTER_GATHER_ENTRY Entry = - reinterpret_cast <PSCATTER_GATHER_ENTRY> ( - ExAllocateFromNPagedLookasideList ( - &m_ScatterGatherLookaside - ) - ); - - if (!Entry) { - break; - } - - Entry -> Virtual = *Buffer; - Entry -> ByteCount = Mappings -> ByteCount; - - // - // Move forward a specific number of bytes in chunking this into - // mapping sized va buffers. - // - *Buffer += Entry -> ByteCount; - Mappings = reinterpret_cast <PKSMAPPING> ( - (reinterpret_cast <PUCHAR> (Mappings) + MappingStride) - ); - - InsertTailList (&m_ScatterGatherMappings, &(Entry -> ListEntry)); - MappingsInserted++; - m_ScatterGatherMappingsQueued++; - m_ScatterGatherBytesQueued += Entry -> ByteCount; - - } -#endif - KeReleaseSpinLock (&m_ListLock, Irql); return MappingsInserted; |
