diff options
| author | Adonais Romero González <[email protected]> | 2020-04-07 16:17:44 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-07 16:17:44 -0700 |
| commit | 13c61ceeb3f7da66a2b57730d12d14eb7463c46a (patch) | |
| tree | ff52f9ac442a60625936a266db1bef12ac694a8e /avstream/avshws | |
| parent | dd4fad494b996f5729be98e0271ea74ef1a5d2ad (diff) | |
| parent | 27c8560ba860165db5a173b37591271397d20bb7 (diff) | |
Update all the AvStream samples for Vibranium.
Diffstat (limited to 'avstream/avshws')
| -rw-r--r-- | avstream/avshws/README.md | 11 | ||||
| -rw-r--r-- | avstream/avshws/avshws.inf | 173 | ||||
| -rw-r--r-- | avstream/avshws/avshws.inx | bin | 0 -> 5944 bytes | |||
| -rw-r--r-- | avstream/avshws/avshws.sln | 5 | ||||
| -rw-r--r-- | avstream/avshws/avshws.vcxproj | 4 | ||||
| -rw-r--r-- | avstream/avshws/capture.cpp | 2 | ||||
| -rw-r--r-- | avstream/avshws/device.cpp | 25 | ||||
| -rw-r--r-- | avstream/avshws/hwsim.cpp | 2 | ||||
| -rw-r--r-- | avstream/avshws/makefile | 15 |
9 files changed, 35 insertions, 202 deletions
diff --git a/avstream/avshws/README.md b/avstream/avshws/README.md index 49bb9e04..9a222462 100644 --- a/avstream/avshws/README.md +++ b/avstream/avshws/README.md @@ -84,3 +84,14 @@ In the upper-left corner of the image, a counter counts the number of frames tha | --- | --- | | Avshws.h | Main header file for the sample | | Avshws.inf | Sample installation file | +Capture.cpp | Capture pin implementation for all capture pins on the sample filter. +Capture.h | Capture pin level header for all capture pins on the sample filter. +Device.cpp | Device level implementation of the simulated hardware. +Device.h | Device level header for the simulated hardware. +Filter.cpp | Capture filter implementation (including frame synthesis) for the fake capture filter. +Filter.h | Filter level header for the filter-centric capture filter. +HWSim.cpp | Hardware simulation implementation, including fake "DMA" transfers, scatter gather mapping handling, ISRs, etc. +HWSim.h | Hardware simulation header. +Image.cpp | Image synthesis and overlay code. These objects provide image synthesis (pixel, color-bar, etc) onto RGB24 and UYVY buffers as well as software string overlay into these buffers. +Image.h | Image synthesis and overlay header. +Purecall.h | _purecall stub necessary for virtual function usage in drivers. diff --git a/avstream/avshws/avshws.inf b/avstream/avshws/avshws.inf deleted file mode 100644 index 9bbbc42a..00000000 --- a/avstream/avshws/avshws.inf +++ /dev/null @@ -1,173 +0,0 @@ -;/*++ -; -;Copyright (c) Microsoft Corporation. All rights reserved. -; -; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY -; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR -; PURPOSE. -; -;Module Name: -; -; AVSHWS.INF -; -;Abstract: -; -; -;AVStream pin centric sample mini driver (AVSHWS.sys) installation file. -;Supports x86, amd64, arm and arm64 platforms -; -;--*/ - -[Version] -signature="$WINDOWS NT$" -Class=Camera -ClassGuid={ca3e7ab9-b4c3-4ae6-8251-579ef933890f} -Provider=%ProviderName% -Catalogfile=avshws.cat -DriverVer=08/31/2006,6.0.5600.0 - -[SourceDisksNames] -1000=%cdname%,,, - -[SourceDisksFiles] -avshws.sys=1000 - -[DestinationDirs] -DefaultDestDir=12 -avshws.CopyFiles=12 - -[avshws.CopyFiles] -avshws.sys - -[Manufacturer] -%ManufacturerName%=Standard,NTx86,NTamd64,ntarm,ntarm64 - -[Standard.NTx86] -%avshws.DeviceDesc%=avshws.NTx86,AVSHWS - -[Standard.NTamd64] -%avshws.DeviceDesc%=avshws.NTamd64,AVSHWS - -[Standard.NTarm] -%avshws.DeviceDesc%=avshws.NTarm,AVSHWS - -[Standard.NTarm64] -%avshws.DeviceDesc%=avshws.NTarm64,AVSHWS - -;--------------------------------------------------------------- -; x 86 D D I n s t a l l -;--------------------------------------------------------------- - -[avshws.NTx86] -Include=ks.inf, KSCAPTUR.inf -Needs=KS.Registration,KSCAPTUR.Registration.NT -CopyFiles=avshws.CopyFiles - -;--------------------------------------------------------------- -; A M D 64 D D I n s t a l l -;--------------------------------------------------------------- - -[avshws.NTamd64] -Include=ks.inf,KSCAPTUR.inf -Needs=KS.Registration,KSCAPTUR.Registration.NT -CopyFiles=avshws.CopyFiles - -;--------------------------------------------------------------- -; A R M D D I n s t a l l -;--------------------------------------------------------------- - -[avshws.NTarm] -Include=ks.inf,KSCAPTUR.inf -Needs=KS.Registration,KSCAPTUR.Registration.NT -CopyFiles=avshws.CopyFiles - -;--------------------------------------------------------------- -; A R M 64 D D I n s t a l l -;--------------------------------------------------------------- - -[avshws.NTarm64] -Include=ks.inf,KSCAPTUR.inf -Needs=KS.Registration,KSCAPTUR.Registration.NT -CopyFiles=avshws.CopyFiles - -;--------------------------------------------------------------- -; I n t e r f a c e s -;--------------------------------------------------------------- - -[avshws.NTx86.Interfaces] -AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO_CAMERA%,"GLOBAL",CaptureInterface.NT,0 - -[avshws.NTamd64.Interfaces] -AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO_CAMERA%,"GLOBAL",CaptureInterface.NT,0 - -[avshws.NTarm.Interfaces] -AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO_CAMERA%,"GLOBAL",CaptureInterface.NT,0 - -[avshws.NTarm64.Interfaces] -AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO%,"GLOBAL",CaptureInterface.NT,0 -AddInterface=%KSCATEGORY_VIDEO_CAMERA%,"GLOBAL",CaptureInterface.NT,0 - -[CaptureInterface.NT] -AddReg=avshws.Reader.AddReg - -;--------------------------------------------------------------- -; A d d R e g -;--------------------------------------------------------------- - -[avshws.Reader.AddReg] -HKR,,CLSID,,%Proxy.CLSID% -HKR,,FriendlyName,,%avshws.Reader.FriendlyName% - -;--------------------------------------------------------------- -; S e r v i c e s -;--------------------------------------------------------------- - -[avshws.NTx86.Services] -AddService=avshws, 0x00000002, avshws.ServiceInstall - -[avshws.NTamd64.Services] -AddService=avshws, 0x00000002, avshws.ServiceInstall - -[avshws.NTarm.Services] -AddService=avshws, 0x00000002, avshws.ServiceInstall - -[avshws.NTarm64.Services] -AddService=avshws, 0x00000002, avshws.ServiceInstall - -[avshws.ServiceInstall] -DisplayName=%avshws.DeviceDesc% -ServiceType=%SERVICE_KERNEL_DRIVER% -StartType=%SERVICE_DEMAND_START% -ErrorControl=%SERVICE_ERROR_NORMAL% -ServiceBinary=%12%\avshws.sys - -;--------------------------------------------------------------- -; S t r i n g s -;--------------------------------------------------------------- - -[Strings] -; non-localizable -Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}" -KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}" -KSCATEGORY_VIDEO="{6994AD05-93EF-11D0-A3CC-00A0C9223196}" -KSCATEGORY_VIDEO_CAMERA="{E5323777-F976-4f5b-9B55-B94699C46E44}" - -SERVICE_KERNEL_DRIVER=1 -SERVICE_DEMAND_START=3 -SERVICE_ERROR_NORMAL=1 -REG_DWORD=0x00010001 - -;localizable -ProviderName="TODO-Set-Provider" -ManufacturerName="TODO-Set-Manufacturer" -avshws.DeviceDesc="AVStream Simulated Hardware Sample" -avshws.Reader.FriendlyName="avshws Source" -cdname="AVSHWS Installation Disk"
\ No newline at end of file diff --git a/avstream/avshws/avshws.inx b/avstream/avshws/avshws.inx Binary files differnew file mode 100644 index 00000000..ca763d0a --- /dev/null +++ b/avstream/avshws/avshws.inx diff --git a/avstream/avshws/avshws.sln b/avstream/avshws/avshws.sln index 877a4ca9..ba4ee493 100644 --- a/avstream/avshws/avshws.sln +++ b/avstream/avshws/avshws.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29519.181 MinimumVisualStudioVersion = 12.0 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avshws", "avshws.vcxproj", "{77FA53EC-3637-411C-B708-C8EED64543A4}" EndProject @@ -45,4 +45,3 @@ Global 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 115a05c9..7d9e015a 100644 --- a/avstream/avshws/avshws.vcxproj +++ b/avstream/avshws/avshws.vcxproj @@ -319,7 +319,7 @@ <ResourceCompile Include="avshws.rc" /> </ItemGroup> <ItemGroup> - <Inf Exclude="@(Inf)" Include="*.inf" /> + <Inf Exclude="@(Inf)" Include="*.inf;*.inx" /> <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" /> </ItemGroup> <ItemGroup> @@ -331,4 +331,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/avstream/avshws/capture.cpp b/avstream/avshws/capture.cpp index d68ce1da..13ddbfc0 100644 --- a/avstream/avshws/capture.cpp +++ b/avstream/avshws/capture.cpp @@ -265,7 +265,7 @@ Return Value: VideoInfoHeader); m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> ( - ExAllocatePoolWithTag ( + ExAllocatePoolZero ( NonPagedPoolNx, KS_SIZE_VIDEOHEADER (ConnectionHeader), AVSHWS_POOLTAG diff --git a/avstream/avshws/device.cpp b/avstream/avshws/device.cpp index 44fc9704..b0a7fb23 100644 --- a/avstream/avshws/device.cpp +++ b/avstream/avshws/device.cpp @@ -31,13 +31,7 @@ PVOID operator new POOL_TYPE poolType ) { - PVOID result = ExAllocatePoolWithTag(poolType,iSize,'wNCK'); - - if (result) { - RtlZeroMemory(result,iSize); - } - - return result; + return ExAllocatePoolZero(poolType,iSize,'wNCK'); } PVOID operator new @@ -50,13 +44,7 @@ PVOID operator new ULONG tag ) { - PVOID result = ExAllocatePoolWithTag(poolType,iSize,tag); - - if (result) { - RtlZeroMemory(result,iSize); - } - - return result; + return ExAllocatePoolZero(poolType,iSize,tag); } PVOID @@ -69,14 +57,7 @@ operator new[]( ULONG tag ) { - PVOID result = ExAllocatePoolWithTag(poolType, iSize, tag); - - if (result) - { - RtlZeroMemory(result, iSize); - } - - return result; + return ExAllocatePoolWZero(poolType, iSize, tag); } /*++ diff --git a/avstream/avshws/hwsim.cpp b/avstream/avshws/hwsim.cpp index 1e813bc2..46d6be62 100644 --- a/avstream/avshws/hwsim.cpp +++ b/avstream/avshws/hwsim.cpp @@ -219,7 +219,7 @@ Return Value: // Allocate a scratch buffer for the synthesizer. // m_SynthesisBuffer = reinterpret_cast <PUCHAR> ( - ExAllocatePoolWithTag ( + ExAllocatePoolZero ( NonPagedPoolNx, m_ImageSize, AVSHWS_POOLTAG diff --git a/avstream/avshws/makefile b/avstream/avshws/makefile new file mode 100644 index 00000000..e8428c0d --- /dev/null +++ b/avstream/avshws/makefile @@ -0,0 +1,15 @@ +!IF 0 + +Copyright (C) Microsoft Corporation, 1999 - 1999 + +Module Name: + + makefile. + +!ENDIF + +!if "$(DDK_TARGET_OS)"=="Win2K" +!message This sample is not intended to target the Windows 2000 platform. +!else +!INCLUDE $(NTMAKEENV)\makefile.def +!endif
\ No newline at end of file |
