summaryrefslogtreecommitdiff
path: root/avstream/avssamp
diff options
context:
space:
mode:
authorAdonais Romero González <[email protected]>2020-04-07 16:17:44 -0700
committerGitHub <[email protected]>2020-04-07 16:17:44 -0700
commit13c61ceeb3f7da66a2b57730d12d14eb7463c46a (patch)
treeff52f9ac442a60625936a266db1bef12ac694a8e /avstream/avssamp
parentdd4fad494b996f5729be98e0271ea74ef1a5d2ad (diff)
parent27c8560ba860165db5a173b37591271397d20bb7 (diff)
Update all the AvStream samples for Vibranium136198136197136196136195136194
Update all the AvStream samples for Vibranium.
Diffstat (limited to 'avstream/avssamp')
-rw-r--r--avstream/avssamp/Filter.cpp6
-rw-r--r--avstream/avssamp/avssamp.cpp16
-rw-r--r--avstream/avssamp/avssamp.inf93
-rw-r--r--avstream/avssamp/avssamp.inxbin0 -> 3226 bytes
-rw-r--r--avstream/avssamp/avssamp.vcxproj2
-rw-r--r--avstream/avssamp/makefile15
-rw-r--r--avstream/avssamp/video.cpp10
-rw-r--r--avstream/avssamp/wave.cpp2
8 files changed, 27 insertions, 117 deletions
diff --git a/avstream/avssamp/Filter.cpp b/avstream/avssamp/Filter.cpp
index 524d6ad8..b3b70c30 100644
--- a/avstream/avssamp/Filter.cpp
+++ b/avstream/avssamp/Filter.cpp
@@ -268,17 +268,17 @@ Return Value:
//
PKSDATARANGE_AUDIO DataRangeAudio =
reinterpret_cast <PKSDATARANGE_AUDIO> (
- ExAllocatePoolWithTag (PagedPool, sizeof (KSDATARANGE_AUDIO), AVSSMP_POOLTAG)
+ ExAllocatePoolZero (PagedPool, sizeof (KSDATARANGE_AUDIO), AVSSMP_POOLTAG)
);
PKSDATARANGE_AUDIO *DataRanges =
reinterpret_cast <PKSDATARANGE_AUDIO *> (
- ExAllocatePoolWithTag (PagedPool, sizeof (PKSDATARANGE_AUDIO), AVSSMP_POOLTAG)
+ ExAllocatePoolZero (PagedPool, sizeof (PKSDATARANGE_AUDIO), AVSSMP_POOLTAG)
);
PKSALLOCATOR_FRAMING_EX Framing =
reinterpret_cast <PKSALLOCATOR_FRAMING_EX> (
- ExAllocatePoolWithTag (PagedPool, sizeof (KSALLOCATOR_FRAMING_EX), AVSSMP_POOLTAG)
+ ExAllocatePoolZero (PagedPool, sizeof (KSALLOCATOR_FRAMING_EX), AVSSMP_POOLTAG)
);
if (DataRangeAudio && DataRanges && Framing) {
diff --git a/avstream/avssamp/avssamp.cpp b/avstream/avssamp/avssamp.cpp
index 68741c9e..1ba03089 100644
--- a/avstream/avssamp/avssamp.cpp
+++ b/avstream/avssamp/avssamp.cpp
@@ -38,13 +38,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
@@ -57,13 +51,7 @@ PVOID operator new
ULONG tag
)
{
- PVOID result = ExAllocatePoolWithTag(poolType,iSize,tag);
-
- if (result) {
- RtlZeroMemory(result,iSize);
- }
-
- return result;
+ return ExAllocatePoolZero(poolType,iSize,tag);
}
/*++
diff --git a/avstream/avssamp/avssamp.inf b/avstream/avssamp/avssamp.inf
deleted file mode 100644
index 00003e78..00000000
--- a/avstream/avssamp/avssamp.inf
+++ /dev/null
@@ -1,93 +0,0 @@
-; Copyright (c) Microsoft Corporation. All rights reserved.
-;
-; avssamp.INF -- This file contains installation information for the filter-based
-; AVStream sample driver avssamp.sys
-;
-; Note:
-;
-; This INF expects the following hierarchy in the installation folder:
-;
-; \
-; avssamp.inf
-; avssamp.sys
-;
-
-[Version]
-Signature="$Windows NT$"
-Class=Camera
-ClassGuid={ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
-Provider=%ProviderName%
-CatalogFile=avssamp.cat
-DriverVer=09/30/2004,1.0.0.0
-
-[SourceDisksNames]
-1000 = %cdname%,,,
-
-[SourceDisksFiles]
-avssamp.sys = 1000
-
-[ControlFlags]
-ExcludeFromSelect=*
-
-[DestinationDirs]
-avssamp.CopyFiles=12
-
-[Manufacturer]
-%ManufacturerName%=Standard,NTamd64,NTx86
-
-;---------------------------------------------------------------
-; The preferred method to install as a Root-enumerated device.
-; NOTE: DO NOT INCLUDE THIS FOR A HARDWARE DRIVER!
-;---------------------------------------------------------------
-
-[DeviceInstall32]
-AddDevice = ROOT\SW\{20698827-7099-4c4e-861A-4879D639A35F},,avssamp_RootEnumInstall
-
-[avssamp_RootEnumInstall]
-HardwareIds = SW\{20698827-7099-4c4e-861A-4879D639A35F}
-;---------------------------------------------------------------
-
-[Standard.NTx86]
-%avssamp.DeviceDesc%=avssamp,SW\{20698827-7099-4c4e-861A-4879D639A35F}
-
-[Standard.NTamd64]
-%avssamp.DeviceDesc%=avssamp,SW\{20698827-7099-4c4e-861A-4879D639A35F}
-
-[avssamp.NT]
-include=ks.inf,kscaptur.inf
-needs=KS.Registration,KSCAPTUR.Registration.NT
-CopyFiles=avssamp.CopyFiles
-
-[avssamp.CopyFiles]
-avssamp.sys
-
-[avssamp.NT.Services]
-AddService=avssamp, 0x00000002, avssamp.ServiceInstall
-
-[avssamp.ServiceInstall]
-DisplayName=%avssamp.DeviceDesc%
-ServiceType=%SERVICE_KERNEL_DRIVER%
-StartType=%SERVICE_DEMAND_START%
-ErrorControl=%SERVICE_ERROR_NORMAL%
-ServiceBinary=%12%\avssamp.sys
-
-[Strings]
-; non-localizable
-Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
-avssamp.DeviceId="{20698827-7099-4c4e-861A-4879D639A35F}"
-KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
-KSSTRING_Filter="{9B365890-165F-11D0-A195-0020AFD156E4}"
-
-SERVICE_KERNEL_DRIVER=1
-SERVICE_DEMAND_START=3
-SERVICE_ERROR_NORMAL=1
-REG_EXPAND_SZ=0x00020000
-REG_DWORD=0x00010001
-
-;localizable
-ProviderName="TODO-Set-Provider"
-ManufacturerName="TODO-Set-Manufacturer"
-avssamp.DeviceDesc="AVStream Filter-Centric Sample Driver"
-avssamp.Reader.FriendlyName="avssamp Source"
-
-cdname="Disk 1"
diff --git a/avstream/avssamp/avssamp.inx b/avstream/avssamp/avssamp.inx
new file mode 100644
index 00000000..bcb18baa
--- /dev/null
+++ b/avstream/avssamp/avssamp.inx
Binary files differ
diff --git a/avstream/avssamp/avssamp.vcxproj b/avstream/avssamp/avssamp.vcxproj
index 21c292d2..77567a8f 100644
--- a/avstream/avssamp/avssamp.vcxproj
+++ b/avstream/avssamp/avssamp.vcxproj
@@ -187,7 +187,7 @@
<ResourceCompile Include="avssamp.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>
diff --git a/avstream/avssamp/makefile b/avstream/avssamp/makefile
new file mode 100644
index 00000000..ab62d10e
--- /dev/null
+++ b/avstream/avssamp/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
diff --git a/avstream/avssamp/video.cpp b/avstream/avssamp/video.cpp
index d2291a24..1be9b56e 100644
--- a/avstream/avssamp/video.cpp
+++ b/avstream/avssamp/video.cpp
@@ -1,4 +1,4 @@
-/**************************************************************************
+/**************************************************************************
AVStream Filter-Centric Sample
@@ -23,7 +23,7 @@
/**************************************************************************
PAGEABLE CODE
-
+
**************************************************************************/
#ifdef ALLOC_PRAGMA
@@ -210,7 +210,7 @@ Return Value:
VideoInfoHeader);
m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> (
- ExAllocatePoolWithTag (
+ ExAllocatePoolZero (
NonPagedPool,
KS_SIZE_VIDEOHEADER (ConnectionHeader),
AVSSMP_POOLTAG
@@ -557,7 +557,7 @@ Routine Description:
selected in order to change the format for the pin. In this case,
OldFormat will not be NULL.
- Validate that the format is acceptible and perform the actions necessary
+ Validate that the format is acceptable and perform the actions necessary
to change format if appropriate.
Arguments:
@@ -864,7 +864,7 @@ Return Value:
if (FromState == KSSTATE_STOP) {
m_SynthesisBuffer = reinterpret_cast <PUCHAR> (
- ExAllocatePoolWithTag (
+ ExAllocatePoolZero (
NonPagedPool,
m_VideoInfoHeader -> bmiHeader.biSizeImage,
AVSSMP_POOLTAG
diff --git a/avstream/avssamp/wave.cpp b/avstream/avssamp/wave.cpp
index 7af2f60a..de110e69 100644
--- a/avstream/avssamp/wave.cpp
+++ b/avstream/avssamp/wave.cpp
@@ -319,7 +319,7 @@ Return Value:
//
if (NT_SUCCESS (Status)) {
m_WaveData = reinterpret_cast <PUCHAR> (
- ExAllocatePoolWithTag (NonPagedPool, DataBlockSize, AVSSMP_POOLTAG)
+ ExAllocatePoolZero (NonPagedPool, DataBlockSize, AVSSMP_POOLTAG)
);
if (!m_WaveData) {