diff options
| author | ruki <[email protected]> | 2022-09-17 00:42:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-17 00:42:42 +0800 |
| commit | 35dba941d82bb0ffeed07709843d432278afbc6f (patch) | |
| tree | da83fff9444692da4c69d60fbfa80212c561e99f | |
| parent | 58f335941b3fcaeb05e44cf52eaea0f6f85d4d57 (diff) | |
remove tailing spaces for tests
39 files changed, 734 insertions, 734 deletions
diff --git a/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.c b/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.c index 13f811f35..b628db885 100644 --- a/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.c +++ b/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.c @@ -164,7 +164,7 @@ Return Value: // software device.
//
status = NonPnpDeviceAdd(hDriver, pInit);
-
+
return status;
}
@@ -311,17 +311,17 @@ Return Value: //attributes.ExecutionLevel = WdfExecutionLevelPassive;
//
- // By default, Static Driver Verifier (SDV) displays a warning if it
- // doesn't find the EvtIoStop callback on a power-managed queue.
- // The 'assume' below causes SDV to suppress this warning. If the driver
+ // By default, Static Driver Verifier (SDV) displays a warning if it
+ // doesn't find the EvtIoStop callback on a power-managed queue.
+ // The 'assume' below causes SDV to suppress this warning. If the driver
// has not explicitly set PowerManaged to WdfFalse, the framework creates
- // power-managed queues when the device is not a filter driver. Normally
+ // power-managed queues when the device is not a filter driver. Normally
// the EvtIoStop is required for power-managed queues, but for this driver
- // it is not needed b/c the driver doesn't hold on to the requests or
- // forward them to other drivers. This driver completes the requests
- // directly in the queue's handlers. If the EvtIoStop callback is not
+ // it is not needed b/c the driver doesn't hold on to the requests or
+ // forward them to other drivers. This driver completes the requests
+ // directly in the queue's handlers. If the EvtIoStop callback is not
// implemented, the framework waits for all driver-owned requests to be
- // done before moving in the Dx/sleep states or before removing the
+ // done before moving in the Dx/sleep states or before removing the
// device, which is the correct behavior for this type of driver.
// If the requests were taking an indeterminate amount of time to complete,
// or if the driver forwarded the requests to a lower driver/another stack,
@@ -847,7 +847,7 @@ Return Value: Hexdump((TRACE_LEVEL_VERBOSE, DBG_IOCTL, "Data from User : %!HEXDUMP!\n",
log_xstr(inBuf, (USHORT)InputBufferLength)));
PrintChars(inBuf, InputBufferLength );
-
+
status = WdfRequestRetrieveOutputBuffer(Request, 0, &outBuf, &bufSize);
if(!NT_SUCCESS(status)) {
@@ -1175,7 +1175,7 @@ Return Value: // pointers in the request context.
//
- #pragma prefast(suppress:6387, "If inBuf==NULL at this point, then inBufLen==0")
+ #pragma prefast(suppress:6387, "If inBuf==NULL at this point, then inBufLen==0")
status = WdfRequestProbeAndLockUserBufferForRead(Request,
inBuf,
inBufLen,
diff --git a/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.h b/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.h index c874e79d2..af5e57f4f 100644 --- a/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.h +++ b/tests/projects/windows/driver/kmdf/ioctl/driver/nonpnp.h @@ -57,8 +57,8 @@ WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(REQUEST_CONTEXT, GetRequestContext) DRIVER_INITIALIZE DriverEntry;
//
-// Don't use EVT_WDF_DRIVER_DEVICE_ADD for NonPnpDeviceAdd even though
-// the signature is same because this is not an event called by the
+// Don't use EVT_WDF_DRIVER_DEVICE_ADD for NonPnpDeviceAdd even though
+// the signature is same because this is not an event called by the
// framework.
//
NTSTATUS
diff --git a/tests/projects/windows/driver/kmdf/ioctl/driver/trace.h b/tests/projects/windows/driver/kmdf/ioctl/driver/trace.h index 089f213f0..4fd6e1567 100644 --- a/tests/projects/windows/driver/kmdf/ioctl/driver/trace.h +++ b/tests/projects/windows/driver/kmdf/ioctl/driver/trace.h @@ -6,7 +6,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
-
+
Module Name:
TRACE.h
@@ -21,14 +21,14 @@ Environment: --*/
-//
+//
// If software tracing is defined in the sources file..
// WPP_DEFINE_CONTROL_GUID specifies the GUID used for this driver.
// *** REPLACE THE GUID WITH YOUR OWN UNIQUE ID ***
-// WPP_DEFINE_BIT allows setting debug bit masks to selectively print.
-// The names defined in the WPP_DEFINE_BIT call define the actual names
-// that are used to control the level of tracing for the control guid
-// specified.
+// WPP_DEFINE_BIT allows setting debug bit masks to selectively print.
+// The names defined in the WPP_DEFINE_BIT call define the actual names
+// that are used to control the level of tracing for the control guid
+// specified.
//
// {71ae54db-0862-41bf-a24f-5330cec3c7f6}
//
@@ -40,7 +40,7 @@ Environment: WPP_DEFINE_BIT(DBG_INIT) \
WPP_DEFINE_BIT(DBG_RW) \
WPP_DEFINE_BIT(DBG_IOCTL) \
- )
+ )
#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
diff --git a/tests/projects/windows/driver/kmdf/ioctl/exe/install.c b/tests/projects/windows/driver/kmdf/ioctl/exe/install.c index 53d1f7678..a779053d3 100644 --- a/tests/projects/windows/driver/kmdf/ioctl/exe/install.c +++ b/tests/projects/windows/driver/kmdf/ioctl/exe/install.c @@ -155,7 +155,7 @@ Return Value: if (err == ERROR_SUCCESS_REBOOT_REQUIRED) {
printf("System needs to be rebooted, before the driver installation can proceed.\n");
}
-
+
return FALSE;
}
@@ -742,7 +742,7 @@ LoadWdfCoInstaller( if (FAILED( StringCchCat(szCurDir, MAX_PATH, tempCoinstallerName) )) {
break;
}
-
+
library = LoadLibrary(szCurDir);
if (library == NULL) {
diff --git a/tests/projects/windows/driver/kmdf/ioctl/exe/testapp.c b/tests/projects/windows/driver/kmdf/ioctl/exe/testapp.c index c12f26073..6ec41747e 100644 --- a/tests/projects/windows/driver/kmdf/ioctl/exe/testapp.c +++ b/tests/projects/windows/driver/kmdf/ioctl/exe/testapp.c @@ -29,9 +29,9 @@ Environment: --*/
-
+
#include <DriverSpecs.h>
-_Analysis_mode_(_Analysis_code_type_user_code_)
+_Analysis_mode_(_Analysis_code_type_user_code_)
#include <windows.h>
diff --git a/tests/projects/windows/driver/kmdf/serial/immediat.c b/tests/projects/windows/driver/kmdf/serial/immediat.c index 9fd7683af..ba7a970c9 100644 --- a/tests/projects/windows/driver/kmdf/serial/immediat.c +++ b/tests/projects/windows/driver/kmdf/serial/immediat.c @@ -150,7 +150,7 @@ Return Value: "<SerialStartImmediate\n");
}
-
+
VOID
SerialCompleteImmediate(
IN WDFDPC Dpc
@@ -181,7 +181,7 @@ SerialCompleteImmediate( SerialDbgPrintEx(TRACE_LEVEL_INFORMATION, DBG_IOCTLS, "<SerialCompleteImmediate\n");
}
-
+
VOID
SerialTimeoutImmediate(
IN WDFTIMER Timer
@@ -210,7 +210,7 @@ SerialTimeoutImmediate( SerialDbgPrintEx(TRACE_LEVEL_INFORMATION, DBG_IOCTLS, "<SerialTimeoutImmediate\n");
}
-
+
VOID
SerialGetNextImmediate(
IN WDFREQUEST *CurrentOpRequest,
@@ -270,7 +270,7 @@ Return Value: SerialCompleteRequest(oldRequest, reqContext->Status, reqContext->Information);
}
-
+
VOID
SerialCancelImmediate(
IN WDFREQUEST Request
@@ -315,7 +315,7 @@ Return Value: );
}
-
+
BOOLEAN
SerialGiveImmediateToIsr(
IN WDFINTERRUPT Interrupt,
@@ -397,7 +397,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialGrabImmediateFromIsr(
IN WDFINTERRUPT Interrupt,
diff --git a/tests/projects/windows/driver/kmdf/serial/isr.c b/tests/projects/windows/driver/kmdf/serial/isr.c index 806164a61..64ed17d03 100644 --- a/tests/projects/windows/driver/kmdf/serial/isr.c +++ b/tests/projects/windows/driver/kmdf/serial/isr.c @@ -853,7 +853,7 @@ doTrasmitStuff:; return ServicedAnInterrupt;
}
-
+
VOID
SerialPutChar(
IN PSERIAL_DEVICE_EXTENSION Extension,
@@ -1220,7 +1220,7 @@ Return Value: }
}
-
+
UCHAR
SerialProcessLSR(
IN PSERIAL_DEVICE_EXTENSION Extension
diff --git a/tests/projects/windows/driver/kmdf/serial/modmflow.c b/tests/projects/windows/driver/kmdf/serial/modmflow.c index 1c71ae3fd..6eada7b53 100644 --- a/tests/projects/windows/driver/kmdf/serial/modmflow.c +++ b/tests/projects/windows/driver/kmdf/serial/modmflow.c @@ -29,7 +29,7 @@ Environment: EVT_WDF_INTERRUPT_SYNCHRONIZE SerialDecrementRTSCounter;
-
+
BOOLEAN
SerialSetDTR(
IN WDFINTERRUPT Interrupt,
@@ -71,7 +71,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialClrDTR(
IN WDFINTERRUPT Interrupt,
@@ -113,7 +113,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialSetRTS(
IN WDFINTERRUPT Interrupt,
@@ -155,7 +155,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialClrRTS(
IN WDFINTERRUPT Interrupt,
@@ -197,7 +197,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialSetupNewHandFlow(
IN PSERIAL_DEVICE_EXTENSION Extension,
@@ -663,7 +663,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialSetHandFlow(
IN WDFINTERRUPT Interrupt,
@@ -710,7 +710,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialTurnOnBreak(
IN WDFINTERRUPT Interrupt,
@@ -764,7 +764,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialTurnOffBreak(
IN WDFINTERRUPT Interrupt,
@@ -851,7 +851,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialPretendXoff(
IN WDFINTERRUPT Interrupt,
@@ -903,7 +903,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialPretendXon(
IN WDFINTERRUPT Interrupt,
@@ -971,7 +971,7 @@ Return Value: return FALSE;
}
-
+
VOID
SerialHandleReducedIntBuffer(
IN PSERIAL_DEVICE_EXTENSION Extension
@@ -1045,7 +1045,7 @@ Return Value: }
}
-
+
VOID
SerialProdXonXoff(
IN PSERIAL_DEVICE_EXTENSION Extension,
@@ -1109,7 +1109,7 @@ Return Value: }
}
-
+
ULONG
SerialHandleModemUpdate(
IN PSERIAL_DEVICE_EXTENSION Extension,
@@ -1433,7 +1433,7 @@ Return Value: return ((ULONG)ModemStatus);
}
-
+
BOOLEAN
SerialPerhapsLowerRTS(
IN WDFINTERRUPT Interrupt,
@@ -1554,7 +1554,7 @@ Return Value: return FALSE;
}
-
+
VOID
SerialStartTimerLowerRTS(
IN WDFDPC Dpc
@@ -1629,7 +1629,7 @@ Return Value: SerialDbgPrintEx(TRACE_LEVEL_INFORMATION, DBG_IOCTLS, "<SerialStartTimerLowerRTS\n");
}
-
+
VOID
SerialInvokePerhapsLowerRTS(
IN WDFTIMER Timer
@@ -1666,7 +1666,7 @@ Return Value: );
}
-
+
BOOLEAN
SerialDecrementRTSCounter(
IN WDFINTERRUPT Interrupt,
diff --git a/tests/projects/windows/driver/kmdf/serial/pnp.c b/tests/projects/windows/driver/kmdf/serial/pnp.c index 8773f30ac..62080e749 100644 --- a/tests/projects/windows/driver/kmdf/serial/pnp.c +++ b/tests/projects/windows/driver/kmdf/serial/pnp.c @@ -91,10 +91,10 @@ PVOID LocalMmMapIoSpace( if (pMmMapIoSpaceEx != NULL){
//
// Call WIN10 API if available
- //
+ //
return pMmMapIoSpaceEx(PhysicalAddress,
NumberOfBytes,
- PAGE_READWRITE | PAGE_NOCACHE);
+ PAGE_READWRITE | PAGE_NOCACHE);
}
//
@@ -103,7 +103,7 @@ PVOID LocalMmMapIoSpace( // is not present. MmMapIoSpaceEx is available starting in WIN10.
//
#pragma warning(suppress: 30029)
- return MmMapIoSpace(PhysicalAddress, NumberOfBytes, MmNonCached);
+ return MmMapIoSpace(PhysicalAddress, NumberOfBytes, MmNonCached);
}
NTSTATUS
@@ -689,7 +689,7 @@ Return Value: ExFreePool(deviceExtension->InterruptReadBuffer);
deviceExtension->InterruptReadBuffer = NULL;
}
-
+
//
// Update the global configuration count for serial device.
//
@@ -1462,16 +1462,16 @@ Return Value: // __WARNING_IRQ_SET_TOO_HIGH: we are calling interrupt synchronize routine directly. Suppress it because interrupt is not connected yet.
// __WARNING_INVALID_PARAM_VALUE_1: Interrupt is UNREFERENCED_PARAMETER, so it can be NULL
-#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
+#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
SerialReset(NULL, pDevExt);
-#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
+#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
SerialMarkClose(NULL, pDevExt);
-#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
+#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
SerialClrRTS(NULL, pDevExt);
-#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
+#pragma warning(suppress: __WARNING_IRQ_SET_TOO_HIGH; suppress: __WARNING_INVALID_PARAM_VALUE_1)
SerialClrDTR(NULL, pDevExt);
//
@@ -2033,7 +2033,7 @@ Return Value: if(stringHandle) {
WdfObjectDelete(stringHandle);
}
-
+
return status;
}
@@ -2751,10 +2751,10 @@ Return Value: RtlInitUnicodeString(&funcName, L"KeQueryActiveGroupCount");
fnKeQueryActiveGroupCount = (PFN_KE_GET_ACTIVE_GROUP_COUNT)
MmGetSystemRoutineAddress(&funcName);
-
+
if (fnKeQueryActiveGroupCount != NULL) {
groupCount = fnKeQueryActiveGroupCount();
-
+
//
// Make sure there is at least one group for the boot processor.
//
@@ -2762,7 +2762,7 @@ Return Value: groupCount = 1;
}
}
-
+
if (groupCount <= SERIAL_PREFERRED_INTERRUPT_GROUP) {
group = groupCount - 1;
}
@@ -2787,7 +2787,7 @@ Return Value: groupAffinity = (KAFFINITY)1;
}
}
-
+
//
// Initialize group.
//
diff --git a/tests/projects/windows/driver/kmdf/serial/purge.c b/tests/projects/windows/driver/kmdf/serial/purge.c index fcc32148e..73e59c143 100644 --- a/tests/projects/windows/driver/kmdf/serial/purge.c +++ b/tests/projects/windows/driver/kmdf/serial/purge.c @@ -119,7 +119,7 @@ Return Value: return;
}
-
+
BOOLEAN
SerialPurgeInterruptBuff(
IN WDFINTERRUPT Interrupt,
diff --git a/tests/projects/windows/driver/kmdf/serial/serial.h b/tests/projects/windows/driver/kmdf/serial/serial.h index fcbf9748f..ce3db916b 100644 --- a/tests/projects/windows/driver/kmdf/serial/serial.h +++ b/tests/projects/windows/driver/kmdf/serial/serial.h @@ -515,7 +515,7 @@ typedef struct _SERIAL_FIRMWARE_DATA { //
#define SERIAL_BAD_VALUE ((ULONG)-1)
-
+
typedef struct _SERIAL_DEVICE_STATE {
//
// TRUE if we need to set the state to open
@@ -1417,7 +1417,7 @@ do \ LineControl \
); \
} WHILE (0)
-
+
//
// Reads the divisor latch register. The divisor latch register
// is used to control the baud rate of the 8250.
@@ -1456,7 +1456,7 @@ do \ LineControl \
); \
} WHILE (0)
-
+
//
// This macro reads the interrupt enable register.
//
@@ -1467,7 +1467,7 @@ do \ //
#define READ_INTERRUPT_ENABLE(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+INTERRUPT_ENABLE_REGISTER))
-
+
//
// This macro writes the interrupt enable register.
//
@@ -1486,7 +1486,7 @@ do \ Values \
); \
} WHILE (0)
-
+
//
// This macro disables all interrupts on the hardware.
//
@@ -1501,7 +1501,7 @@ do \ { \
WRITE_INTERRUPT_ENABLE(Extension, BaseAddress,0); \
} WHILE (0)
-
+
//
// This macro enables all interrupts on the hardware.
//
@@ -1522,7 +1522,7 @@ do \ ); \
\
} WHILE (0)
-
+
//
// This macro reads the interrupt identification register
//
@@ -1539,7 +1539,7 @@ do \ //
#define READ_INTERRUPT_ID_REG(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+INTERRUPT_IDENT_REGISTER))
-
+
//
// This macro reads the modem control register
//
@@ -1551,7 +1551,7 @@ do \ //
#define READ_MODEM_CONTROL(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+MODEM_CONTROL_REGISTER))
-
+
//
// This macro reads the modem status register
//
@@ -1563,7 +1563,7 @@ do \ //
#define READ_MODEM_STATUS(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+MODEM_STATUS_REGISTER))
-
+
//
// This macro reads a value out of the receive buffer
//
@@ -1575,7 +1575,7 @@ do \ //
#define READ_RECEIVE_BUFFER(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+RECEIVE_BUFFER_REGISTER))
-
+
//
// This macro reads the line status register
//
@@ -1587,7 +1587,7 @@ do \ //
#define READ_LINE_STATUS(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+LINE_STATUS_REGISTER))
-
+
//
// This macro writes the line control register
//
@@ -1605,7 +1605,7 @@ do \ (NewLineControl) \
); \
} WHILE (0)
-
+
//
// This macro reads the line control register
//
@@ -1618,7 +1618,7 @@ do \ #define READ_LINE_CONTROL(Extension, BaseAddress) \
(Extension->SerialReadUChar((BaseAddress)+LINE_CONTROL_REGISTER))
-
+
//
// This macro writes to the transmit register
//
@@ -1638,7 +1638,7 @@ do \ (TransmitChar) \
); \
} WHILE (0)
-
+
//
// This macro writes to the transmit FIFO register
//
@@ -1661,7 +1661,7 @@ do \ (TxN) \
); \
} WHILE (0)
-
+
//
// This macro writes to the control register
//
@@ -1681,7 +1681,7 @@ do \ (ControlValue) \
); \
} WHILE (0)
-
+
//
// This macro writes to the modem control register
//
diff --git a/tests/projects/windows/driver/kmdf/serial/serialp.h b/tests/projects/windows/driver/kmdf/serial/serialp.h index d363f3503..d536280db 100644 --- a/tests/projects/windows/driver/kmdf/serial/serialp.h +++ b/tests/projects/windows/driver/kmdf/serial/serialp.h @@ -39,7 +39,7 @@ DRIVER_INITIALIZE DriverEntry; EVT_WDF_DRIVER_DEVICE_ADD SerialEvtDeviceAdd;
EVT_WDF_OBJECT_CONTEXT_CLEANUP SerialEvtDriverContextCleanup;
EVT_WDF_DEVICE_CONTEXT_CLEANUP SerialEvtDeviceContextCleanup;
-
+
EVT_WDF_DEVICE_D0_ENTRY SerialEvtDeviceD0Entry;
EVT_WDF_DEVICE_D0_EXIT SerialEvtDeviceD0Exit;
EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED SerialEvtDeviceD0EntryPostInterruptsEnabled;
@@ -113,7 +113,7 @@ SerialGetNextWrite( EVT_WDFDEVICE_WDM_IRP_PREPROCESS SerialWdmDeviceFileCreate;
EVT_WDFDEVICE_WDM_IRP_PREPROCESS SerialWdmFileClose;
EVT_WDFDEVICE_WDM_IRP_PREPROCESS SerialFlush;
-
+
EVT_WDFDEVICE_WDM_IRP_PREPROCESS SerialQueryInformationFile;
EVT_WDFDEVICE_WDM_IRP_PREPROCESS SerialSetInformationFile;
@@ -173,7 +173,7 @@ EVT_WDF_REQUEST_CANCEL SerialCancelWait; EVT_WDF_INTERRUPT_SYNCHRONIZE SerialPurgeInterruptBuff;
-
+
VOID
SerialPurgeRequests(
IN WDFQUEUE QueueToClean,
@@ -574,7 +574,7 @@ typedef struct _SERIAL_IOCTL_SYNC { // Prototypes and defines to handle processor groups.
//
typedef
-USHORT
+USHORT
(*PFN_KE_GET_ACTIVE_GROUP_COUNT)(
VOID
);
diff --git a/tests/projects/windows/driver/kmdf/serial/waitmask.c b/tests/projects/windows/driver/kmdf/serial/waitmask.c index c3139679e..da5dfa098 100644 --- a/tests/projects/windows/driver/kmdf/serial/waitmask.c +++ b/tests/projects/windows/driver/kmdf/serial/waitmask.c @@ -307,7 +307,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialGiveWaitToIsr(
IN WDFINTERRUPT Interrupt,
@@ -412,7 +412,7 @@ Return Value: return FALSE;
}
-
+
BOOLEAN
SerialFinishOldWait(
IN WDFINTERRUPT Interrupt,
@@ -543,7 +543,7 @@ Return Value: }
-
+
VOID
SerialCompleteWait(
IN WDFDPC Dpc
diff --git a/tests/projects/windows/driver/kmdf/serial/wmi.c b/tests/projects/windows/driver/kmdf/serial/wmi.c index 0076f4337..05e01ec65 100644 --- a/tests/projects/windows/driver/kmdf/serial/wmi.c +++ b/tests/projects/windows/driver/kmdf/serial/wmi.c @@ -228,7 +228,7 @@ EvtWmiQueryPortHWData( if (OutBufferSize < *BufferUsed) {
return STATUS_INSUFFICIENT_RESOURCES;
}
-
+
*(PSERIAL_WMI_HW_DATA)OutBuffer = pDevExt->WmiHwData;
return STATUS_SUCCESS;
diff --git a/tests/projects/windows/driver/umdf/skeleton/comsup.cpp b/tests/projects/windows/driver/umdf/skeleton/comsup.cpp index fb0b0807c..4822b5be4 100644 --- a/tests/projects/windows/driver/umdf/skeleton/comsup.cpp +++ b/tests/projects/windows/driver/umdf/skeleton/comsup.cpp @@ -8,7 +8,7 @@ Module Name: Abstract:
- This module contains implementations for the functions and methods
+ This module contains implementations for the functions and methods
used for providing COM support.
Environment:
@@ -33,7 +33,7 @@ CUnknown::CUnknown( Routine Description:
Constructor for an instance of the CUnknown class. This simply initializes
- the reference count of the object to 1. The caller is expected to
+ the reference count of the object to 1. The caller is expected to
call Release() if it wants to delete the object once it has been allocated.
Arguments:
@@ -56,11 +56,11 @@ CUnknown::QueryInterface( _Out_ PVOID *Object
)
/*++
-
+
Routine Description:
This method provides the basic support for query interface on CUnknown.
- If the interface requested is IUnknown it references the object and
+ If the interface requested is IUnknown it references the object and
returns an interface pointer. Otherwise it returns an error.
Arguments:
@@ -92,10 +92,10 @@ CUnknown::QueryIUnknown( VOID
)
/*++
-
+
Routine Description:
- This helper method references the object and returns a pointer to the
+ This helper method references the object and returns a pointer to the
object's IUnknown interface.
This allows other methods to convert a CUnknown pointer into an IUnknown
@@ -122,7 +122,7 @@ CUnknown::AddRef( VOID
)
/*++
-
+
Routine Description:
This method adds one to the object's reference count.
@@ -148,7 +148,7 @@ CUnknown::Release( VOID
)
/*++
-
+
Routine Description:
This method subtracts one to the object's reference count. If the count
@@ -161,8 +161,8 @@ CUnknown::Release( Return Value:
The new reference count. If the caller uses this value it should only be
- to check for zero (i.e. this call caused or will cause deletion) or
- non-zero (i.e. some other call may have caused deletion, but this one
+ to check for zero (i.e. this call caused or will cause deletion) or
+ non-zero (i.e. some other call may have caused deletion, but this one
didn't).
--*/
@@ -191,14 +191,14 @@ CClassFactory::QueryIClassFactory( VOID
)
/*++
-
+
Routine Description:
- This helper method references the object and returns a pointer to the
+ This helper method references the object and returns a pointer to the
object's IClassFactory interface.
- This allows other methods to convert a CClassFactory pointer into an
- IClassFactory pointer without a typecast and without dealing with the
+ This allows other methods to convert a CClassFactory pointer into an
+ IClassFactory pointer without a typecast and without dealing with the
return value QueryInterface.
Arguments:
@@ -221,7 +221,7 @@ CClassFactory::QueryInterface( _Out_ PVOID *Object
)
/*++
-
+
Routine Description:
This method attempts to retrieve the requested interface from the object.
@@ -268,7 +268,7 @@ CClassFactory::CreateInstance( _Out_ PVOID *Object
)
/*++
-
+
Routine Description:
This COM method is the factory routine - it creates instances of the driver
@@ -279,7 +279,7 @@ CClassFactory::CreateInstance( OuterObject - only used for aggregation, which our driver callback class
does not support.
- InterfaceId - the interface ID the caller would like to get from our
+ InterfaceId - the interface ID the caller would like to get from our
new object.
Object - a location to store the referenced interface pointer to the new
@@ -299,7 +299,7 @@ CClassFactory::CreateInstance( hr = CMyDriver::CreateInstance(&driver);
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
hr = driver->QueryInterface(InterfaceId, Object);
driver->Release();
@@ -314,11 +314,11 @@ CClassFactory::LockServer( _In_ BOOL Lock
)
/*++
-
+
Routine Description:
This COM method can be used to keep the DLL in memory. However since the
- driver's DllCanUnloadNow function always returns false, this has little
+ driver's DllCanUnloadNow function always returns false, this has little
effect. Still it tracks the number of lock and unlock operations.
Arguments:
@@ -334,8 +334,8 @@ CClassFactory::LockServer( if (Lock)
{
InterlockedIncrement(&s_LockCount);
- }
- else
+ }
+ else
{
InterlockedDecrement(&s_LockCount);
}
diff --git a/tests/projects/windows/driver/umdf/skeleton/comsup.h b/tests/projects/windows/driver/umdf/skeleton/comsup.h index ba4cd89c3..11710725d 100644 --- a/tests/projects/windows/driver/umdf/skeleton/comsup.h +++ b/tests/projects/windows/driver/umdf/skeleton/comsup.h @@ -33,11 +33,11 @@ typedef class CClassFactory *PCClassFactory; // classes.
//
-class CUnknown : public IUnknown
+class CUnknown : public IUnknown
{
//
-// Private data members and methods. These are only accessible by the methods
+// Private data members and methods. These are only accessible by the methods
// of this class.
//
private:
@@ -50,13 +50,13 @@ private: LONG m_ReferenceCount;
//
-// Protected data members and methods. These are accessible by the subclasses
+// Protected data members and methods. These are accessible by the subclasses
// but not by other classes.
//
protected:
//
- // The constructor and destructor are protected to ensure that only the
+ // The constructor and destructor are protected to ensure that only the
// subclasses of CUnknown can create and destroy instances.
//
@@ -65,8 +65,8 @@ protected: );
//
- // The destructor MUST be virtual. Since any instance of a CUnknown
- // derived class should only be deleted from within CUnknown::Release,
+ // The destructor MUST be virtual. Since any instance of a CUnknown
+ // derived class should only be deleted from within CUnknown::Release,
// the destructor MUST be virtual or only CUnknown::~CUnknown will get
// invoked on deletion.
//
@@ -74,7 +74,7 @@ protected: // called, make sure you haven't deleted the virtual destructor here.
//
- virtual
+ virtual
~CUnknown(
VOID
)
@@ -107,7 +107,7 @@ public: AddRef(
VOID
);
-
+
virtual
ULONG
STDMETHODCALLTYPE
@@ -125,15 +125,15 @@ public: };
//
-// Class factory support class. Create an instance of this from your
-// DllGetClassObject method and modify the implementation to create
+// Class factory support class. Create an instance of this from your
+// DllGetClassObject method and modify the implementation to create
// an instance of your driver event handler class.
//
-class CClassFactory : public CUnknown, public IClassFactory
+class CClassFactory : public CUnknown, public IClassFactory
{
//
-// Private data members and methods. These are only accessible by the methods
+// Private data members and methods. These are only accessible by the methods
// of this class.
//
private:
diff --git a/tests/projects/windows/driver/umdf/skeleton/device.cpp b/tests/projects/windows/driver/umdf/skeleton/device.cpp index 2efcd36f0..16121e208 100644 --- a/tests/projects/windows/driver/umdf/skeleton/device.cpp +++ b/tests/projects/windows/driver/umdf/skeleton/device.cpp @@ -1,5 +1,5 @@ /*++
-
+
Copyright (C) Microsoft Corporation, All Rights Reserved.
Module Name:
@@ -31,10 +31,10 @@ CMyDevice::CreateInstance( _Out_ PCMyDevice *Device
)
/*++
-
+
Routine Description:
- This method creates and initializs an instance of the skeleton driver's
+ This method creates and initializs an instance of the skeleton driver's
device callback object.
Arguments:
@@ -69,11 +69,11 @@ CMyDevice::CreateInstance( hr = device->Initialize(FxDriver, FxDeviceInit);
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
*Device = device;
- }
- else
+ }
+ else
{
device->Release();
}
@@ -87,7 +87,7 @@ CMyDevice::Initialize( _In_ IWDFDeviceInitialize * FxDeviceInit
)
/*++
-
+
Routine Description:
This method initializes the device callback object and creates the
@@ -96,7 +96,7 @@ CMyDevice::Initialize( The method should perform any device-specific configuration that:
* could fail (these can't be done in the constructor)
* must be done before the partner object is created -or-
- * can be done after the partner object is created and which aren't
+ * can be done after the partner object is created and which aren't
influenced by any device-level parameters the parent (the driver
in this case) might set.
@@ -114,7 +114,7 @@ CMyDevice::Initialize( HRESULT hr;
//
- // Configure things like the locking model before we go to create our
+ // Configure things like the locking model before we go to create our
// partner device.
//
@@ -125,24 +125,24 @@ CMyDevice::Initialize( FxDeviceInit->SetLockingConstraint(None);
//
- // TODO: If you're writing a filter driver then indicate that here.
+ // TODO: If you're writing a filter driver then indicate that here.
//
// FxDeviceInit->SetFilter();
//
-
+
//
- // TODO: Any per-device initialization which must be done before
+ // TODO: Any per-device initialization which must be done before
// creating the partner object.
//
//
- // Create a new FX device object and assign the new callback object to
+ // Create a new FX device object and assign the new callback object to
// handle any device level events that occur.
//
//
// QueryIUnknown references the IUnknown interface that it returns
- // (which is the same as referencing the device). We pass that to
+ // (which is the same as referencing the device). We pass that to
// CreateDevice, which takes its own reference if everything works.
//
@@ -158,13 +158,13 @@ CMyDevice::Initialize( // If that succeeded then set our FxDevice member variable.
//
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
m_FxDevice = fxDevice;
//
// Drop the reference we got from CreateDevice. Since this object
- // is partnered with the framework object they have the same
+ // is partnered with the framework object they have the same
// lifespan - there is no need for an additional reference.
//
@@ -179,11 +179,11 @@ CMyDevice::Configure( VOID
)
/*++
-
+
Routine Description:
- This method is called after the device callback object has been initialized
- and returned to the driver. It would setup the device's queues and their
+ This method is called after the device callback object has been initialized
+ and returned to the driver. It would setup the device's queues and their
corresponding callback objects.
Arguments:
@@ -209,16 +209,16 @@ CMyDevice::QueryInterface( _Out_ PVOID *Object
)
/*++
-
+
Routine Description:
This method is called to get a pointer to one of the object's callback
- interfaces.
+ interfaces.
Since the skeleton driver doesn't support any of the device events, this
method simply calls the base class's BaseQueryInterface.
- If the skeleton is extended to include device event interfaces then this
+ If the skeleton is extended to include device event interfaces then this
method must be changed to check the IID and return pointers to them as
appropriate.
diff --git a/tests/projects/windows/driver/umdf/skeleton/device.h b/tests/projects/windows/driver/umdf/skeleton/device.h index 26dd0e329..800da7390 100644 --- a/tests/projects/windows/driver/umdf/skeleton/device.h +++ b/tests/projects/windows/driver/umdf/skeleton/device.h @@ -60,7 +60,7 @@ public: //
// The factory method used to create an instance of this driver.
//
-
+
static
HRESULT
CreateInstance(
diff --git a/tests/projects/windows/driver/umdf/skeleton/dllsup.cpp b/tests/projects/windows/driver/umdf/skeleton/dllsup.cpp index e540452d9..0415932b7 100644 --- a/tests/projects/windows/driver/umdf/skeleton/dllsup.cpp +++ b/tests/projects/windows/driver/umdf/skeleton/dllsup.cpp @@ -1,5 +1,5 @@ /*++
-
+
Copyright (C) Microsoft Corporation, All Rights Reserved.
Module Name:
@@ -8,24 +8,24 @@ Module Name: Abstract:
- This module contains the implementation of the UMDF Skeleton Sample
+ This module contains the implementation of the UMDF Skeleton Sample
Driver's entry point and its exported functions for providing COM support.
This module can be copied without modification to a new UMDF driver. It
- depends on some of the code in comsup.cpp & comsup.h to handle DLL
+ depends on some of the code in comsup.cpp & comsup.h to handle DLL
registration and creating the first class factory.
This module is dependent on the following defines:
- MYDRIVER_TRACING_ID - A wide string passed to WPP when initializing
- tracing. For example the skeleton uses
+ MYDRIVER_TRACING_ID - A wide string passed to WPP when initializing
+ tracing. For example the skeleton uses
L"Microsoft\\UMDF\\Skeleton"
- MYDRIVER_CLASS_ID - A GUID encoded in struct format used to
- initialize the driver's ClassID.
+ MYDRIVER_CLASS_ID - A GUID encoded in struct format used to
+ initialize the driver's ClassID.
These are defined in internal.h for the sample. If you choose
- to use a different primary include file, you should ensure they are
+ to use a different primary include file, you should ensure they are
defined there as well.
Environment:
@@ -50,7 +50,7 @@ DllMain( Routine Description:
- This is the entry point and exit point for the I/O trace driver. This
+ This is the entry point and exit point for the I/O trace driver. This
does very little as the I/O trace driver has minimal global data.
This method initializes tracing.
@@ -104,7 +104,7 @@ DllGetClassObject( Routine Description:
- This routine is called by COM in order to instantiate the
+ This routine is called by COM in order to instantiate the
driver callback object and do an initial query interface on it.
This method only creates an instance of the driver's class factory, as this
@@ -120,7 +120,7 @@ DllGetClassObject( Return Value:
- S_OK if the function succeeds or error indicating the cause of the
+ S_OK if the function succeeds or error indicating the cause of the
failure.
--*/
@@ -132,9 +132,9 @@ DllGetClassObject( *Interface = NULL;
//
- // If the CLSID doesn't match that of our "coclass" (defined in the IDL
- // file) then we can't create the object the caller wants. This may
- // indicate that the COM registration is incorrect, and another CLSID
+ // If the CLSID doesn't match that of our "coclass" (defined in the IDL
+ // file) then we can't create the object the caller wants. This may
+ // indicate that the COM registration is incorrect, and another CLSID
// is referencing this drvier.
//
@@ -155,19 +155,19 @@ DllGetClassObject( factory = new CClassFactory();
- if (NULL == factory)
+ if (NULL == factory)
{
hr = E_OUTOFMEMORY;
}
- //
+ //
// Query the object we created for the interface the caller wants. After
- // that we release the object. This will drive the reference count to
+ // that we release the object. This will drive the reference count to
// 1 (if the QI succeeded an referenced the object) or 0 (if the QI failed).
// In the later case the object is automatically deleted.
//
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
hr = factory->QueryInterface(InterfaceId, Interface);
factory->Release();
diff --git a/tests/projects/windows/driver/umdf/skeleton/driver.cpp b/tests/projects/windows/driver/umdf/skeleton/driver.cpp index d91b4b0b5..9847c93a0 100644 --- a/tests/projects/windows/driver/umdf/skeleton/driver.cpp +++ b/tests/projects/windows/driver/umdf/skeleton/driver.cpp @@ -1,5 +1,5 @@ /*++
-
+
Copyright (C) Microsoft Corporation, All Rights Reserved.
Module Name:
@@ -8,7 +8,7 @@ Module Name: Abstract:
- This module contains the implementation of the UMDF Skeleton Sample's
+ This module contains the implementation of the UMDF Skeleton Sample's
core driver callback object.
Environment:
@@ -25,10 +25,10 @@ CMyDriver::CreateInstance( _Out_ PCMyDriver *Driver
)
/*++
-
+
Routine Description:
- This static method is invoked in order to create and initialize a new
+ This static method is invoked in order to create and initialize a new
instance of the driver class. The caller should arrange for the object
to be released when it is no longer in use.
@@ -55,27 +55,27 @@ CMyDriver::CreateInstance( {
return E_OUTOFMEMORY;
}
-
+
//
// Initialize the callback object.
//
hr = driver->Initialize();
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
//
- // Store a pointer to the new, initialized object in the output
+ // Store a pointer to the new, initialized object in the output
// parameter.
//
*Driver = driver;
}
- else
+ else
{
//
- // Release the reference on the driver object to get it to delete
+ // Release the reference on the driver object to get it to delete
// itself.
//
@@ -90,11 +90,11 @@ CMyDriver::Initialize( VOID
)
/*++
-
+
Routine Description:
This method is called to initialize a newly created driver callback object
- before it is returned to the creator. Unlike the constructor, the
+ before it is returned to the creator. Unlike the constructor, the
Initialize method contains operations which could potentially fail.
Arguments:
@@ -116,7 +116,7 @@ CMyDriver::QueryInterface( _Out_ PVOID *Interface
)
/*++
-
+
Routine Description:
This method returns a pointer to the requested interface on the callback
@@ -152,7 +152,7 @@ CMyDriver::OnDeviceAdd( _In_ IWDFDeviceInitialize *FxDeviceInit
)
/*++
-
+
Routine Description:
The FX invokes this method when it wants to install our driver on a device
@@ -177,15 +177,15 @@ CMyDriver::OnDeviceAdd( PCMyDevice device = NULL;
//
- // TODO: Do any per-device initialization (reading settings from the
- // registry for example) that's necessary before creating your
- // device callback object here. Otherwise you can leave such
- // initialization to the initialization of the device event
+ // TODO: Do any per-device initialization (reading settings from the
+ // registry for example) that's necessary before creating your
+ // device callback object here. Otherwise you can leave such
+ // initialization to the initialization of the device event
// handler.
//
//
- // Create a new instance of our device callback object
+ // Create a new instance of our device callback object
//
hr = CMyDevice::CreateInstance(FxWdfDriver, FxDeviceInit, &device);
@@ -196,17 +196,17 @@ CMyDriver::OnDeviceAdd( //
//
- // If that succeeded then call the device's construct method. This
+ // If that succeeded then call the device's construct method. This
// allows the device to create any queues or other structures that it
// needs now that the corresponding fx device object has been created.
//
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr))
{
hr = device->Configure();
}
- //
+ //
// Release the reference on the device callback object now that it's been
// associated with an fx device object.
//
diff --git a/tests/projects/windows/driver/umdf/skeleton/driver.h b/tests/projects/windows/driver/umdf/skeleton/driver.h index e764f517d..a47fc959c 100644 --- a/tests/projects/windows/driver/umdf/skeleton/driver.h +++ b/tests/projects/windows/driver/umdf/skeleton/driver.h @@ -63,7 +63,7 @@ public: //
// The factory method used to create an instance of this driver.
//
-
+
static
HRESULT
CreateInstance(
@@ -87,7 +87,7 @@ public: )
{
UNREFERENCED_PARAMETER( FxWdfDriver );
-
+
return S_OK;
}
@@ -114,7 +114,7 @@ public: //
// IUnknown methods.
//
- // We have to implement basic ones here that redirect to the
+ // We have to implement basic ones here that redirect to the
// base class becuase of the multiple inheritance.
//
@@ -127,7 +127,7 @@ public: {
return __super::AddRef();
}
-
+
_At_(this, __drv_freesMem(object))
virtual
ULONG
diff --git a/tests/projects/windows/driver/umdf/skeleton/internal.h b/tests/projects/windows/driver/umdf/skeleton/internal.h index f338a9b6c..fdc8f30d9 100644 --- a/tests/projects/windows/driver/umdf/skeleton/internal.h +++ b/tests/projects/windows/driver/umdf/skeleton/internal.h @@ -24,7 +24,7 @@ Environment: #endif
//
-// Include the WUDF DDI
+// Include the WUDF DDI
//
#include "wudfddi.h"
diff --git a/tests/projects/windows/driver/wdm/msdsm/dsmmain.c b/tests/projects/windows/driver/wdm/msdsm/dsmmain.c index bdf875184..bfb4149f9 100644 --- a/tests/projects/windows/driver/wdm/msdsm/dsmmain.c +++ b/tests/projects/windows/driver/wdm/msdsm/dsmmain.c @@ -2968,7 +2968,7 @@ Return Value: --*/
{
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_GENERAL,
"DsmpSetNewPath (DevInfo %p): Entering function.\n",
@@ -2983,7 +2983,7 @@ Return Value: DsmpSetLBForPathRemovalALUA(DsmContext, FailingDevice, NULL, SpecialHandlingFlag);
}
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_GENERAL,
"DsmpSetNewPath (DevInfo %p): Exiting function with path (failGroup) %p.\n",
@@ -3285,7 +3285,7 @@ DsmpDecrementCounters( if (InterlockedCompareExchange(&FailGroup->NumberOfRequestsInFlight, 0, 0) > 0) {
if(InterlockedDecrement(&FailGroup->NumberOfRequestsInFlight) == 0){
-
+
//
// If the inflight requests on the path is zero, if needed path can be removed.
//
@@ -3696,7 +3696,7 @@ Return Value: }
if (isRead || isWrite) {
-
+
if (groupEntry->UseCacheForLeastBlocks) {
bytes = SrbGetDataTransferLength(Srb);
@@ -3731,7 +3731,7 @@ Return Value: "DsmpGetPath (DsmIds %p): Sequential IO, so using same path %p for LeastBlocks.\n",
DsmList,
failGroup));
- }
+ }
}
} else {
@@ -4000,7 +4000,7 @@ Return Value: DSM_ASSERT(groupEntry->GroupSig == DSM_GROUP_SIG);
//
// useMpioPathId is BOOLEAN (0 or 1) since MPIO_IOCTL_FLAG_USE_PATHID = 1
- // But since MPIO_IOCTL_FLAG_USE_SCSIADDRESS = 0x2,
+ // But since MPIO_IOCTL_FLAG_USE_SCSIADDRESS = 0x2,
// useScsiAddress could have a value of 2 if set. Use logical NOT to make boolean before comparing below
//
DSM_ASSERT(useMpioPathId == !useScsiAddress);
@@ -5045,7 +5045,7 @@ Return Value: "DsmpGetAnyActivePath (Group %p): Exiting function with DevInfo %p\n",
Group,
candidateDevInfo));
-
+
return candidateDevInfo;
}
@@ -5268,7 +5268,7 @@ Return Value: "DsmpFindStandbyPathToActivate (Group %p): Exiting function with devInfo %p.\n",
Group,
candidateDevInfo));
-
+
return candidateDevInfo;
}
@@ -5383,7 +5383,7 @@ Return Value: "DsmpFindStandbyPathToActivateALUA (Group %p): Exiting function with devInfo %p.\n",
Group,
candidateDevInfo));
-
+
return candidateDevInfo;
}
@@ -5521,7 +5521,7 @@ Return Value: PDSM_DEVICE_INFO devInfo;
DSM_LOAD_BALANCE_TYPE newLoadBalancePolicy;
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_WMI,
"DsmpSetLBForDsmPolicyAdjustment (DsmContext %p): Entering function.\n",
@@ -5749,7 +5749,7 @@ Return Value: } else {
//
- // Default LB type:
+ // Default LB type:
// is Round Robin if ALUA is not supported, or if ALUA support is implicit but access is symmetric,
// else Round Robin With Subset (since in ALUA, all paths aren't in A/O).
//
@@ -6502,7 +6502,7 @@ Arguements: function will run the load balance policy on the given Group and not
the Group from the RemovedDeviceInfo. This should only be used when
it's impossible to get a pointer to the RemovedDeviceInfo.
-
+
SpecialHandlingFlag - Flags to indicate any special handling requirement
Return Value:
@@ -6683,7 +6683,7 @@ Arguements: function will run the load balance policy on the given Group and not
the Group from the RemovedDeviceInfo. This should only be used when
it's impossible to get a pointer to the RemovedDeviceInfo.
-
+
SpecialHandlingFlag - Flags to indicate any special handling requirement
Return Value:
@@ -6890,7 +6890,7 @@ Arguements: DsmContext is the DSM context
FailingDeviceInfo is the device info for the path on which IO failed
-
+
SpecialHandlingFlag - Flags to indicate any special handling requirement
Return Value:
@@ -6978,7 +6978,7 @@ Return Value: TRACE_FLAG_RW,
"DsmpSetLBForPathFailingALUA (DevInfo %p): Entering function.\n",
FailingDeviceInfo));
-
+
if (MarkDevInfoFailed) {
if (!(DsmpIsDeviceFailedState(FailingDeviceInfo->State))) {
@@ -6995,7 +6995,7 @@ Return Value: FailingDeviceInfo->State,
__LINE__));
}
-
+
group = FailingDeviceInfo->Group;
if (group->LoadBalanceType < DSM_LB_FAILOVER ||
@@ -7292,7 +7292,7 @@ Return Value: group->PathToBeUsed));
} else {
-
+
InterlockedExchangePointer(&(group->PathToBeUsed), NULL);
TracePrint((TRACE_LEVEL_WARNING,
TRACE_FLAG_RW,
@@ -7529,7 +7529,7 @@ Return Value: //
inflightRTPG = InterlockedCompareExchange((LONG volatile*)&group->InFlightRTPG, 1, 0);
if (inflightRTPG) {
-
+
DsmpFreePool(targetPortGroupsInfo);
ExFreeToNPagedLookasideList(&DsmContext->CompletionContextList, completionContext);
DsmpFreePool(srb);
@@ -7576,15 +7576,15 @@ Return Value: "DsmpSetPathForIoRetryALUA (DevInfo %p): Throttle before RTPG failed. Failing path %p.\n",
FailingDeviceInfo,
FailingDeviceInfo->FailGroup->PathId));
-
+
InterlockedDecrement((LONG volatile*)&FailingDeviceInfo->Group->Throttled);
}
} else {
-
+
//
// Currently we don't expect this to happen
//
- NT_ASSERT(FALSE);
+ NT_ASSERT(FALSE);
}
@@ -7645,8 +7645,8 @@ Return Value: deviceInfo));
}
- }
-
+ }
+
InterlockedDecrement((LONG volatile*)&group->InFlightRTPG);
}
}
@@ -8577,7 +8577,7 @@ Return Value: ExReleaseSpinLockExclusive(&(context->CompletionContext->DsmContext->DsmContextLock), irql);
}
-
+
//
// Resume IO if we throttled requests.
//
@@ -8607,12 +8607,12 @@ Return Value: DeviceObject));
}
- }
+ }
if (decrementRTPGcount) {
-
+
//
- // Resetting InFlightRTPG after resume so that we don't get into situation where
+ // Resetting InFlightRTPG after resume so that we don't get into situation where
// new DsmpSetPathForIoRetryALUA caller thread finds that InFlightRTPG is not set but Throttled is set
//
ULONG count = InterlockedCompareExchange((LONG volatile*)&group->InFlightRTPG, 0, 1);
@@ -8623,9 +8623,9 @@ Return Value: NT_ASSERT(count);
UNREFERENCED_PARAMETER(count);
-
+
}
-
+
//
// Free the allocations.
//
@@ -8748,7 +8748,7 @@ Return Value: ULONGLONG saKey;
ULONGLONG resKey;
ULONG SpecialHandlingFlag = 0;
-
+
UNREFERENCED_PARAMETER(Event);
TracePrint((TRACE_LEVEL_VERBOSE,
@@ -9324,7 +9324,7 @@ Return Value: UCHAR senseInfoBufferLength = 0;
BOOLEAN srbCopySucceeded = FALSE;
ULONG SpecialHandlingFlag = 0;
-
+
UNREFERENCED_PARAMETER(Event);
TracePrint((TRACE_LEVEL_VERBOSE,
diff --git a/tests/projects/windows/driver/wdm/msdsm/msdsm.h b/tests/projects/windows/driver/wdm/msdsm/msdsm.h index e1ddeb52d..982ed7ffc 100644 --- a/tests/projects/windows/driver/wdm/msdsm/msdsm.h +++ b/tests/projects/windows/driver/wdm/msdsm/msdsm.h @@ -814,7 +814,7 @@ typedef struct _DSM_DEVICE_INFO { // NOTE: Descriptor should be the LAST field in this structure
//
STORAGE_DEVICE_DESCRIPTOR Descriptor;
-
+
} DSM_DEVICE_INFO, *PDSM_DEVICE_INFO;
typedef enum _DSM_DEFAULT_LB_POLICY_TYPE {
@@ -902,7 +902,7 @@ typedef struct _DSM_GROUP_ENTRY { // Flag to indicate whether or not to use same path for sequential IO
// when employing Least Blocks load balance policy.
//
- BOOLEAN UseCacheForLeastBlocks;
+ BOOLEAN UseCacheForLeastBlocks;
//
// Flag used to indicate if a throttle request succeeded.
diff --git a/tests/projects/windows/driver/wdm/msdsm/prototypes.h b/tests/projects/windows/driver/wdm/msdsm/prototypes.h index ebcf42029..c72c22cb4 100644 --- a/tests/projects/windows/driver/wdm/msdsm/prototypes.h +++ b/tests/projects/windows/driver/wdm/msdsm/prototypes.h @@ -504,7 +504,7 @@ PDSM_FAILOVER_GROUP DsmpGetPath(
_In_ IN PDSM_CONTEXT DsmContext,
_In_ IN PDSM_IDS DsmList,
- _In_ IN PSCSI_REQUEST_BLOCK Srb,
+ _In_ IN PSCSI_REQUEST_BLOCK Srb,
_In_ IN ULONG SpecialHandlingFlag
);
@@ -1415,7 +1415,7 @@ Return Value: case STATUS_INVALID_DEVICE_REQUEST:
return SRB_STATUS_BAD_FUNCTION;
-
+
case STATUS_INSUFFICIENT_RESOURCES:
return SRB_STATUS_INTERNAL_ERROR;
diff --git a/tests/projects/windows/driver/wdm/msdsm/utils.c b/tests/projects/windows/driver/wdm/msdsm/utils.c index 91d8f44ce..4c6c5db40 100644 --- a/tests/projects/windows/driver/wdm/msdsm/utils.c +++ b/tests/projects/windows/driver/wdm/msdsm/utils.c @@ -2922,7 +2922,7 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_LOAD_BALANCE_POLICY;
queryTable[0].EntryContext = LoadBalanceType;
@@ -3194,7 +3194,7 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_LOAD_BALANCE_POLICY;
queryTable[0].EntryContext = LoadBalanceType;
@@ -3351,7 +3351,7 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_LOAD_BALANCE_POLICY;
queryTable[0].EntryContext = LoadBalanceType;
@@ -4842,7 +4842,7 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_PATH_WEIGHT;
queryTable[0].EntryContext = PathWeight;
@@ -4869,7 +4869,7 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_PRIMARY_PATH;
queryTable[0].EntryContext = PrimaryPath;
@@ -4889,7 +4889,7 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
- RTL_QUERY_REGISTRY_REQUIRED |
+ RTL_QUERY_REGISTRY_REQUIRED |
RTL_QUERY_REGISTRY_TYPECHECK;
queryTable[0].Name = DSM_OPTIMIZED_PATH;
queryTable[0].EntryContext = OptimizedPath;
diff --git a/tests/projects/windows/driver/wdm/msdsm/wmi.c b/tests/projects/windows/driver/wdm/msdsm/wmi.c index 0ee882192..cfb286e26 100644 --- a/tests/projects/windows/driver/wdm/msdsm/wmi.c +++ b/tests/projects/windows/driver/wdm/msdsm/wmi.c @@ -970,7 +970,7 @@ Return Value: PMPIO_DSM_Path_V2 dsmPath;
PDSM_FAILOVER_GROUP foGroup;
ULONG SpecialHandlingFlag = 0;
-
+
UNREFERENCED_PARAMETER(InBufferSize);
TracePrint((TRACE_LEVEL_VERBOSE,
@@ -1550,7 +1550,7 @@ Return Value: ULONGLONG preferredPath = (ULONGLONG)((ULONG_PTR)MAXULONG);
ULONG devInfoIndex;
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_WMI,
"DsmpClearLoadBalancePolicy (DsmIds %p): Entering function.\n",
@@ -1792,7 +1792,7 @@ Return Value: BOOLEAN sendSTPG = FALSE;
ULONGLONG preferredPath = (ULONGLONG)((ULONG_PTR)MAXULONG);
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_WMI,
"DsmpSetLoadBalancePolicy (DsmIds %p): Entering function.\n",
diff --git a/tests/projects/windows/driver/wdm/perfcounters/kcs.c b/tests/projects/windows/driver/wdm/perfcounters/kcs.c index 9996addcb..67ca0e328 100644 --- a/tests/projects/windows/driver/wdm/perfcounters/kcs.c +++ b/tests/projects/windows/driver/wdm/perfcounters/kcs.c @@ -320,7 +320,7 @@ VOID KcsUnload (
_In_ PDRIVER_OBJECT DriverObject
)
-
+
/*++
Routine Description:
diff --git a/tests/projects/windows/winsdk/usbview/codeanalysis.h b/tests/projects/windows/winsdk/usbview/codeanalysis.h index 56fa54a1a..7654b2d1c 100644 --- a/tests/projects/windows/winsdk/usbview/codeanalysis.h +++ b/tests/projects/windows/winsdk/usbview/codeanalysis.h @@ -32,13 +32,13 @@ using namespace System::Diagnostics::CodeAnalysis; namespace Microsoft
{
- namespace Kits
+ namespace Kits
{
namespace Samples
{
namespace Usb
{
- // Justification : C++ Compiler cannot enforce ClsCompliant
+ // Justification : C++ Compiler cannot enforce ClsCompliant
[module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]
// Justification : The naming of the following types are based on native USB types
@@ -108,7 +108,7 @@ namespace Microsoft [module: SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId="usbview")];
[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="usbview")];
- // Justification: The version of XSD which is used to generate the objects does not support Collections.
+ // Justification: The version of XSD which is used to generate the objects does not support Collections.
[module: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="Microsoft.Kits.Samples.Usb.UsbBosDescriptorType.#UsbSuperSpeedExtensionDescriptor")];
[module: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="Microsoft.Kits.Samples.Usb.UsbBosDescriptorType.#UsbUsb20ExtensionDescriptor")];
[module: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="Microsoft.Kits.Samples.Usb.UsbBosDescriptorType.#UnknownDescriptor")];
diff --git a/tests/projects/windows/winsdk/usbview/devnode.c b/tests/projects/windows/winsdk/usbview/devnode.c index d9a3b8ecc..1acd377e7 100644 --- a/tests/projects/windows/winsdk/usbview/devnode.c +++ b/tests/projects/windows/winsdk/usbview/devnode.c @@ -22,7 +22,7 @@ Returns FALSE if the matching DevNode is not found and TRUE if found
*****************************************************************************/
-BOOL
+BOOL
DriverNameToDeviceInst(
_In_reads_bytes_(cbDriverName) PCHAR DriverName,
_In_ size_t cbDriverName,
@@ -103,7 +103,7 @@ DriverNameToDeviceInst( // This could be an error, or indication that all devices have been
// processed. Either way the desired device was not found.
//
-
+
done = TRUE;
break;
}
@@ -116,7 +116,7 @@ DriverNameToDeviceInst( &deviceInfoData,
SPDRP_DRIVER,
&buf);
-
+
// If the DriverName value matches, return the DeviceInstance
//
if (bResult == TRUE && buf != NULL && _stricmp(pDriverName, buf) == 0)
@@ -163,9 +163,9 @@ Done: The caller should free the returned structure using FREE() macro
*****************************************************************************/
-PUSB_DEVICE_PNP_STRINGS
-DriverNameToDeviceProperties(
- _In_reads_bytes_(cbDriverName) PCHAR DriverName,
+PUSB_DEVICE_PNP_STRINGS
+DriverNameToDeviceProperties(
+ _In_reads_bytes_(cbDriverName) PCHAR DriverName,
_In_ size_t cbDriverName
)
{
@@ -200,17 +200,17 @@ DriverNameToDeviceProperties( &len);
lastError = GetLastError();
-
+
if (status != FALSE && lastError != ERROR_INSUFFICIENT_BUFFER)
{
status = FALSE;
goto Done;
}
-
+
//
// An extra byte is required for the terminating character
//
-
+
len++;
DevProps->DeviceId = ALLOC(len);
@@ -234,14 +234,14 @@ DriverNameToDeviceProperties( &deviceInfoData,
SPDRP_DEVICEDESC,
&DevProps->DeviceDesc);
-
+
if (status == FALSE)
{
goto Done;
}
-
- //
+
+ //
// We don't fail if the following registry query fails as these fields are additional information only
//
diff --git a/tests/projects/windows/winsdk/usbview/dispaud.c b/tests/projects/windows/winsdk/usbview/dispaud.c index bbc16a912..f5f110d7e 100644 --- a/tests/projects/windows/winsdk/usbview/dispaud.c +++ b/tests/projects/windows/winsdk/usbview/dispaud.c @@ -391,9 +391,9 @@ DisplayACInputTerminal ( AppendTextBuffer("wTerminalType: 0x%04X",
ITDesc->wTerminalType);
- pStr = GetStringFromList(slAudioTerminalTypes,
+ pStr = GetStringFromList(slAudioTerminalTypes,
sizeof(slAudioTerminalTypes) / sizeof(STRINGLIST),
- ITDesc->wTerminalType,
+ ITDesc->wTerminalType,
"Invalid AC Input Terminal Type");
AppendTextBuffer(" (%s)\r\n", pStr);
@@ -453,9 +453,9 @@ DisplayACOutputTerminal ( AppendTextBuffer("wTerminalType: 0x%04X",
OTDesc->wTerminalType);
- pStr = GetStringFromList(slAudioTerminalTypes,
+ pStr = GetStringFromList(slAudioTerminalTypes,
sizeof(slAudioTerminalTypes) / sizeof(STRINGLIST),
- OTDesc->wTerminalType,
+ OTDesc->wTerminalType,
"Invalid AC Output Terminal Type");
AppendTextBuffer(" (%s)\r\n", pStr);
@@ -930,9 +930,9 @@ DisplayASGeneral ( AppendTextBuffer("wFormatTag: 0x%04X",
GeneralDesc->wFormatTag);
- pStr = GetStringFromList(slAudioFormatTypes,
+ pStr = GetStringFromList(slAudioFormatTypes,
sizeof(slAudioFormatTypes) / sizeof(STRINGLIST),
- GeneralDesc->wFormatTag,
+ GeneralDesc->wFormatTag,
"Invalid AC Format Type");
AppendTextBuffer(" (%s)\r\n", pStr);
diff --git a/tests/projects/windows/winsdk/usbview/dispvid.c b/tests/projects/windows/winsdk/usbview/dispvid.c index 537309721..62b677ab6 100644 --- a/tests/projects/windows/winsdk/usbview/dispvid.c +++ b/tests/projects/windows/winsdk/usbview/dispvid.c @@ -259,7 +259,7 @@ BOOL DisplayVCInputTerminal (
PVIDEO_INPUT_TERMINAL VidITDesc,
PSTRING_DESCRIPTOR_NODE StringDescs,
- DEVICE_POWER_STATE LatestDevicePowerState
+ DEVICE_POWER_STATE LatestDevicePowerState
);
BOOL
@@ -521,9 +521,9 @@ DisplayVideoDescriptor ( #endif
#ifdef H264_SUPPORT
- case MAX_TYPE_UNIT+1:
+ case MAX_TYPE_UNIT+1:
// for H.264, the bDescriptorSubtype = 7, which is equal to MAX_TYPE_UNIT
- // so now MAX_TYPE_UNIT needs to be set to 8
+ // so now MAX_TYPE_UNIT needs to be set to 8
//(TODO: need to change nt\sdpublic\internal\drivers\inc\uvcdesc.h's define
// of MAX_TYPE_UNIT from7 to 8, and ad the type for H.264 = 8)
#else
@@ -897,7 +897,7 @@ DisplayVCHeader ( }
AppendTextBuffer("wTotalLength: 0x%04X", VCInterfaceDesc->wTotalLength);
- // Verify the total interface size (size of this header and all descriptors
+ // Verify the total interface size (size of this header and all descriptors
// following until and not including the first endpoint)
uSize = GetVCInterfaceSize(VCInterfaceDesc);
if (uSize != VCInterfaceDesc->wTotalLength) {
@@ -906,21 +906,21 @@ DisplayVCHeader ( } else {
AppendTextBuffer(" -> Validated\r\n");
}
- AppendTextBuffer("dwClockFreq: 0x%08X",
+ AppendTextBuffer("dwClockFreq: 0x%08X",
VCInterfaceDesc->dwClockFreq);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
- AppendTextBuffer(" = (%d) Hz", VCInterfaceDesc->dwClockFreq);
+ AppendTextBuffer(" = (%d) Hz", VCInterfaceDesc->dwClockFreq);
}
- AppendTextBuffer("\r\nbInCollection: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbInCollection: 0x%02X\r\n",
VCInterfaceDesc->bInCollection);
// baInterfaceNr is a variable length field
// Size is in bInCollection
- for (i = 1, pData = (PUCHAR) &VCInterfaceDesc->bInCollection;
+ for (i = 1, pData = (PUCHAR) &VCInterfaceDesc->bInCollection;
i <= VCInterfaceDesc->bInCollection; i++, pData++)
{
- AppendTextBuffer("baInterfaceNr[%d]: 0x%02X\r\n",
+ AppendTextBuffer("baInterfaceNr[%d]: 0x%02X\r\n",
i, *pData);
}
@@ -930,7 +930,7 @@ DisplayVCHeader ( //@@TestCase B2.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is less than required length in
+ //@@The declared length in the device descriptor is less than required length in
//@@ the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
VCInterfaceDesc->bLength, uSize);
@@ -962,8 +962,8 @@ DisplayVCHeader ( //@@Not yet implemented - Priority 1
//@@Descriptor Field - baInterfaceNr
//@@We should test to verify each interface number is valid?
- // for (i=0; i<VCInterfaceDesc->bInCollection; i++)
- // {AppendTextBuffer("baInterfaceNr[%d]: 0x%02X\r\n", i+1,
+ // for (i=0; i<VCInterfaceDesc->bInCollection; i++)
+ // {AppendTextBuffer("baInterfaceNr[%d]: 0x%02X\r\n", i+1,
// VCInterfaceDesc->baInterfaceNr[i]);}
@@ -1016,25 +1016,25 @@ DisplayVCInputTerminal ( AppendTextBuffer("wTerminalType: 0x%04X", VidITDesc->wTerminalType);
if(gDoAnnotation)
{
- pStr = GetStringFromList(slInputTermTypes,
+ pStr = GetStringFromList(slInputTermTypes,
sizeof(slInputTermTypes) / sizeof(STRINGLIST),
- VidITDesc->wTerminalType,
+ VidITDesc->wTerminalType,
"Invalid Input Terminal Type");
- AppendTextBuffer(" = (%s)", pStr);
+ AppendTextBuffer(" = (%s)", pStr);
}
AppendTextBuffer("\r\n");
-
+
AppendTextBuffer("bAssocTerminal: 0x%02X\r\n", VidITDesc->bAssocTerminal);
AppendTextBuffer("iTerminal: 0x%02X\r\n", VidITDesc->iTerminal);
if (gDoAnnotation)
{
if (VidITDesc->iTerminal)
{
- // if executing this code, the configuration descriptor has been
+ // if executing this code, the configuration descriptor has been
// obtained. If a device is suspended, then its configuration
- // descriptor was not obtained and we do not want errors to be
+ // descriptor was not obtained and we do not want errors to be
// displayed when string descriptors were not obtained.
- DisplayStringDescriptor(VidITDesc->iTerminal, StringDescs, LatestDevicePowerState);
+ DisplayStringDescriptor(VidITDesc->iTerminal, StringDescs, LatestDevicePowerState);
}
}
@@ -1043,7 +1043,7 @@ DisplayVCInputTerminal ( //@@TestCase B3.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is less than required length in
+ //@@The declared length in the device descriptor is less than required length in
//@@ the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d is too small\r\n", VidITDesc->bLength);
OOPS();
@@ -1131,11 +1131,11 @@ DisplayVCOutputTerminal ( AppendTextBuffer("wTerminalType: 0x%04X", VidOTDesc->wTerminalType);
if(gDoAnnotation)
{
- pStr = GetStringFromList(slOutputTermTypes,
+ pStr = GetStringFromList(slOutputTermTypes,
sizeof(slOutputTermTypes) / sizeof(STRINGLIST),
- VidOTDesc->wTerminalType,
+ VidOTDesc->wTerminalType,
"Invalid Output Terminal Type");
- AppendTextBuffer(" = (%s)", pStr);
+ AppendTextBuffer(" = (%s)", pStr);
}
AppendTextBuffer("\r\n");
AppendTextBuffer("bAssocTerminal: 0x%02X\r\n", VidOTDesc->bAssocTerminal);
@@ -1145,9 +1145,9 @@ DisplayVCOutputTerminal ( {
if (VidOTDesc->iTerminal)
{
- // if executing this code, the configuration descriptor has been
+ // if executing this code, the configuration descriptor has been
// obtained. If a device is suspended, then its configuration
- // descriptor was not obtained and we do not want errors to be
+ // descriptor was not obtained and we do not want errors to be
// displayed when string descriptors were not obtained.
DisplayStringDescriptor(VidOTDesc->iTerminal, StringDescs, LatestDevicePowerState);
}
@@ -1158,7 +1158,7 @@ DisplayVCOutputTerminal ( //@@TestCase B4.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is less than required length in
+ //@@The declared length in the device descriptor is less than required length in
//@@ the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d is too small\r\n", VidOTDesc->bLength);
OOPS();
@@ -1252,7 +1252,7 @@ DisplayVCMediaTransInputTerminal( bLength = SizeOfVideoInputMTT(MediaTransportInDesc);
AppendTextBuffer("===>Additional Media Transport Input Terminal Data\r\n");
- AppendTextBuffer("bControlSize: 0x%02X\r\n",
+ AppendTextBuffer("bControlSize: 0x%02X\r\n",
MediaTransportInDesc->bControlSize);
// point to bControlSize
@@ -1263,12 +1263,12 @@ DisplayVCMediaTransInputTerminal( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1277,9 +1277,9 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportControls,
+ GetStringFromList(slMediaTransportControls,
sizeof(slMediaTransportControls) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportCtrl bmControl value"));
cMask = cMask << 1;
@@ -1294,12 +1294,12 @@ DisplayVCMediaTransInputTerminal( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1308,18 +1308,18 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes1,
+ GetStringFromList(slMediaTransportModes1,
sizeof(slMediaTransportModes1) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
}
-
+
// Is there a second control?
if (1 < * pData)
{
- // map the second control
+ // map the second control
for ( uBitIndex = 8, cMask = 1; uBitIndex < 16; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 2);
@@ -1328,9 +1328,9 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes2,
+ GetStringFromList(slMediaTransportModes2,
sizeof(slMediaTransportModes2) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1339,7 +1339,7 @@ DisplayVCMediaTransInputTerminal( // Is there a third control?
if (2 < * pData)
{
- // map the third control
+ // map the third control
for ( uBitIndex = 16, cMask = 1; uBitIndex < 24; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 3);
@@ -1348,9 +1348,9 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes3,
+ GetStringFromList(slMediaTransportModes3,
sizeof(slMediaTransportModes3) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1359,7 +1359,7 @@ DisplayVCMediaTransInputTerminal( // Is there a fourth control?
if (3 < * pData)
{
- // map the fourth control
+ // map the fourth control
for ( uBitIndex = 24, cMask = 1; uBitIndex < 32; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 4);
@@ -1368,9 +1368,9 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes4,
+ GetStringFromList(slMediaTransportModes4,
sizeof(slMediaTransportModes4) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1379,7 +1379,7 @@ DisplayVCMediaTransInputTerminal( // Is there a fifth control?
if (4 < * pData)
{
- // map the fifth control
+ // map the fifth control
for ( uBitIndex = 32, cMask = 1; uBitIndex < 40; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 5);
@@ -1388,9 +1388,9 @@ DisplayVCMediaTransInputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes5,
+ GetStringFromList(slMediaTransportModes5,
sizeof(slMediaTransportModes5) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1398,13 +1398,13 @@ DisplayVCMediaTransInputTerminal( }
}
- // The size of a Media Transport Descriptor is
+ // The size of a Media Transport Descriptor is
// the size of the Descriptor plus
// (bControlSize - 1) plus
// IF bmControls & 1 THEN 1 (bTransportModeSize) plus
// bTransportModeSize
- //
-// p = sizeof(VIDEO_INPUT_MTT) +
+ //
+// p = sizeof(VIDEO_INPUT_MTT) +
// (MediaTransportInDesc->bControlSize - 1);
// if (MediaTransportInDesc->bmControls[0] & 1)
// p += 1 + (*pData);
@@ -1440,7 +1440,7 @@ DisplayVCMediaTransOutputTerminal( PUCHAR pData = NULL;
AppendTextBuffer("===>Additional Media Transport Output Terminal Data\r\n");
- AppendTextBuffer("bControlSize: 0x%02X\r\n",
+ AppendTextBuffer("bControlSize: 0x%02X\r\n",
MediaTransportOutDesc->bControlSize);
// point to bControlSize
@@ -1451,12 +1451,12 @@ DisplayVCMediaTransOutputTerminal( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1465,9 +1465,9 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportControls,
+ GetStringFromList(slMediaTransportControls,
sizeof(slMediaTransportControls) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportCtrl bmControl value"));
cMask = cMask << 1;
@@ -1482,12 +1482,12 @@ DisplayVCMediaTransOutputTerminal( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1496,18 +1496,18 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes1,
+ GetStringFromList(slMediaTransportModes1,
sizeof(slMediaTransportModes1) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
}
-
+
// Is there a second control?
if (1 < * pData)
{
- // map the second control
+ // map the second control
for ( uBitIndex = 8, cMask = 1; uBitIndex < 16; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 2);
@@ -1516,9 +1516,9 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes2,
+ GetStringFromList(slMediaTransportModes2,
sizeof(slMediaTransportModes2) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1527,7 +1527,7 @@ DisplayVCMediaTransOutputTerminal( // Is there a third control?
if (2 < * pData)
{
- // map the third control
+ // map the third control
for ( uBitIndex = 16, cMask = 1; uBitIndex < 24; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 3);
@@ -1536,9 +1536,9 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes3,
+ GetStringFromList(slMediaTransportModes3,
sizeof(slMediaTransportModes3) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1547,7 +1547,7 @@ DisplayVCMediaTransOutputTerminal( // Is there a fourth control?
if (3 < * pData)
{
- // map the fourth control
+ // map the fourth control
for ( uBitIndex = 24, cMask = 1; uBitIndex < 32; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 4);
@@ -1556,9 +1556,9 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes4,
+ GetStringFromList(slMediaTransportModes4,
sizeof(slMediaTransportModes4) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1567,7 +1567,7 @@ DisplayVCMediaTransOutputTerminal( // Is there a fifth control?
if (4 < * pData)
{
- // map the fourth control
+ // map the fourth control
for ( uBitIndex = 32, cMask = 1; uBitIndex < 40; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 5);
@@ -1576,9 +1576,9 @@ DisplayVCMediaTransOutputTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slMediaTransportModes5,
+ GetStringFromList(slMediaTransportModes5,
sizeof(slMediaTransportModes5) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid MediaTransportMode value"));
cMask = cMask << 1;
@@ -1586,13 +1586,13 @@ DisplayVCMediaTransOutputTerminal( }
}
- // The size of a Media Transport Descriptor is
+ // The size of a Media Transport Descriptor is
// the size of the Descriptor plus
// (bControlSize - 1) plus
// IF bmControls & 1 THEN 1 (bTransportModeSize) plus
// bTransportModeSize
- //
- p = sizeof(VIDEO_OUTPUT_MTT) +
+ //
+ p = sizeof(VIDEO_OUTPUT_MTT) +
(MediaTransportOutDesc->bControlSize - 1);
if (MediaTransportOutDesc->bmControls[0] & 1)
p += 1 + (*pData);
@@ -1640,12 +1640,12 @@ DisplayVCCameraTerminal( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1654,18 +1654,18 @@ DisplayVCCameraTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slCameraControl1,
+ GetStringFromList(slCameraControl1,
sizeof(slCameraControl1) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid CamCtrl bmControl value"));
cMask = cMask << 1;
}
-
+
// Is there a second control?
if (1 < * pData)
{
- // map the second control
+ // map the second control
for ( uBitIndex = 8, cMask = 1; uBitIndex < 16; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 2);
@@ -1674,9 +1674,9 @@ DisplayVCCameraTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slCameraControl2,
+ GetStringFromList(slCameraControl2,
sizeof(slCameraControl2) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid CamCtrl bmControl value"));
cMask = cMask << 1;
@@ -1685,7 +1685,7 @@ DisplayVCCameraTerminal( // Is there a third control?
if (2 < * pData)
{
- // map the third control
+ // map the third control
for ( uBitIndex = 16, cMask = 1; uBitIndex < 24; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 3);
@@ -1694,9 +1694,9 @@ DisplayVCCameraTerminal( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slCameraControl3,
+ GetStringFromList(slCameraControl3,
sizeof(slCameraControl3) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid CamCtrl bmControl value"));
cMask = cMask << 1;
@@ -1710,7 +1710,7 @@ DisplayVCCameraTerminal( //@@TestCase B7.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The descriptor should be the size of the descriptor structure
+ //@@The descriptor should be the size of the descriptor structure
//@@ plus the number of controls
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
CameraDesc->bLength, p);
@@ -1784,16 +1784,16 @@ DisplayVCSelectorUnit ( AppendTextBuffer("bDescriptorSubtype: 0x%02X\r\n", VidSelectorDesc->bDescriptorSubtype);
AppendTextBuffer("bUnitID: 0x%02X\r\n", VidSelectorDesc->bUnitID);
AppendTextBuffer("bNrInPins: 0x%02X\r\n", VidSelectorDesc->bNrInPins);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
AppendTextBuffer("===>List of Connected Unit and Terminal ID's\r\n");
}
// baSourceID is a variable length field
// Size is in bNrInPins, must be at least 1 (so index starts at 1)
- for (i = 1, pData = (PUCHAR) &VidSelectorDesc->baSourceID;
+ for (i = 1, pData = (PUCHAR) &VidSelectorDesc->baSourceID;
i <= VidSelectorDesc->bNrInPins; i++, pData++)
{
- AppendTextBuffer("baSourceID[%d]: 0x%02X\r\n",
+ AppendTextBuffer("baSourceID[%d]: 0x%02X\r\n",
i, *pData);
}
@@ -1804,9 +1804,9 @@ DisplayVCSelectorUnit ( {
if (*pData)
{
- // if executing this code, the configuration descriptor has been
+ // if executing this code, the configuration descriptor has been
// obtained. If a device is suspended, then its configuration
- // descriptor was not obtained and we do not want errors to be
+ // descriptor was not obtained and we do not want errors to be
// displayed when string descriptors were not obtained.
DisplayStringDescriptor(*pData, StringDescs, LatestDevicePowerState);
}
@@ -1848,7 +1848,7 @@ DisplayVCSelectorUnit ( // baSourceID is a variable length field
// Size is in bNrInPins, must be at least 1 (so index starts at 1)
- for (i = 1, pData = (PUCHAR) &VidSelectorDesc->baSourceID;
+ for (i = 1, pData = (PUCHAR) &VidSelectorDesc->baSourceID;
i <= VidSelectorDesc->bNrInPins; i++, pData++)
{
if (*pData < 1)
@@ -1908,12 +1908,12 @@ DisplayVCProcessingUnit ( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
AppendTextBuffer("bmControls : ");
VDisplayBytes(pData + 1, *pData);
-
- // map the first control
+
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 1);
@@ -1922,18 +1922,18 @@ DisplayVCProcessingUnit ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slProcessorControls1,
+ GetStringFromList(slProcessorControls1,
sizeof(slProcessorControls1) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid PU bmControl value"));
cMask = cMask << 1;
}
-
+
// Is there a second control?
if (1 < * pData)
{
- // map the second control
+ // map the second control
for ( uBitIndex = 8, cMask = 1; uBitIndex < 16; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 2);
@@ -1942,19 +1942,19 @@ DisplayVCProcessingUnit ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slProcessorControls2,
+ GetStringFromList(slProcessorControls2,
sizeof(slProcessorControls2) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid PU bmControl value"));
cMask = cMask << 1;
}
}
-
+
// Is there a third control?
if (2 < * pData)
{
- // map the third control
+ // map the third control
for ( uBitIndex = 16, cMask = 1; uBitIndex < 24; uBitIndex++ )
{
cCheckBit = cMask & *(pData + 3);
@@ -1963,9 +1963,9 @@ DisplayVCProcessingUnit ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slProcessorControls3,
+ GetStringFromList(slProcessorControls3,
sizeof(slProcessorControls3) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid PU bmControl value"));
cMask = cMask << 1;
@@ -1991,9 +1991,9 @@ DisplayVCProcessingUnit ( {
if (*pData)
{
- // if executing this code, the configuration descriptor has been
+ // if executing this code, the configuration descriptor has been
// obtained. If a device is suspended, then its configuration
- // descriptor was not obtained and we do not want errors to be
+ // descriptor was not obtained and we do not want errors to be
// displayed when string descriptors were not obtained.
DisplayStringDescriptor(*pData, StringDescs, LatestDevicePowerState);
}
@@ -2004,14 +2004,14 @@ DisplayVCProcessingUnit ( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
pData = (PUCHAR) VidProcessingDesc + (VidProcessingDesc->bLength - 1);
AppendTextBuffer("bmVideoStandards : ");
VDisplayBytes(pData, 1);
- // map the first control
+ // map the first control
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData);
@@ -2020,9 +2020,9 @@ DisplayVCProcessingUnit ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slProcessorVideoStandards,
+ GetStringFromList(slProcessorVideoStandards,
sizeof(slProcessorVideoStandards) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid PU bmVideoStandards value"));
cMask = cMask << 1;
@@ -2106,16 +2106,16 @@ DisplayVCExtensionUnit ( AppendTextBuffer("guidExtensionCode: %S\r\n", szGUID);
AppendTextBuffer("bNumControls: 0x%02X\r\n", VidExtensionDesc->bNumControls);
AppendTextBuffer("bNrInPins: 0x%02X\r\n", VidExtensionDesc->bNrInPins);
- if (gDoAnnotation)
- {
+ if (gDoAnnotation)
+ {
AppendTextBuffer("===>List of Connected Units and Terminal ID's\r\n");
}
// baSourceID is a variable length field
// Size is in bNrInPins, must be at least 1 (so index starts at 1)
- for (i = 1, pData = (PUCHAR) &VidExtensionDesc->baSourceID;
+ for (i = 1, pData = (PUCHAR) &VidExtensionDesc->baSourceID;
i <= VidExtensionDesc->bNrInPins; i++, pData++)
{
- AppendTextBuffer("baSourceID[%d]: 0x%02X\r\n",
+ AppendTextBuffer("baSourceID[%d]: 0x%02X\r\n",
i, *pData);
}
// point to bControlSize (address of bNrInPins plus number of fields in bNrInPins
@@ -2135,9 +2135,9 @@ DisplayVCExtensionUnit ( {
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
-
- // map byte
+ BYTE cMask = 1;
+
+ // map byte
for ( ; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData + i);
@@ -2149,7 +2149,7 @@ DisplayVCExtensionUnit ( "Vendor-Specific (Optional)");
cMask = cMask << 1;
- }
+ }
}
}
@@ -2166,15 +2166,15 @@ DisplayVCExtensionUnit ( }
// size of descriptor struct size (23) + bNrInPins + bControlSize + iExtension size
- //
-// p = (sizeof(VIDEO_EXTENSION_UNIT)
+ //
+// p = (sizeof(VIDEO_EXTENSION_UNIT)
// + VidExtensionDesc->bNrInPins + bControlSize + 1);
if (VidExtensionDesc->bLength != bLength)
{
//@@TestCase B10.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the
+ //@@The declared length in the device descriptor is not equal to the
//@@ required length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of 0x%02X incorrect, should be 0x%02X\r\n",
VidExtensionDesc->bLength, p);
@@ -2204,7 +2204,7 @@ DisplayVCExtensionUnit ( OOPS();
}
- for (i = 1, pData = (PUCHAR) &VidExtensionDesc->baSourceID;
+ for (i = 1, pData = (PUCHAR) &VidExtensionDesc->baSourceID;
i <= VidExtensionDesc->bNrInPins; i++, pData++)
{
if (*pData == 0)
@@ -2252,13 +2252,13 @@ DisplayVidInHeader ( AppendTextBuffer(" -> Validated\r\n");
}
- AppendTextBuffer("bEndpointAddress: 0x%02X",
+ AppendTextBuffer("bEndpointAddress: 0x%02X",
VidInHeaderDesc->bEndpointAddress);
- if (USB_ENDPOINT_DIRECTION_IN(VidInHeaderDesc->bEndpointAddress))
+ if (USB_ENDPOINT_DIRECTION_IN(VidInHeaderDesc->bEndpointAddress))
{
if (gDoAnnotation)
- {
- AppendTextBuffer(" -> Direction: IN - EndpointID: %d",
+ {
+ AppendTextBuffer(" -> Direction: IN - EndpointID: %d",
(VidInHeaderDesc->bEndpointAddress & 0x0F));
}
AppendTextBuffer("\r\n");
@@ -2269,9 +2269,9 @@ DisplayVidInHeader ( AppendTextBuffer(" -> Dynamic Format Change %sSupported",
! (VidInHeaderDesc->bmInfo & 0x01) ? "not " : " ");
}
- AppendTextBuffer("\r\nbTerminalLink: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbTerminalLink: 0x%02X\r\n",
VidInHeaderDesc->bTerminalLink);
- AppendTextBuffer("bStillCaptureMethod: 0x%02X",
+ AppendTextBuffer("bStillCaptureMethod: 0x%02X",
VidInHeaderDesc->bStillCaptureMethod);
// globally save the StillMethod, then verify value
@@ -2287,35 +2287,35 @@ DisplayVidInHeader ( if (gDoAnnotation)
{
AppendTextBuffer(" -> Invalid Still Capture Method");
- }
+ }
}
else
{
if (0 == StillMethod)
- {
+ {
AppendTextBuffer(" -> No Still Capture");
}
else
{
- AppendTextBuffer(" -> Still Capture Method %d",
+ AppendTextBuffer(" -> Still Capture Method %d",
VidInHeaderDesc->bStillCaptureMethod);
}
}
- AppendTextBuffer("\r\nbTriggerSupport: 0x%02X",
+ AppendTextBuffer("\r\nbTriggerSupport: 0x%02X",
VidInHeaderDesc->bTriggerSupport);
if(gDoAnnotation)
{
AppendTextBuffer(" -> ");
- if (! VidInHeaderDesc->bTriggerSupport)
+ if (! VidInHeaderDesc->bTriggerSupport)
AppendTextBuffer("No ");
AppendTextBuffer("Hardware Triggering Support");
}
AppendTextBuffer("\r\n");
- AppendTextBuffer("bTriggerUsage: 0x%02X",
+ AppendTextBuffer("bTriggerUsage: 0x%02X",
VidInHeaderDesc->bTriggerUsage);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if (VidInHeaderDesc->bTriggerSupport != 0)
{
@@ -2326,7 +2326,7 @@ DisplayVidInHeader ( }
}
- AppendTextBuffer("\r\nbControlSize: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbControlSize: 0x%02X\r\n",
VidInHeaderDesc->bControlSize);
// are there formats to display?
@@ -2335,7 +2335,7 @@ DisplayVidInHeader ( UINT uFormatIndex = 1;
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
// There are (bNumFormats) bmaControls fields, each with size (bControlSize)
pData = (PUCHAR) &(VidInHeaderDesc->bControlSize);
@@ -2355,8 +2355,8 @@ DisplayVidInHeader ( else
{
VDisplayBytes(pData, VidInHeaderDesc->bControlSize);
-
- // map the first control
+
+ // map the first control
for (uBitIndex = 0, cMask = 1; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pData);
@@ -2365,9 +2365,9 @@ DisplayVidInHeader ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slInputHeaderControls,
+ GetStringFromList(slInputHeaderControls,
sizeof(slInputHeaderControls) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid Control value"));
cMask = cMask << 1;
@@ -2376,16 +2376,16 @@ DisplayVidInHeader ( pData += VidInHeaderDesc->bControlSize;
}
}
-
- p = (sizeof(VIDEO_STREAMING_INPUT_HEADER) +
+
+ p = (sizeof(VIDEO_STREAMING_INPUT_HEADER) +
(VidInHeaderDesc->bNumFormats * VidInHeaderDesc->bControlSize));
- if (VidInHeaderDesc->bLength != p)
+ if (VidInHeaderDesc->bLength != p)
{
//@@TestCase B11.2 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The descriptor should be the size of the descriptor structure
- //@@ plus the number of formats times the size of each format
+ //@@The descriptor should be the size of the descriptor structure
+ //@@ plus the number of formats times the size of each format
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
VidInHeaderDesc->bLength, p);
OOPS();
@@ -2514,7 +2514,7 @@ DisplayVidOutHeader ( // point to first bmaControls
pControls++;
- // Size of UVC 1.1 Video Output Header is 1.0 size
+ // Size of UVC 1.1 Video Output Header is 1.0 size
// plus 1 (bControlSize field) plus (number of formats * bControlSize)
bLength += 1 + (VidOutHeaderDesc->bNumFormats * bControlSize);
@@ -2527,7 +2527,7 @@ DisplayVidOutHeader ( UINT uFormatIndex = 1;
UINT uBitIndex = 0;
BYTE cCheckBit = 0;
- BYTE cMask = 1;
+ BYTE cMask = 1;
// There are (bNumFormats) bmaControls fields, each with size (bControlSize)
for ( ; uFormatIndex <= VidOutHeaderDesc->bNumFormats; uFormatIndex++, pControls ++)
@@ -2542,8 +2542,8 @@ DisplayVidOutHeader ( else
{
VDisplayBytes(pControls, bControlSize);
-
- // map the first control
+
+ // map the first control
for (uBitIndex = 0, cMask = 1; uBitIndex < 8; uBitIndex++ )
{
cCheckBit = cMask & *(pControls);
@@ -2552,9 +2552,9 @@ DisplayVidOutHeader ( uBitIndex,
cCheckBit ? 1 : 0,
cCheckBit ? "yes - " : " no - ",
- GetStringFromList(slOutputHeaderControls,
+ GetStringFromList(slOutputHeaderControls,
sizeof(slOutputHeaderControls) / sizeof(STRINGLIST),
- cMask,
+ cMask,
"Invalid control value"));
cMask = cMask << 1;
@@ -2569,7 +2569,7 @@ DisplayVidOutHeader ( //@@TestCase B12.1 (also in Descript.c)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the
+ //@@The declared length in the device descriptor is not equal to the
//@@ required length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
VidOutHeaderDesc->bLength,
@@ -2665,7 +2665,7 @@ DisplayStillImageFrame ( AppendTextBuffer("bDescriptorType: 0x%02X\r\n", StillFrameDesc->bDescriptorType);
AppendTextBuffer("bDescriptorSubtype: 0x%02X\r\n", StillFrameDesc->bDescriptorSubtype);
AppendTextBuffer("bEndpointAddress: 0x%02X\r\n", StillFrameDesc->bEndpointAddress);
- AppendTextBuffer("bNumImageSizePatterns: 0x%02X\r\n",
+ AppendTextBuffer("bNumImageSizePatterns: 0x%02X\r\n",
StillFrameDesc->bNumImageSizePatterns);
if (StillFrameDesc->bNumImageSizePatterns < 1)
{
@@ -2681,7 +2681,7 @@ DisplayStillImageFrame ( // point to first StillFrameDesc->dwStillImage structure
pXY = (VIDEO_STILL_IMAGE_RECT *) &StillFrameDesc->aStillRect[0];
- for (i = 1; i <= StillFrameDesc->bNumImageSizePatterns; i++, pXY++)
+ for (i = 1; i <= StillFrameDesc->bNumImageSizePatterns; i++, pXY++)
{
AppendTextBuffer("wWidth[%d]: 0x%04X\r\n",
i, pXY->wWidth);
@@ -2694,10 +2694,10 @@ DisplayStillImageFrame ( uNumComp = *pbCurr;
AppendTextBuffer("bNumCompressionPattern: 0x%02X\r\n", *pbCurr++);
- for (i = 1; i <= uNumComp; i++)
+ for (i = 1; i <= uNumComp; i++)
{
- AppendTextBuffer("bCompression[%d]: 0x%02X\r\n",
- i, *pbCurr++);
+ AppendTextBuffer("bCompression[%d]: 0x%02X\r\n",
+ i, *pbCurr++);
}
switch(StillMethod) {
@@ -2747,9 +2747,9 @@ DisplayStillImageFrame ( "This should be non-zero when using StillMethod 3.\r\n",
(StillFrameDesc->bEndpointAddress));
OOPS(); }
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
- AppendTextBuffer(" -> Direction: IN - EndpointID: %d",
+ AppendTextBuffer(" -> Direction: IN - EndpointID: %d",
(StillFrameDesc->bEndpointAddress & 0x0F));
}
AppendTextBuffer("\r\n");
@@ -2835,7 +2835,7 @@ DisplayColorMatching ( //*****************************************************************************
//
-// DisplayUncompressedFormat()
+// DisplayUncompressedFormat()
//
//*****************************************************************************
@@ -2865,13 +2865,13 @@ DisplayUncompressedFormat ( AppendTextBuffer("guidFormat: %S", szGUID);
pStr = VidFormatGUIDCodeToName((REFGUID) &UnCompFormatDesc->guidFormat);
- if ( pStr )
+ if ( pStr )
{
if ( gDoAnnotation )
{
AppendTextBuffer(" = %s Format", pStr);
}
- }
+ }
AppendTextBuffer("\r\n");
AppendTextBuffer("bBitsPerPixel: 0x%02X\r\n", UnCompFormatDesc->bBitsPerPixel);
AppendTextBuffer("bDefaultFrameIndex: 0x%02X\r\n", UnCompFormatDesc->bDefaultFrameIndex);
@@ -2881,7 +2881,7 @@ DisplayUncompressedFormat ( //@@TestCase B15.1 (descript.c line 925)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the required
+ //@@The declared length in the device descriptor is not equal to the required
//@@length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
UnCompFormatDesc->bLength,
@@ -2904,7 +2904,7 @@ DisplayUncompressedFormat ( //@@TestCase B15.3 (descript.c line 930)
//@@ERROR
//@@Descriptor Field - bNumFrameDescriptors
- //@@bNumFrameDescriptors is set to zero which is not in accordance with the
+ //@@bNumFrameDescriptors is set to zero which is not in accordance with the
//@@USB Video Device Specification
AppendTextBuffer("*!*ERROR: bNumFrameDescriptors = 0, must have at least 1 Frame descriptor\r\n");
OOPS();
@@ -2930,7 +2930,7 @@ DisplayUncompressedFormat ( OOPS();
}
- if (UnCompFormatDesc->bDefaultFrameIndex == 0 || UnCompFormatDesc->bDefaultFrameIndex >
+ if (UnCompFormatDesc->bDefaultFrameIndex == 0 || UnCompFormatDesc->bDefaultFrameIndex >
UnCompFormatDesc->bNumFrameDescriptors)
{
//@@TestCase B15.6 (desctipt.c line 945)
@@ -2943,28 +2943,28 @@ DisplayUncompressedFormat ( OOPS();
}
- AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
+ AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
UnCompFormatDesc->bAspectRatioX);
- AppendTextBuffer("bAspectRatioY: 0x%02X",
+ AppendTextBuffer("bAspectRatioY: 0x%02X",
UnCompFormatDesc->bAspectRatioY);
- if (((UnCompFormatDesc->bmInterlaceFlags & 0x01) &&
- (UnCompFormatDesc->bAspectRatioY != 0 &&
+ if (((UnCompFormatDesc->bmInterlaceFlags & 0x01) &&
+ (UnCompFormatDesc->bAspectRatioY != 0 &&
UnCompFormatDesc->bAspectRatioX != 0)))
{
- if(gDoAnnotation)
+ if(gDoAnnotation)
{
AppendTextBuffer(" -> Aspect Ratio is set for a %d:%d display",
- (UnCompFormatDesc->bAspectRatioX),(UnCompFormatDesc->bAspectRatioY));
- }
- else
+ (UnCompFormatDesc->bAspectRatioX),(UnCompFormatDesc->bAspectRatioY));
+ }
+ else
{
if (UnCompFormatDesc->bAspectRatioY != 0 || UnCompFormatDesc->bAspectRatioX != 0)
{
//@@TestCase B15.7
//@@ERROR
//@@Descriptor Field - bAspectRatioX, bAspectRatioY
- //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
+ //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
//@@ if stream is non-interlaced
AppendTextBuffer("\r\n*!*ERROR: Both bAspectRatioX and bAspectRatioY "\
"must equal 0 if stream is non-interlaced");
@@ -2972,27 +2972,27 @@ DisplayUncompressedFormat ( }
}
}
- AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
UnCompFormatDesc->bmInterlaceFlags);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
- AppendTextBuffer(" D0 = 0x%02X Interlaced stream or variable: %s\r\n",
+ AppendTextBuffer(" D0 = 0x%02X Interlaced stream or variable: %s\r\n",
(UnCompFormatDesc->bmInterlaceFlags & 1),
(UnCompFormatDesc->bmInterlaceFlags & 1) ? "Yes" : "No");
- AppendTextBuffer(" D1 = 0x%02X Fields per frame: %s\r\n",
+ AppendTextBuffer(" D1 = 0x%02X Fields per frame: %s\r\n",
((UnCompFormatDesc->bmInterlaceFlags >> 1) & 1),
((UnCompFormatDesc->bmInterlaceFlags >> 1) & 1) ? "1 field" : "2 fields");
- AppendTextBuffer(" D2 = 0x%02X Field 1 first: %s\r\n",
+ AppendTextBuffer(" D2 = 0x%02X Field 1 first: %s\r\n",
((UnCompFormatDesc->bmInterlaceFlags >> 2) & 1),
((UnCompFormatDesc->bmInterlaceFlags >> 2) & 1) ? "Yes" : "No");
//@@TestCase B15.9
//@@Not yet implemented - Priority 1
//@@Descriptor Field - bmInterlaceFlags
//@@Validate that reserved bits (D3) are set to zero.
- AppendTextBuffer(" D3 = 0x%02X Reserved%s\r\n",
+ AppendTextBuffer(" D3 = 0x%02X Reserved%s\r\n",
((UnCompFormatDesc->bmInterlaceFlags >> 3) & 1),
- ((UnCompFormatDesc->bmInterlaceFlags >> 3) & 1) ?
+ ((UnCompFormatDesc->bmInterlaceFlags >> 3) & 1) ?
"\r\n*!*ERROR: Reserved to 0" : "" );
AppendTextBuffer(" D4..5 = 0x%02X Field patterns ->",
((UnCompFormatDesc->bmInterlaceFlags >> 4) & 3));
@@ -3038,11 +3038,11 @@ DisplayUncompressedFormat ( //@@TestCase B15.11
//@@Not yet implemented - Priority 1
//@@Descriptor Field - bCopyProtect
- //@@Question - Are their reserved bits and should we validate that
+ //@@Question - Are their reserved bits and should we validate that
//@@ reserved bits are set to zero?
- AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
+ AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
UnCompFormatDesc->bCopyProtect);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if (UnCompFormatDesc->bCopyProtect)
AppendTextBuffer(" -> Duplication Restricted");
@@ -3079,10 +3079,10 @@ DisplayUncompressedFrameType ( //@@DisplayUncompressedFrameType -Uncompressed Frame
AppendTextBuffer("\r\n ===>Video Streaming Uncompressed Frame Type Descriptor<===\r\n");
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if(UnCompFrameDesc->bFrameIndex == g_chUNCFrameDefault)
- {
+ {
AppendTextBuffer(" --->This is the Default (optimum) Frame index\r\n");
}
}
@@ -3103,7 +3103,7 @@ DisplayUncompressedFrameType ( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
UnCompFrameDesc->dwDefaultFrameInterval,
((double)UnCompFrameDesc->dwDefaultFrameInterval)/10000.0,
(10000000.0/((double)UnCompFrameDesc->dwDefaultFrameInterval))
@@ -3115,7 +3115,7 @@ DisplayUncompressedFrameType ( //@@TestCase B15.1 (descript.c line 925)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the required
+ //@@The declared length in the device descriptor is not equal to the required
//@@length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
UnCompFrameDesc->bLength, bLength);
@@ -3127,7 +3127,7 @@ DisplayUncompressedFrameType ( //@@TestCase B16.2 (descript.c line 991)
//@@ERROR
//@@Descriptor Field - bFrameIndex
- //@@bFrameIndex must be nonzero
+ //@@bFrameIndex must be nonzero
AppendTextBuffer("*!*ERROR: bFrameIndex = 0, this is a 1 based index\r\n");
OOPS();
}
@@ -3187,9 +3187,9 @@ DisplayUncompressedFrameType ( AppendTextBuffer("*!*ERROR: dwMinBitRate should be less than dwMaxBitRate\r\n");
OOPS();
}
- else
+ else
{
- if (UnCompFrameDesc->bFrameIntervalType == 1 &&
+ if (UnCompFrameDesc->bFrameIntervalType == 1 &&
UnCompFrameDesc->dwMinBitRate != UnCompFrameDesc->dwMaxBitRate)
{
//@@TestCase B16.9
@@ -3257,12 +3257,12 @@ DisplayUnComContinuousFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+ AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMinFrameInterval,
((double)dwMinFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMinFrameInterval) + 0.5));
-
- AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+
+ AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMaxFrameInterval,
((double)dwMaxFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMaxFrameInterval) + 0.5));
@@ -3367,7 +3367,7 @@ DisplayUnComDiscreteFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
iNdex, *ulFrameInterval,
((double)*ulFrameInterval)/10000.0,
(10000000.0/((double)*ulFrameInterval))
@@ -3422,7 +3422,7 @@ DisplayMJPEGFormat ( //@@TestCase B19.1 (descript.c line 1098)
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the
+ //@@The declared length in the device descriptor is not equal to the
//@@ required length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
MJPEGFormatDesc->bLength,
@@ -3435,7 +3435,7 @@ DisplayMJPEGFormat ( //@@TestCase B19.2 (descript.c line 1103)
//@@ERROR
//@@Descriptor Field - bFormatIndex
- //@@bFormatIndex is set to zero which is not in accordance with
+ //@@bFormatIndex is set to zero which is not in accordance with
//@@ the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bFormatIndex must be non-zero\r\n");
OOPS();
@@ -3446,41 +3446,41 @@ DisplayMJPEGFormat ( //@@TestCase B19.3 (descript.c line 1108)
//@@ERROR
//@@Descriptor Field - bNumFrameDescriptors
- //@@bNumFrameDescriptors is set to zero which is not in accordance
+ //@@bNumFrameDescriptors is set to zero which is not in accordance
//@@ with the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bNumFrameDescriptors must be non-zero\r\n");
OOPS();
}
- AppendTextBuffer("bmFlags: 0x%02X",
+ AppendTextBuffer("bmFlags: 0x%02X",
(MJPEGFormatDesc->bmFlags & 0x01));
//@@TestCase B19.4
//@@Not yet implemented - Priority 1
//@@Descriptor Field - bmFlags
//@@We should validate that reserved bits are set to zero.
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if(MJPEGFormatDesc->bmFlags & 0x01)
- {
+ {
AppendTextBuffer(" -> Sample Size is Fixed");
}
else
- {
+ {
AppendTextBuffer(" -> Sample Size is Not Fixed");
}
}
- AppendTextBuffer("\r\nbDefaultFrameIndex: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbDefaultFrameIndex: 0x%02X\r\n",
MJPEGFormatDesc->bDefaultFrameIndex);
- if (MJPEGFormatDesc->bDefaultFrameIndex == 0 ||
- MJPEGFormatDesc->bDefaultFrameIndex >
+ if (MJPEGFormatDesc->bDefaultFrameIndex == 0 ||
+ MJPEGFormatDesc->bDefaultFrameIndex >
MJPEGFormatDesc->bNumFrameDescriptors)
{
//@@TestCase B19.5 (descript.c line 1113)
//@@ERROR
//@@Descriptor Field - bDefaultFrameIndex
- //@@bDefaultFrameIndex is not in the domain of constrained by
+ //@@bDefaultFrameIndex is not in the domain of constrained by
//@@ bNumFrameDescriptors
AppendTextBuffer("*!*ERROR: bDefaultFrameIndex 0x%02X invalid, should "\
"be between 1 and 0x%02x/r/n",
@@ -3489,56 +3489,56 @@ DisplayMJPEGFormat ( OOPS();
}
- AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
+ AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
MJPEGFormatDesc->bAspectRatioX);
- AppendTextBuffer("bAspectRatioY: 0x%02X",
+ AppendTextBuffer("bAspectRatioY: 0x%02X",
MJPEGFormatDesc->bAspectRatioY);
- if(((MJPEGFormatDesc->bmInterlaceFlags & 0x01) &&
- ((MJPEGFormatDesc->bAspectRatioY != 0) &&
- (MJPEGFormatDesc->bAspectRatioX != 0))))
+ if(((MJPEGFormatDesc->bmInterlaceFlags & 0x01) &&
+ ((MJPEGFormatDesc->bAspectRatioY != 0) &&
+ (MJPEGFormatDesc->bAspectRatioX != 0))))
{
if (gDoAnnotation)
{
- AppendTextBuffer(" -> Aspect Ratio is set for a %d:%d display",
+ AppendTextBuffer(" -> Aspect Ratio is set for a %d:%d display",
(MJPEGFormatDesc->bAspectRatioX), (MJPEGFormatDesc->bAspectRatioY));
}
}
- else
+ else
{
if (MJPEGFormatDesc->bAspectRatioY != 0 || MJPEGFormatDesc->bAspectRatioX != 0)
{
//@@TestCase B19.6
//@@ERROR
//@@Descriptor Field - bAspectRatioX and bAspectRatioY
- //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
+ //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
//@@ if stream is non-interlaced
AppendTextBuffer("\r\n*!*ERROR: bAspectRatioX and bAspectRatioY must "\
"be 0 if stream non-Interlaced");
OOPS();
}
}
- AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
MJPEGFormatDesc->bmInterlaceFlags);
if (gDoAnnotation)
{
- AppendTextBuffer(" D00 = %x %sInterlaced stream or variable\r\n",
+ AppendTextBuffer(" D00 = %x %sInterlaced stream or variable\r\n",
(MJPEGFormatDesc->bmInterlaceFlags & 1),
(MJPEGFormatDesc->bmInterlaceFlags & 1) ? "" : " non-");
- AppendTextBuffer(" D01 = %x %s per frame\r\n",
+ AppendTextBuffer(" D01 = %x %s per frame\r\n",
((MJPEGFormatDesc->bmInterlaceFlags >> 1) & 1),
((MJPEGFormatDesc->bmInterlaceFlags >> 1) & 1) ? " 1 field" : " 2 fields");
- AppendTextBuffer(" D02 = %x Field 1 %sfirst\r\n",
+ AppendTextBuffer(" D02 = %x Field 1 %sfirst\r\n",
((MJPEGFormatDesc->bmInterlaceFlags >> 2) & 1),
((MJPEGFormatDesc->bmInterlaceFlags >> 2) & 1) ? "" : "not ");
//@@TestCase B19.7
//@@Not yet implemented - Priority 1
//@@Descriptor Field - bmInterlaceFlags
//@@Validate that reserved bits (D3) are set to zero.
- AppendTextBuffer(" D03 = %x Reserved%s\r\n",
+ AppendTextBuffer(" D03 = %x Reserved%s\r\n",
((MJPEGFormatDesc->bmInterlaceFlags >> 3) & 1),
- ((MJPEGFormatDesc->bmInterlaceFlags >> 3) & 1) ?
+ ((MJPEGFormatDesc->bmInterlaceFlags >> 3) & 1) ?
"\r\n*!*ERROR: non zero" : "" );
AppendTextBuffer(" D4..5 = %x Field patterns ->",
((MJPEGFormatDesc->bmInterlaceFlags >> 4) & 3));
@@ -3583,11 +3583,11 @@ DisplayMJPEGFormat ( //@@TestCase B19.9
//@@Not yet implemented - Priority 1
//@@Descriptor Field - bCopyProtect
- //@@Question - Are their reserved bits and should we validate that
+ //@@Question - Are their reserved bits and should we validate that
//@@ reserved bits are set to zero?
- AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
+ AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
MJPEGFormatDesc->bCopyProtect);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if (MJPEGFormatDesc->bCopyProtect)
AppendTextBuffer(" -> Duplication Restricted");
@@ -3620,10 +3620,10 @@ DisplayMJPEGFrameType ( bLength = SizeOfVideoFrameMjpeg(MJPEGFrameDesc);
AppendTextBuffer("\r\n ===>Video Streaming MJPEG Frame Type Descriptor<===\r\n");
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if(MJPEGFrameDesc->bFrameIndex == g_chMJPEGFrameDefault)
- {
+ {
AppendTextBuffer(" --->This is the Default (optimum) Frame index\r\n");
}
}
@@ -3645,7 +3645,7 @@ DisplayMJPEGFrameType ( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
MJPEGFrameDesc->dwDefaultFrameInterval,
((double)MJPEGFrameDesc->dwDefaultFrameInterval)/10000.0,
(10000000.0/((double)MJPEGFrameDesc->dwDefaultFrameInterval))
@@ -3796,12 +3796,12 @@ DisplayMJPEGContinuousFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+ AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMinFrameInterval,
((double)dwMinFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMinFrameInterval) + 0.5));
-
- AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+
+ AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMaxFrameInterval,
((double)dwMaxFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMaxFrameInterval) + 0.5));
@@ -3907,7 +3907,7 @@ DisplayMJPEGDiscreteFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
iNdex, *ulFrameInterval,
((double)*ulFrameInterval)/10000.0,
(10000000.0/((double)*ulFrameInterval))
@@ -4115,13 +4115,13 @@ DisplayMPEG2TSFormat ( i++;
AppendTextBuffer("guidStrideFormat: %S", szGUID);
pStr = VidFormatGUIDCodeToName((REFGUID) pStrideGuid);
- if(gDoAnnotation)
+ if(gDoAnnotation)
{
if (pStr)
{
AppendTextBuffer(" = %s Format", pStr);
}
- }
+ }
AppendTextBuffer("\r\n");
bLength = sizeof(VIDEO_FORMAT_MPEG2TS) + sizeof(GUID);
}
@@ -4244,13 +4244,13 @@ DisplayStreamPayload ( AppendTextBuffer("guidFormat: %S", szGUID);
pStr = VidFormatGUIDCodeToName((REFGUID) &StreamPayloadDesc->guidFormat);
- if(gDoAnnotation)
+ if(gDoAnnotation)
{
if (pStr)
{
AppendTextBuffer(" = %s Format", pStr);
}
- }
+ }
AppendTextBuffer("\r\n");
AppendTextBuffer("dwPacketLength: 0x%02X\r\n", StreamPayloadDesc->dwPacketLength);
@@ -4302,10 +4302,10 @@ DisplayDVFormat ( AppendTextBuffer("bFormatIndex: 0x%02X\r\n", DVFormatDesc->bFormatIndex);
AppendTextBuffer("dwMaxVideoFrameBufferSize: 0x%08X\r\n", DVFormatDesc->dwMaxVideoFrameBufferSize);
AppendTextBuffer("bFormatType: 0x%02X\r\n", DVFormatDesc->bFormatType);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
AppendTextBuffer(" D0..6 = Format Type ->");
- switch(DVFormatDesc->bFormatType & 0x03)
+ switch(DVFormatDesc->bFormatType & 0x03)
{
case 0x00:
AppendTextBuffer(" SD-DV\r\n");
@@ -4344,7 +4344,7 @@ DisplayDVFormat ( //@@ERROR
//@@Descriptor Field - bFormatIndex
//@@bFormatIndex invalid
- AppendTextBuffer("*!*ERROR: bFormatIndex of 0x%02X is invalid\r\n",
+ AppendTextBuffer("*!*ERROR: bFormatIndex of 0x%02X is invalid\r\n",
DVFormatDesc->bFormatIndex);
OOPS();
}
@@ -4355,7 +4355,7 @@ DisplayDVFormat ( //@@ERROR
//@@Descriptor Field - dwMaxVideoFrameBufferSize
//@@dwMaxVideoFrameBufferSize invalid
- AppendTextBuffer("*!*ERROR: dwMaxVideoFrameBufferSize of 0x%02X is invalid\r\n",
+ AppendTextBuffer("*!*ERROR: dwMaxVideoFrameBufferSize of 0x%02X is invalid\r\n",
DVFormatDesc->dwMaxVideoFrameBufferSize);
OOPS();
}
@@ -4528,10 +4528,10 @@ DisplayVendorVidFrameType ( bLength = SizeOfVideoFrameVendor(VendorVidFrameDesc);
AppendTextBuffer("\r\n ===>Video Streaming Vendor Video Frame Type Descriptor<===\r\n");
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if(VendorVidFrameDesc->bFrameIndex == g_chVendorFrameDefault)
- {
+ {
AppendTextBuffer(" --->This is the Default (optimum) Frame index\r\n");
}
}
@@ -4587,7 +4587,7 @@ DisplayVendorVidFrameType ( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
VendorVidFrameDesc->dwDefaultFrameInterval,
((double)VendorVidFrameDesc->dwDefaultFrameInterval)/10000.0,
(10000000.0/((double)VendorVidFrameDesc->dwDefaultFrameInterval))
@@ -4645,7 +4645,7 @@ DisplayVendorVidFrameType ( }
else
{
- if (VendorVidFrameDesc->bFrameIntervalType == 1 &&
+ if (VendorVidFrameDesc->bFrameIntervalType == 1 &&
VendorVidFrameDesc->dwMinBitRate != VendorVidFrameDesc->dwMaxBitRate)
{
//@@TestCase B29.9
@@ -4726,12 +4726,12 @@ DisplayVendorVidContinuousFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+ AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMinFrameInterval,
((double)dwMinFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMinFrameInterval) + 0.5));
-
- AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+
+ AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMaxFrameInterval,
((double)dwMaxFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMaxFrameInterval) + 0.5));
@@ -4836,7 +4836,7 @@ DisplayVendorVidDiscreteFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
iNdex, *ulFrameInterval,
((double)*ulFrameInterval)/10000.0,
(10000000.0/((double)*ulFrameInterval))
@@ -4867,7 +4867,7 @@ DisplayVendorVidDiscreteFrameType( //*****************************************************************************
//
-// DisplayFramePayloadFormat()
+// DisplayFramePayloadFormat()
//
//*****************************************************************************
@@ -4897,13 +4897,13 @@ DisplayFramePayloadFormat ( AppendTextBuffer("guidFormat: %S", szGUID);
pStr = VidFormatGUIDCodeToName((REFGUID) &FramePayloadFormatDesc->guidFormat);
- if ( pStr )
+ if ( pStr )
{
if ( gDoAnnotation )
{
AppendTextBuffer(" = %s Format", pStr);
}
- }
+ }
AppendTextBuffer("\r\n");
AppendTextBuffer("bBitsPerPixel: 0x%02X\r\n", FramePayloadFormatDesc->bBitsPerPixel);
AppendTextBuffer("bDefaultFrameIndex: 0x%02X\r\n", FramePayloadFormatDesc->bDefaultFrameIndex);
@@ -4912,7 +4912,7 @@ DisplayFramePayloadFormat ( {
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the required
+ //@@The declared length in the device descriptor is not equal to the required
//@@length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
FramePayloadFormatDesc->bLength,
@@ -4933,7 +4933,7 @@ DisplayFramePayloadFormat ( {
//@@ERROR
//@@Descriptor Field - bNumFrameDescriptors
- //@@bNumFrameDescriptors is set to zero which is not in accordance with the
+ //@@bNumFrameDescriptors is set to zero which is not in accordance with the
//@@USB Video Device Specification
AppendTextBuffer("*!*ERROR: bNumFrameDescriptors = 0, must have at least 1 Frame descriptor\r\n");
OOPS();
@@ -4957,7 +4957,7 @@ DisplayFramePayloadFormat ( OOPS();
}
- if (FramePayloadFormatDesc->bDefaultFrameIndex == 0 || FramePayloadFormatDesc->bDefaultFrameIndex >
+ if (FramePayloadFormatDesc->bDefaultFrameIndex == 0 || FramePayloadFormatDesc->bDefaultFrameIndex >
FramePayloadFormatDesc->bNumFrameDescriptors)
{
//@@ERROR
@@ -4969,27 +4969,27 @@ DisplayFramePayloadFormat ( OOPS();
}
- AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
+ AppendTextBuffer("bAspectRatioX: 0x%02X\r\n",
FramePayloadFormatDesc->bAspectRatioX);
- AppendTextBuffer("bAspectRatioY: 0x%02X",
+ AppendTextBuffer("bAspectRatioY: 0x%02X",
FramePayloadFormatDesc->bAspectRatioY);
- if (((FramePayloadFormatDesc->bmInterlaceFlags & 0x01) &&
- (FramePayloadFormatDesc->bAspectRatioY != 0 &&
+ if (((FramePayloadFormatDesc->bmInterlaceFlags & 0x01) &&
+ (FramePayloadFormatDesc->bAspectRatioY != 0 &&
FramePayloadFormatDesc->bAspectRatioX != 0)))
{
- if(gDoAnnotation)
+ if(gDoAnnotation)
{
AppendTextBuffer(" -> Aspect Ratio is set for a %d:%d display",
- (FramePayloadFormatDesc->bAspectRatioX),(FramePayloadFormatDesc->bAspectRatioY));
- }
- else
+ (FramePayloadFormatDesc->bAspectRatioX),(FramePayloadFormatDesc->bAspectRatioY));
+ }
+ else
{
if (FramePayloadFormatDesc->bAspectRatioY != 0 || FramePayloadFormatDesc->bAspectRatioX != 0)
{
//@@ERROR
//@@Descriptor Field - bAspectRatioX, bAspectRatioY
- //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
+ //@@Verify that that bAspectRatioX and bAspectRatioY are set to zero
//@@ if stream is non-interlaced
AppendTextBuffer("\r\n*!*ERROR: Both bAspectRatioX and bAspectRatioY "\
"must equal 0 if stream is non-interlaced");
@@ -4997,25 +4997,25 @@ DisplayFramePayloadFormat ( }
}
}
- AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
+ AppendTextBuffer("\r\nbmInterlaceFlags: 0x%02X\r\n",
FramePayloadFormatDesc->bmInterlaceFlags);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
- AppendTextBuffer(" D0 = 0x%02X Interlaced stream or variable: %s\r\n",
+ AppendTextBuffer(" D0 = 0x%02X Interlaced stream or variable: %s\r\n",
(FramePayloadFormatDesc->bmInterlaceFlags & 1),
(FramePayloadFormatDesc->bmInterlaceFlags & 1) ? "Yes" : "No");
- AppendTextBuffer(" D1 = 0x%02X Fields per frame: %s\r\n",
+ AppendTextBuffer(" D1 = 0x%02X Fields per frame: %s\r\n",
((FramePayloadFormatDesc->bmInterlaceFlags >> 1) & 1),
((FramePayloadFormatDesc->bmInterlaceFlags >> 1) & 1) ? "1 field" : "2 fields");
- AppendTextBuffer(" D2 = 0x%02X Field 1 first: %s\r\n",
+ AppendTextBuffer(" D2 = 0x%02X Field 1 first: %s\r\n",
((FramePayloadFormatDesc->bmInterlaceFlags >> 2) & 1),
((FramePayloadFormatDesc->bmInterlaceFlags >> 2) & 1) ? "Yes" : "No");
//@@Descriptor Field - bmInterlaceFlags
//@@Validate that reserved bits (D3) are set to zero.
- AppendTextBuffer(" D3 = 0x%02X Reserved%s\r\n",
+ AppendTextBuffer(" D3 = 0x%02X Reserved%s\r\n",
((FramePayloadFormatDesc->bmInterlaceFlags >> 3) & 1),
- ((FramePayloadFormatDesc->bmInterlaceFlags >> 3) & 1) ?
+ ((FramePayloadFormatDesc->bmInterlaceFlags >> 3) & 1) ?
"\r\n*!*ERROR: Reserved to 0" : "" );
AppendTextBuffer(" D4..5 = 0x%02X Field patterns ->",
((FramePayloadFormatDesc->bmInterlaceFlags >> 4) & 3));
@@ -5057,11 +5057,11 @@ DisplayFramePayloadFormat ( }
//@@Descriptor Field - bCopyProtect
- //@@Question - Are their reserved bits and should we validate that
+ //@@Question - Are their reserved bits and should we validate that
//@@ reserved bits are set to zero?
- AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
+ AppendTextBuffer("\r\nbCopyProtect: 0x%02X",
FramePayloadFormatDesc->bCopyProtect);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if (FramePayloadFormatDesc->bCopyProtect)
AppendTextBuffer(" -> Duplication Restricted");
@@ -5070,9 +5070,9 @@ DisplayFramePayloadFormat ( }
//@@Descriptor Field - bVariableSize
- AppendTextBuffer("\r\nbVariableSize: 0x%02X",
+ AppendTextBuffer("\r\nbVariableSize: 0x%02X",
FramePayloadFormatDesc->bVariableSize);
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if (FramePayloadFormatDesc->bVariableSize)
AppendTextBuffer(" -> Variable Size");
@@ -5112,10 +5112,10 @@ DisplayFramePayloadFrame ( //@@DisplayFramePayloadFrame -Frame Based Payload Frame
AppendTextBuffer("\r\n ===>Video Streaming Frame Based Payload Frame Type Descriptor<===\r\n");
- if (gDoAnnotation)
+ if (gDoAnnotation)
{
if(FramePayloadFrameDesc->bFrameIndex == g_chFrameBasedFrameDefault)
- {
+ {
AppendTextBuffer(" --->This is the Default (optimum) Frame index\r\n");
}
}
@@ -5135,7 +5135,7 @@ DisplayFramePayloadFrame ( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwDefaultFrameInterval: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
FramePayloadFrameDesc->dwDefaultFrameInterval,
((double)FramePayloadFrameDesc->dwDefaultFrameInterval)/10000.0,
(10000000.0/((double)FramePayloadFrameDesc->dwDefaultFrameInterval))
@@ -5146,7 +5146,7 @@ DisplayFramePayloadFrame ( {
//@@ERROR
//@@Descriptor Field - bLength
- //@@The declared length in the device descriptor is not equal to the required
+ //@@The declared length in the device descriptor is not equal to the required
//@@length in the USB Video Device Specification
AppendTextBuffer("*!*ERROR: bLength of %d incorrect, should be %d\r\n",
FramePayloadFrameDesc->bLength, bLength);
@@ -5157,7 +5157,7 @@ DisplayFramePayloadFrame ( {
//@@ERROR
//@@Descriptor Field - bFrameIndex
- //@@bFrameIndex must be nonzero
+ //@@bFrameIndex must be nonzero
AppendTextBuffer("*!*ERROR: bFrameIndex = 0, this is a 1 based index\r\n");
OOPS();
}
@@ -5210,9 +5210,9 @@ DisplayFramePayloadFrame ( AppendTextBuffer("*!*ERROR: dwMinBitRate should be less than dwMaxBitRate\r\n");
OOPS();
}
- else
+ else
{
- if (FramePayloadFrameDesc->bFrameIntervalType == 1 &&
+ if (FramePayloadFrameDesc->bFrameIntervalType == 1 &&
FramePayloadFrameDesc->dwMinBitRate != FramePayloadFrameDesc->dwMaxBitRate)
{
//@@WARNING
@@ -5275,12 +5275,12 @@ DisplayFramePayloadContinuousFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+ AppendTextBuffer("dwMinFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMinFrameInterval,
((double)dwMinFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMinFrameInterval) + 0.5));
-
- AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
+
+ AppendTextBuffer("dwMaxFrameInterval: 0x%08X = %lf mSec (%d Hz)\r\n",
dwMaxFrameInterval,
((double)dwMaxFrameInterval)/10000.0,
(ULONG)(10000000.0/((double)dwMaxFrameInterval) + 0.5));
@@ -5378,7 +5378,7 @@ DisplayFramePayloadDiscreteFrameType( // To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
- AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
+ AppendTextBuffer("dwFrameInterval[%d]: 0x%08X = %lf mSec (%4.2f Hz)\r\n",
iNdex, *ulFrameInterval,
((double)*ulFrameInterval)/10000.0,
(10000000.0/((double)*ulFrameInterval))
@@ -5489,17 +5489,17 @@ VidFormatGUIDCodeToName ( if (IsEqualGUID(VidFormatGUIDCode, (REFGUID) &YUY2_Format))
{
return (PCHAR) &"YUY2";
- }
+ }
if (IsEqualGUID(VidFormatGUIDCode, (REFGUID) &NV12_Format))
{
return (PCHAR) &"NV12";
- }
+ }
#ifdef H264_SUPPORT
// GUID pH264 = H264_Format;
if (IsEqualGUID(VidFormatGUIDCode, (REFGUID) &H264_Format))
{
return (PCHAR) &"H.264";
- }
+ }
#endif
return FALSE;
diff --git a/tests/projects/windows/winsdk/usbview/enum.c b/tests/projects/windows/winsdk/usbview/enum.c index 314a08806..ed72d227a 100644 --- a/tests/projects/windows/winsdk/usbview/enum.c +++ b/tests/projects/windows/winsdk/usbview/enum.c @@ -1,5 +1,5 @@ /*++
-
+
Copyright (c) 1997-2011 Microsoft Corporation
Module Name:
@@ -42,8 +42,8 @@ Abstract: to a port, send the hub an IOCTL_USB_GET_NODE_CONNECTION_NAME request
to get the symbolic link name of the hub attached to the downstream
port. If there is a hub attached to the downstream port, recurse to
- step (2).
-
+ step (2).
+
GetAllStringDescriptors()
GetConfigDescriptor()
Create a node in the TreeView to represent each hub port
@@ -143,18 +143,18 @@ GetBOSDescriptor ( ULONG ConnectionIndex
);
-DWORD
+DWORD
GetHostControllerPowerMap(
- HANDLE hHCDev,
+ HANDLE hHCDev,
PUSBHOSTCONTROLLERINFO hcInfo);
-DWORD
+DWORD
GetHostControllerInfo(
- HANDLE hHCDev,
+ HANDLE hHCDev,
PUSBHOSTCONTROLLERINFO hcInfo);
-PCHAR WideStrToMultiStr (
- _In_reads_bytes_(cbWideStr) PWCHAR WideStr,
+PCHAR WideStrToMultiStr (
+ _In_reads_bytes_(cbWideStr) PWCHAR WideStr,
_In_ size_t cbWideStr
);
@@ -196,7 +196,7 @@ EnumerateAllDevices(); void
EnumerateAllDevicesWithGuid(
- PDEVICE_GUID_LIST DeviceList,
+ PDEVICE_GUID_LIST DeviceList,
LPGUID Guid
);
@@ -654,7 +654,7 @@ EnumerateHub ( ULONG nBytes = 0;
BOOL success = 0;
DWORD dwSizeOfLeafName = 0;
- CHAR leafName[512] = {0};
+ CHAR leafName[512] = {0};
HRESULT hr = S_OK;
size_t cchHeader = 0;
size_t cchFullHubName = 0;
@@ -850,11 +850,11 @@ EnumerateHub ( if (ConnectionInfo)
{
StringCchPrintf(leafName, dwSizeOfLeafName, "[Port%d] ", ConnectionInfo->ConnectionIndex);
- StringCchCat(leafName,
- dwSizeOfLeafName,
+ StringCchCat(leafName,
+ dwSizeOfLeafName,
ConnectionStatuses[ConnectionInfo->ConnectionStatus]);
- StringCchCatN(leafName,
- dwSizeOfLeafName,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName,
" : ",
sizeof(" : "));
}
@@ -865,8 +865,8 @@ EnumerateHub ( hr = StringCbLength(DevProps->DeviceDesc, MAX_DRIVER_KEY_NAME, &cbDeviceDesc);
if(SUCCEEDED(hr))
{
- StringCchCatN(leafName,
- dwSizeOfLeafName,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName,
DevProps->DeviceDesc,
cbDeviceDesc);
}
@@ -876,18 +876,18 @@ EnumerateHub ( if(ConnectionInfo != NULL)
{
// External hub
- StringCchCatN(leafName,
- dwSizeOfLeafName,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName,
HubName,
cbHubName);
}
else
{
// Root hub
- StringCchCatN(leafName,
- dwSizeOfLeafName,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName,
"RootHub",
- sizeof("RootHub"));
+ sizeof("RootHub"));
}
}
@@ -1062,7 +1062,7 @@ EnumerateHubPorts ( break;
}
- connectionInfoExV2 = (PUSB_NODE_CONNECTION_INFORMATION_EX_V2)
+ connectionInfoExV2 = (PUSB_NODE_CONNECTION_INFORMATION_EX_V2)
ALLOC(sizeof(USB_NODE_CONNECTION_INFORMATION_EX_V2));
if (connectionInfoExV2 == NULL)
@@ -1071,7 +1071,7 @@ EnumerateHubPorts ( FREE(connectionInfoEx);
break;
}
-
+
//
// Now query USBHUB for the structures
// for this port. This will tell us if a device is attached to this
@@ -1090,7 +1090,7 @@ EnumerateHubPorts ( &nBytes,
NULL);
- if (success && nBytes == sizeof(USB_PORT_CONNECTOR_PROPERTIES))
+ if (success && nBytes == sizeof(USB_PORT_CONNECTOR_PROPERTIES))
{
pPortConnectorProps = (PUSB_PORT_CONNECTOR_PROPERTIES)
ALLOC(portConnectorProps.ActualLength);
@@ -1098,7 +1098,7 @@ EnumerateHubPorts ( if (pPortConnectorProps != NULL)
{
pPortConnectorProps->ConnectionIndex = index;
-
+
success = DeviceIoControl(hHubDevice,
IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES,
pPortConnectorProps,
@@ -1115,7 +1115,7 @@ EnumerateHubPorts ( }
}
}
-
+
connectionInfoExV2->ConnectionIndex = index;
connectionInfoExV2->Length = sizeof(USB_NODE_CONNECTION_INFORMATION_EX_V2);
connectionInfoExV2->SupportedUsbProtocols.Usb300 = 1;
@@ -1129,7 +1129,7 @@ EnumerateHubPorts ( &nBytes,
NULL);
- if (!success || nBytes < sizeof(USB_NODE_CONNECTION_INFORMATION_EX_V2))
+ if (!success || nBytes < sizeof(USB_NODE_CONNECTION_INFORMATION_EX_V2))
{
FREE(connectionInfoExV2);
connectionInfoExV2 = NULL;
@@ -1154,17 +1154,17 @@ EnumerateHubPorts ( // of superspeed, we overwrite the value if the super speed
// data structures are available and indicate the device is operating
// at SuperSpeed.
- //
-
- if (connectionInfoEx->Speed == UsbHighSpeed
- && connectionInfoExV2 != NULL
+ //
+
+ if (connectionInfoEx->Speed == UsbHighSpeed
+ && connectionInfoExV2 != NULL
&& (connectionInfoExV2->Flags.DeviceIsOperatingAtSuperSpeedOrHigher ||
connectionInfoExV2->Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher))
{
connectionInfoEx->Speed = UsbSuperSpeed;
}
- }
- else
+ }
+ else
{
PUSB_NODE_CONNECTION_INFORMATION connectionInfo = NULL;
@@ -1177,7 +1177,7 @@ EnumerateHubPorts ( connectionInfo = (PUSB_NODE_CONNECTION_INFORMATION)ALLOC(nBytes);
- if (connectionInfo == NULL)
+ if (connectionInfo == NULL)
{
OOPS();
@@ -1190,7 +1190,7 @@ EnumerateHubPorts ( {
FREE(connectionInfoExV2);
}
- continue;
+ continue;
}
connectionInfo->ConnectionIndex = index;
@@ -1361,7 +1361,7 @@ EnumerateHubPorts ( FREE(bosDesc);
}
FREE(connectionInfoEx);
-
+
if (pPortConnectorProps != NULL)
{
FREE(pPortConnectorProps);
@@ -1386,8 +1386,8 @@ EnumerateHubPorts ( StringCchPrintf(leafName, sizeof(leafName), "[Port%d] ", index);
// Add error description if ConnectionStatus is other than NoDeviceConnected / DeviceConnected
- StringCchCat(leafName,
- sizeof(leafName),
+ StringCchCat(leafName,
+ sizeof(leafName),
ConnectionStatuses[connectionInfoEx->ConnectionStatus]);
if (DevProps)
@@ -1400,12 +1400,12 @@ EnumerateHubPorts ( OOPS();
}
dwSizeOfLeafName = sizeof(leafName);
- StringCchCatN(leafName,
- dwSizeOfLeafName - 1,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName - 1,
" : ",
sizeof(" : "));
- StringCchCatN(leafName,
- dwSizeOfLeafName - 1,
+ StringCchCatN(leafName,
+ dwSizeOfLeafName - 1,
DevProps->DeviceDesc,
cchDeviceDesc );
}
@@ -1453,8 +1453,8 @@ EnumerateHubPorts ( //
//*****************************************************************************
-PCHAR WideStrToMultiStr (
- _In_reads_bytes_(cbWideStr) PWCHAR WideStr,
+PCHAR WideStrToMultiStr (
+ _In_reads_bytes_(cbWideStr) PWCHAR WideStr,
_In_ size_t cbWideStr
)
{
@@ -1875,7 +1875,7 @@ PCHAR GetHCDDriverKeyName ( //
// Convert the driver key name
// Pass the length of the DriverKeyName string
- //
+ //
driverKeyNameA = WideStrToMultiStr(driverKeyNameW->DriverKeyName, nBytes - sizeof(USB_HCD_DRIVERKEY_NAME) + sizeof(WCHAR));
@@ -2508,7 +2508,7 @@ GetAllStringDescriptors ( // historically USBView made this query, so the query should be safe for
// video devices.
//
- for (uIndex = 1; SUCCEEDED(hr) && (uIndex < NUM_STRING_DESC_TO_GET); uIndex++)
+ for (uIndex = 1; SUCCEEDED(hr) && (uIndex < NUM_STRING_DESC_TO_GET); uIndex++)
{
hr = GetStringDescriptors(hHubDevice,
ConnectionIndex,
@@ -2521,7 +2521,7 @@ GetAllStringDescriptors ( return supportedLanguagesString;
}
-
+
//*****************************************************************************
@@ -2783,7 +2783,7 @@ CleanupItem ( //
// All structures except DEVICE_INFO_NODE are free'd up here. DEVICE_INFO_NODE structures are free'd while
// destroying device info lists (ClearDeviceList())
- //
+ //
switch (*(PUSBDEVICEINFOTYPE)info)
{
case HostControllerInfo:
@@ -2889,9 +2889,9 @@ CleanupItem ( FREE(ConnectionInfoEx);
}
- if (HubInfoEx)
+ if (HubInfoEx)
{
- FREE(HubInfoEx);
+ FREE(HubInfoEx);
}
if (PortConnectorProps)
@@ -2923,9 +2923,9 @@ CleanupItem ( //
//*****************************************************************************
-DWORD
+DWORD
GetHostControllerPowerMap(
- HANDLE hHCDev,
+ HANDLE hHCDev,
PUSBHOSTCONTROLLERINFO hcInfo)
{
USBUSER_POWER_INFO_REQUEST UsbPowerInfoRequest;
@@ -2936,7 +2936,7 @@ GetHostControllerPowerMap( int nIndex = 0;
int nPowerState = WdmUsbPowerSystemWorking;
- for ( ; nPowerState <= WdmUsbPowerSystemShutdown; nIndex++, nPowerState++)
+ for ( ; nPowerState <= WdmUsbPowerSystemShutdown; nIndex++, nPowerState++)
{
// zero initialize our request
memset(&UsbPowerInfoRequest, 0, sizeof(UsbPowerInfoRequest));
@@ -2977,10 +2977,10 @@ GetHostControllerPowerMap( void
EnumerateAllDevices()
{
- EnumerateAllDevicesWithGuid(&gDeviceList,
+ EnumerateAllDevicesWithGuid(&gDeviceList,
(LPGUID)&GUID_DEVINTERFACE_USB_DEVICE);
- EnumerateAllDevicesWithGuid(&gHubList,
+ EnumerateAllDevicesWithGuid(&gHubList,
(LPGUID)&GUID_DEVINTERFACE_USB_HUB);
}
@@ -3000,9 +3000,9 @@ EnumerateAllDevices() //
//*****************************************************************************
-DWORD
+DWORD
GetHostControllerInfo(
- HANDLE hHCDev,
+ HANDLE hHCDev,
PUSBHOSTCONTROLLERINFO hcInfo)
{
USBUSER_CONTROLLER_INFO_0 UsbControllerInfo;
@@ -3111,7 +3111,7 @@ GetDeviceProperty( void
EnumerateAllDevicesWithGuid(
- PDEVICE_GUID_LIST DeviceList,
+ PDEVICE_GUID_LIST DeviceList,
LPGUID Guid
)
{
@@ -3193,7 +3193,7 @@ EnumerateAllDevicesWithGuid( }
pNode->DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
-
+
success = SetupDiEnumDeviceInterfaces(DeviceList->DeviceInfo,
0,
Guid,
@@ -3205,23 +3205,23 @@ EnumerateAllDevicesWithGuid( OOPS();
break;
}
-
+
success = SetupDiGetDeviceInterfaceDetail(DeviceList->DeviceInfo,
&pNode->DeviceInterfaceData,
NULL,
0,
&requiredLength,
NULL);
-
+
error = GetLastError();
-
+
if (!success && error != ERROR_INSUFFICIENT_BUFFER)
{
FreeDeviceInfoNode(&pNode);
OOPS();
break;
}
-
+
pNode->DeviceDetailData = ALLOC(requiredLength);
if (pNode->DeviceDetailData == NULL)
@@ -3230,9 +3230,9 @@ EnumerateAllDevicesWithGuid( OOPS();
break;
}
-
+
pNode->DeviceDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
-
+
success = SetupDiGetDeviceInterfaceDetail(DeviceList->DeviceInfo,
&pNode->DeviceInterfaceData,
pNode->DeviceDetailData,
@@ -3244,8 +3244,8 @@ EnumerateAllDevicesWithGuid( FreeDeviceInfoNode(&pNode);
OOPS();
break;
- }
-
+ }
+
InsertTailList(&DeviceList->ListHead, &pNode->ListEntry);
}
}
@@ -3270,7 +3270,7 @@ AcquireDevicePowerState( pNode->LatestDevicePowerState = bResult ? cmPowerData.PD_MostRecentPowerState : PowerDeviceUnspecified;
- return pNode->LatestDevicePowerState;
+ return pNode->LatestDevicePowerState;
}
@@ -3360,7 +3360,7 @@ FindMatchingDeviceNodeForDriverName( pEntry = pEntry->Flink;
}
-
+
return NULL;
}
diff --git a/tests/projects/windows/winsdk/usbview/h264.c b/tests/projects/windows/winsdk/usbview/h264.c index 108a1d540..5e05df40f 100644 --- a/tests/projects/windows/winsdk/usbview/h264.c +++ b/tests/projects/windows/winsdk/usbview/h264.c @@ -8,7 +8,7 @@ #ifdef H264_SUPPORT
//*****************************************************************************
-// G L O B A L S
+// G L O B A L S
//*****************************************************************************
// H.264 format
UCHAR g_expectedNumberOfH264FrameDescriptors = 0;
@@ -24,10 +24,10 @@ UCHAR g_numberOfUncompressedFrameFrameDescriptors = 0; //*****************************************************************************
//
-// external function prototypes
+// external function prototypes
//
//*****************************************************************************
-extern VOID VDisplayBytes (PUCHAR Data, USHORT Len );
+extern VOID VDisplayBytes (PUCHAR Data, USHORT Len );
//*****************************************************************************
//
@@ -46,7 +46,7 @@ STRINGLIST slSliceModes[]= {0x80, "Reserved", ""},
};
-
+
STRINGLIST slSyncFrameTypes[]=
{
{1, "Reset" , ""},
@@ -203,7 +203,7 @@ char * commaPrintNumber( ULONG number ) char * pOutputString = &retbuf[ sizeof(retbuf)-1 ];
*pOutputString = '\0';
- do
+ do
{
// for every 3rd digit, add a comma to the output string
if ( ( digitCount%3 ) == 0 && ( digitCount != 0 ) )
@@ -213,7 +213,7 @@ char * commaPrintNumber( ULONG number ) *--pOutputString = '0' + number % 10;
number /= 10;
digitCount++;
- }
+ }
while( number != 0 );
return pOutputString;
@@ -226,10 +226,10 @@ char * commaPrintNumber( ULONG number ) // Note that USB is always oriented Little Endian (least significant byte
// at the lowest address).
//
-// Inputs:
-// PUCHAR pData - pointer to least significant byte of the data
+// Inputs:
+// PUCHAR pData - pointer to least significant byte of the data
// UCHAR byteCount - number of bytes to print in the pData data buffer
-// char * stringLabel - string label to print for user's to identify the data type
+// char * stringLabel - string label to print for user's to identify the data type
//
//*****************************************************************************
void DisplayBitmapData(_In_reads_(byteCount) PUCHAR pData, UCHAR byteCount, _In_ char * stringLabel)
@@ -271,10 +271,10 @@ void DisplayBitmapData(_In_reads_(byteCount) PUCHAR pData, UCHAR byteCount, _In // This calls GetSTringFromList() to insert a string that corresonds to
// the bit value being print.
//
-// Inputs:
-// PUCHAR pData - pointer to least significant byte of the data
+// Inputs:
+// PUCHAR pData - pointer to least significant byte of the data
// UCHAR byteCount - number of bytes to print in the pData data buffer
-// char * stringLabel - string label to print for user's to identify the data type
+// char * stringLabel - string label to print for user's to identify the data type
// STRINGLIST stringList - string table in which to look up bitmap strings
// ULONG numEntriesInTable - number of entrys (strings) in the table
//*****************************************************************************
@@ -305,9 +305,9 @@ void DisplayBitmapDataWithStrings( _In_reads_(byteCount) PUCHAR pData, UCHAR byt bitIndex + 8 * byteIndex, // increment bit count
checkBit ? 1 : 0,
checkBit ? "yes - " : " no - ",
- GetStringFromList(stringList,
+ GetStringFromList(stringList,
numEntriesInTable,
- stringMask,
+ stringMask,
"Reserved"));
byteMask = byteMask << 1;
@@ -345,42 +345,42 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 // handle bResolutionScaling
if ( H264FormatDesc->bResolutionScaling == 0 )
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Not Supported\r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Not Supported\r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
else if ( H264FormatDesc->bResolutionScaling == 1 )
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to 1.5 or 2.0 scaling in both directions, while maintaining the aspect ratio.\r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to 1.5 or 2.0 scaling in both directions, while maintaining the aspect ratio.\r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
else if ( H264FormatDesc->bResolutionScaling == 2 )
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to 1.0, 1.5 or 2.0 scaling in either direction.\r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to 1.0, 1.5 or 2.0 scaling in either direction.\r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
else if ( H264FormatDesc->bResolutionScaling == 3 )
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to resolutions reported by the associated Frame Descriptors\r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Limited to resolutions reported by the associated Frame Descriptors\r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
else if ( H264FormatDesc->bResolutionScaling == 4 )
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Arbitrary scaling\r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Arbitrary scaling\r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
else // 5 ... 255
{
- AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Reserved \r\n",
- H264FormatDesc->bResolutionScaling,
+ AppendTextBuffer("bResolutionScaling: 0x%02X = %d, Reserved \r\n",
+ H264FormatDesc->bResolutionScaling,
H264FormatDesc->bResolutionScaling );
}
-
- // handle bSimulcastSupport
+
+ // handle bSimulcastSupport
if ( H264FormatDesc->bSimulcastSupport == 0 )
{
AppendTextBuffer("bSimulcastSupport: 0x%02X = %d, one stream\r\n",
@@ -401,9 +401,9 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->bSimulcastSupport );
}
-
+
DisplayBitmapDataWithStrings( &(H264FormatDesc->bmSupportedRateControlModes), sizeof(H264FormatDesc->bmSupportedRateControlModes), "bmSupportedRateControlModes", slRateControlModes, sizeof(slRateControlModes)/sizeof(STRINGLIST) );
-
+
// Note that USB is Little Endian according to the UVC 2.0 spec
@@ -412,16 +412,16 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecOneResolutionNoScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecOneResolutionNoScalability) );
- AppendTextBuffer("wMaxMBperSecTwoResolutionsNoScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecTwoResolutionsNoScalability,
+ AppendTextBuffer("wMaxMBperSecTwoResolutionsNoScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecTwoResolutionsNoScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecTwoResolutionsNoScalability) );
AppendTextBuffer("wMaxMBperSecThreeResolutionsNoScalability: 0x%04X (%s MB/sec)\r\n",
H264FormatDesc->wMaxMBperSecThreeResolutionsNoScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecThreeResolutionsNoScalability) );
- AppendTextBuffer("wMaxMBperSecFourResolutionsNoScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecFourResolutionsNoScalability,
+ AppendTextBuffer("wMaxMBperSecFourResolutionsNoScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecFourResolutionsNoScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecFourResolutionsNoScalability) );
// Resolutions with temporal scalability
@@ -429,16 +429,16 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecOneResolutionTemporalScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecOneResolutionTemporalScalability) );
- AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalScalability,
+ AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalScalability) );
AppendTextBuffer("wMaxMBperSecThreeResolutionsTemporalScalability: 0x%04X (%s MB/sec)\r\n",
H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalScalability) );
- AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecFourResolutionsTemporalScalability,
+ AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecFourResolutionsTemporalScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecFourResolutionsTemporalScalability) );
// Resolutions with temporal and quality scalability
@@ -446,8 +446,8 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecOneResolutionTemporalQualityScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecOneResolutionTemporalQualityScalability) );
- AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalQualityScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalQualityScalability,
+ AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalQualityScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalQualityScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalQualityScalability) );
@@ -455,8 +455,8 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalQualityScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalQualityScalability) );
- AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalQualityScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecFourResolutionsTemporalQualityScalability,
+ AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalQualityScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecFourResolutionsTemporalQualityScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecFourResolutionsTemporalQualityScalability) );
// Resolutions with temporal and spatial scalability
@@ -464,8 +464,8 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecOneResolutionTemporalSpatialScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecOneResolutionTemporalSpatialScalability) );
- AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalSpatialScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalSpatialScalability,
+ AppendTextBuffer("wMaxMBperSecTwoResolutionsTemporalSpatialScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalSpatialScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecTwoResolutionsTemporalSpatialScalability) );
@@ -473,8 +473,8 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalSpatialScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecThreeResolutionsTemporalSpatialScalability) );
- AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalSpatialScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecFourResolutionsTemporalSpatialScalability,
+ AppendTextBuffer("wMaxMBperSecFourResolutionsTemporalSpatialScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecFourResolutionsTemporalSpatialScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecFourResolutionsTemporalSpatialScalability) );
// Resolutions with full scalability
@@ -482,16 +482,16 @@ BOOL DisplayVCH264Format( _In_reads_(sizeof(VIDEO_FORMAT_H264)) PVIDEO_FORMAT_H2 H264FormatDesc->wMaxMBperSecOneResolutionFullScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecOneResolutionFullScalability) );
- AppendTextBuffer("wMaxMBperSecTwoResolutionsFullScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecTwoResolutionsFullScalability,
+ AppendTextBuffer("wMaxMBperSecTwoResolutionsFullScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecTwoResolutionsFullScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecTwoResolutionsFullScalability) );
AppendTextBuffer("wMaxMBperSecThreeResolutionsFullScalability: 0x%04X (%s MB/sec)\r\n",
H264FormatDesc->wMaxMBperSecThreeResolutionsFullScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecThreeResolutionsFullScalability) );
- AppendTextBuffer("wMaxMBperSecFourResolutionsFullScalability: 0x%04X (%s MB/sec)\r\n",
- H264FormatDesc->wMaxMBperSecFourResolutionsFullScalability,
+ AppendTextBuffer("wMaxMBperSecFourResolutionsFullScalability: 0x%04X (%s MB/sec)\r\n",
+ H264FormatDesc->wMaxMBperSecFourResolutionsFullScalability,
commaPrintNumber(1000*H264FormatDesc->wMaxMBperSecFourResolutionsFullScalability) );
@@ -520,31 +520,31 @@ BOOL DisplayVCH264FrameType( _In_reads_(sizeof(VIDEO_FRAME_H264)) PVIDEO_FRAME_H AppendTextBuffer("wSARwidth: 0x%04X = %d\r\n", H264FrameDesc->wSARwidth, H264FrameDesc->wSARwidth);
AppendTextBuffer("wSARheight: 0x%04X = %d\r\n", H264FrameDesc->wSARheight, H264FrameDesc->wSARheight);
AppendTextBuffer("wProfile: 0x%04X - %s\r\n", H264FrameDesc->wProfile,
- GetStringFromList( slProfiles, // string table
+ GetStringFromList( slProfiles, // string table
sizeof(slProfiles)/sizeof(STRINGLIST), // number of strings in the table
H264FrameDesc->wProfile, // index of string we want to look up in the string table
"Unknown profile" ) ); // string to use if the lookup fails
-
- AppendTextBuffer("bLevelIDC: 0x%02X = %d = Level %01.01lf \r\n",
+
+ AppendTextBuffer("bLevelIDC: 0x%02X = %d = Level %01.01lf \r\n",
H264FrameDesc->bLevelIDC, H264FrameDesc->bLevelIDC, H264FrameDesc->bLevelIDC/10.0 );
-
+
AppendTextBuffer("wConstrainedToolset: 0x%04X %s\r\n", H264FrameDesc->wConstrainedToolset,
((H264FrameDesc->wConstrainedToolset == 0) ? "- Reserved" : "*!*ERROR: field is reserved and should be zero"));
DisplayBitmapDataWithStrings( H264FrameDesc->bmSupportedUsages, sizeof(H264FrameDesc->bmSupportedUsages), "bmSupportedUsages", slUsage, sizeof(slUsage)/sizeof(STRINGLIST) );
DisplayBitmapDataWithStrings( H264FrameDesc->bmCapabilities, sizeof(H264FrameDesc->bmCapabilities), "bmCapabilities", slCapabilities, sizeof(slCapabilities)/sizeof(STRINGLIST) );
-
- // bmSVCCapabilities[4]
+
+ // bmSVCCapabilities[4]
AppendTextBuffer("%s : ", "bmSVCCapabilities");
VDisplayBytes( &(H264FrameDesc->bmSVCCapabilities[0]), sizeof(H264FrameDesc->bmSVCCapabilities) );
- AppendTextBuffer(" D2..D0 = %d Maximum number of temporal layers = %d\r\n",
- H264FrameDesc->bmSVCCapabilities[0] & 0x7,
+ AppendTextBuffer(" D2..D0 = %d Maximum number of temporal layers = %d\r\n",
+ H264FrameDesc->bmSVCCapabilities[0] & 0x7,
(H264FrameDesc->bmSVCCapabilities[0] & 0x7) + 1 );
AppendTextBuffer(" D3 = %d %s - Rewrite Support\r\n", (H264FrameDesc->bmSVCCapabilities[0] & 0x8) >> 3,
((H264FrameDesc->bmSVCCapabilities[0] & 0x8) >> 3) ? "yes" : " no" );
- AppendTextBuffer(" D6..D4 = %d Maximum number of CGS layers = %d\r\n",
- (H264FrameDesc->bmSVCCapabilities[0] & 0x70) >> 4,
+ AppendTextBuffer(" D6..D4 = %d Maximum number of CGS layers = %d\r\n",
+ (H264FrameDesc->bmSVCCapabilities[0] & 0x70) >> 4,
((H264FrameDesc->bmSVCCapabilities[0] & 0x70) >> 4) + 1 );
value = ( H264FrameDesc->bmSVCCapabilities[1] << 8 ) | H264FrameDesc->bmSVCCapabilities[0];
@@ -555,14 +555,14 @@ BOOL DisplayVCH264FrameType( _In_reads_(sizeof(VIDEO_FRAME_H264)) PVIDEO_FRAME_H AppendTextBuffer(" D10 = %d %s - Additional SNR scalability support in spatial enhancement layers\r\n",
(H264FrameDesc->bmSVCCapabilities[1] & 0x4) >> 2,
((H264FrameDesc->bmSVCCapabilities[1] & 0x4) >> 2) ? "yes" : " no");
- AppendTextBuffer(" D13..D11 = %d Maximum number of spatial layers = %d\r\n",
- (H264FrameDesc->bmSVCCapabilities[1] & 0x38) >> 3,
+ AppendTextBuffer(" D13..D11 = %d Maximum number of spatial layers = %d\r\n",
+ (H264FrameDesc->bmSVCCapabilities[1] & 0x38) >> 3,
((H264FrameDesc->bmSVCCapabilities[1] & 0x38) >> 3) + 1 );
value = ( H264FrameDesc->bmSVCCapabilities[3] << 16 ) | ( H264FrameDesc->bmSVCCapabilities[2] << 8 ) | H264FrameDesc->bmSVCCapabilities[1];
value >>= 6; // get bit 14 at LSB
for ( i = 0; i < 18; i++ ) // bits 31...14
- {
+ {
AppendTextBuffer(" D%02d = %d %s - Reserved \r\n", 14 + i, value & 0x1, (value & 0x1) ? "yes" : " no" );
value >>= 1;
}
@@ -570,20 +570,20 @@ BOOL DisplayVCH264FrameType( _In_reads_(sizeof(VIDEO_FRAME_H264)) PVIDEO_FRAME_H // bmMVCCapabilities[4]
AppendTextBuffer("%s : ", "bmMVCCapabilities");
VDisplayBytes( &(H264FrameDesc->bmMVCCapabilities[0]), sizeof(H264FrameDesc->bmMVCCapabilities) );
- AppendTextBuffer(" D2..D0 = %d Maximum number of temporal layers = %d\r\n",
- H264FrameDesc->bmMVCCapabilities[0] & 0x7,
+ AppendTextBuffer(" D2..D0 = %d Maximum number of temporal layers = %d\r\n",
+ H264FrameDesc->bmMVCCapabilities[0] & 0x7,
((H264FrameDesc->bmMVCCapabilities[0] & 0x7) + 1) );
value = (H264FrameDesc->bmMVCCapabilities[1] << 8) | H264FrameDesc->bmMVCCapabilities[0];
value >>= 3; // shift bit 3 right so that it ends up in the lsb of value
value &= 0xff;
- AppendTextBuffer(" D10..D3 = %d Maximum number of view components = %d\r\n",
+ AppendTextBuffer(" D10..D3 = %d Maximum number of view components = %d\r\n",
value, value + 1);
value = ( (H264FrameDesc->bmMVCCapabilities[3] << 16) | (H264FrameDesc->bmMVCCapabilities[2] << 8) | H264FrameDesc->bmMVCCapabilities[1] );
value >>= 3; // shift bit 11 right so that it ends up in the lsb of value
for ( i = 0; i < 21; i++ ) // bits 31...11
- {
+ {
AppendTextBuffer(" D%02d = %d %s - Reserved \r\n", 11 + i, value & 0x1, (value & 0x1) ? "yes" : " no" );
value >>= 1;
}
@@ -601,10 +601,10 @@ BOOL DisplayVCH264FrameType( _In_reads_(sizeof(VIDEO_FRAME_H264)) PVIDEO_FRAME_H AppendTextBuffer("bNumFrameIntervals: 0x%02X = %d\r\n", H264FrameDesc->bNumFrameIntervals, H264FrameDesc->bNumFrameIntervals);
- // frame interval 100 ns units.
-
+ // frame interval 100 ns units.
+
//To convert the frame interval to seconds we would divide by 10,000,000.
- // 100 ns = 10^(-7) seconds = 1/10,000,000
+ // 100 ns = 10^(-7) seconds = 1/10,000,000
// To convert the frame interval to Hz, we divide by 10,000,000 and then take the inverse
diff --git a/tests/projects/windows/winsdk/usbview/h264.h b/tests/projects/windows/winsdk/usbview/h264.h index 841318922..8d0698c47 100644 --- a/tests/projects/windows/winsdk/usbview/h264.h +++ b/tests/projects/windows/winsdk/usbview/h264.h @@ -4,7 +4,7 @@ //*****************************************************************************
//
-// external variables
+// external variables
//
//*****************************************************************************
extern UCHAR g_expectedNumberOfH264FrameDescriptors;
@@ -34,8 +34,8 @@ extern UCHAR g_numberOfUncompressedFrameFrameDescriptors; // definitions take from the proposed UVC 1.5 spec
-#define VS_FORMAT_H264 0x13
-#define VS_FRAME_H264 0x14
+#define VS_FORMAT_H264 0x13
+#define VS_FRAME_H264 0x14
// Video Class-Specific VC Interface Descriptor Subtypes
@@ -52,7 +52,7 @@ extern UCHAR g_numberOfUncompressedFrameFrameDescriptors; // VideoStreaming H.264 Format Descriptor
#pragma pack(push, 1) // pack on a 1 byte boundary
typedef struct _VIDEO_FORMAT_H264
-{ // offset (in bytes):
+{ // offset (in bytes):
UCHAR bLength; // 0
UCHAR bDescriptorType; // 1
UCHAR bDescriptorSubtype; // 2
@@ -102,7 +102,7 @@ typedef struct _VIDEO_FORMAT_H264 #pragma warning(disable:4200) // Zero sized array
typedef struct _VIDEO_FRAME_H264
-{ // offset (in bytes):
+{ // offset (in bytes):
UCHAR bLength; // 0
UCHAR bDescriptorType; // 1
UCHAR bDescriptorSubtype; // 2
@@ -133,7 +133,7 @@ typedef struct _VIDEO_FRAME_H264 #pragma warning(push)
#pragma warning(disable:4200) // Zero sized array
typedef struct //_VIDEO_ENCODING_UNIT
-{ // offset (in bytes):
+{ // offset (in bytes):
UCHAR bLength; // 0
UCHAR bDescriptorType; // 1
UCHAR bDescriptorSubtype; // 2
diff --git a/tests/projects/windows/winsdk/usbview/uvcdesc.h b/tests/projects/windows/winsdk/usbview/uvcdesc.h index f343fa731..0475f3162 100644 --- a/tests/projects/windows/winsdk/usbview/uvcdesc.h +++ b/tests/projects/windows/winsdk/usbview/uvcdesc.h @@ -15,7 +15,7 @@ // USB Video Device Class Code
-#define USB_DEVICE_CLASS_VIDEO 0x0E
+#define USB_DEVICE_CLASS_VIDEO 0x0E
// Video sub-classes
#define SUBCLASS_UNDEFINED 0x00
@@ -36,7 +36,7 @@ #define OUTPUT_TERMINAL 0x03
#define SELECTOR_UNIT 0x04
#define PROCESSING_UNIT 0x05
-#define EXTENSION_UNIT 0x06
+#define EXTENSION_UNIT 0x06
#define MAX_TYPE_UNIT 0x07
// Video Class-Specific VS Interface Descriptor Subtypes
@@ -262,7 +262,7 @@ #define SCR_LENGTH 6 // Length of SCR field in bytes
// USB Video Status Codes (Request Error Code Control)
-#define USBVIDEO_RE_STATUS_NOERROR 0x00
+#define USBVIDEO_RE_STATUS_NOERROR 0x00
#define USBVIDEO_RE_STATUS_NOT_READY 0x01
#define USBVIDEO_RE_STATUS_WRONG_STATE 0x02
#define USBVIDEO_RE_STATUS_POWER 0x03
@@ -447,7 +447,7 @@ typedef struct { UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Sensor type
UCHAR bAssocTerminal; // ID of associated output terminal
- UCHAR iTerminal; // Index of string descriptor
+ UCHAR iTerminal; // Index of string descriptor
USHORT wObjectiveFocalLengthMin; // Min focal length for zoom
USHORT wObjectiveFocalLengthMax; // Max focal length for zoom
USHORT wOcularFocalLength; // Ocular focal length for zoom
@@ -467,7 +467,7 @@ typedef struct { UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Media Transport type
UCHAR bAssocTerminal; // ID of associated output terminal
- UCHAR iTerminal; // Index of string descriptor
+ UCHAR iTerminal; // Index of string descriptor
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_INPUT_MTT, *PVIDEO_INPUT_MTT;
@@ -478,7 +478,7 @@ __inline size_t SizeOfVideoInputMTT(_In_ PVIDEO_INPUT_MTT pDesc) UCHAR bTransportModeSize;
PUCHAR pbCurr;
- pbCurr = pDesc->bmControls + pDesc->bControlSize;
+ pbCurr = pDesc->bmControls + pDesc->bControlSize;
bTransportModeSize = *pbCurr;
return sizeof(VIDEO_INPUT_MTT) + pDesc->bControlSize + 1 + bTransportModeSize;
@@ -495,8 +495,8 @@ typedef struct { UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Media Transport type
UCHAR bAssocTerminal; // ID of associated output terminal
- UCHAR bSourceID; // ID of source unit/terminal
- UCHAR iTerminal; // Index of string descriptor
+ UCHAR bSourceID; // ID of source unit/terminal
+ UCHAR iTerminal; // Index of string descriptor
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_OUTPUT_MTT, *PVIDEO_OUTPUT_MTT;
@@ -507,7 +507,7 @@ __inline size_t SizeOfVideoOutputMTT(_In_ PVIDEO_OUTPUT_MTT pDesc) UCHAR bTransportModeSize;
PUCHAR pbCurr;
- pbCurr = pDesc->bmControls + pDesc->bControlSize;
+ pbCurr = pDesc->bmControls + pDesc->bControlSize;
bTransportModeSize = *pbCurr;
return sizeof(VIDEO_OUTPUT_MTT) + pDesc->bControlSize + 1+ bTransportModeSize;
@@ -544,7 +544,7 @@ typedef struct { #define SIZEOF_VIDEO_PROCESSING_UNIT(pDesc) \
(sizeof(VIDEO_PROCESSING_UNIT) + 1 + (pDesc)->bControlSize)
-
+
// VideoControl Extension Unit Descriptor
typedef struct {
@@ -565,7 +565,7 @@ __inline size_t SizeOfVideoExtensionUnit(PVIDEO_EXTENSION_UNIT pDesc) PUCHAR pbCurr;
// baSourceID is an array, and hence understood to be an address
- pbCurr = pDesc->baSourceID + pDesc->bNrInPins;
+ pbCurr = pDesc->baSourceID + pDesc->bNrInPins;
if (((ULONG_PTR) pbCurr < (ULONG_PTR) pDesc->baSourceID) ||
(ULONG_PTR) pbCurr >= (ULONG_PTR)((UCHAR *) pDesc + pDesc->bLength))
return 0;
@@ -575,7 +575,7 @@ __inline size_t SizeOfVideoExtensionUnit(PVIDEO_EXTENSION_UNIT pDesc) }
#define SIZEOF_VIDEO_EXTENSION_UNIT(pDesc) SizeOfVideoExtensionUnit(pDesc)
-
+
// Class-specific Interrupt Endpoint Descriptor
typedef struct {
@@ -595,14 +595,14 @@ typedef struct _VIDEO_STREAMING_INPUT_HEADER UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // VS_INPUT_HEADER descriptor subtype
UCHAR bNumFormats;
- USHORT wTotalLength;
+ USHORT wTotalLength;
UCHAR bEndpointAddress;
UCHAR bmInfo;
UCHAR bTerminalLink;
UCHAR bStillCaptureMethod;
UCHAR bTriggerSupport;
UCHAR bTriggerUsage;
- UCHAR bControlSize;
+ UCHAR bControlSize;
UCHAR bmaControls[];
} VIDEO_STREAMING_INPUT_HEADER, *PVIDEO_STREAMING_INPUT_HEADER;
@@ -617,7 +617,7 @@ typedef struct _VIDEO_STREAMING_OUTPUT_HEADER UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bNumFormats;
- USHORT wTotalLength;
+ USHORT wTotalLength;
UCHAR bEndpointAddress;
UCHAR bTerminalLink;
} VIDEO_STREAMING_OUTPUT_HEADER, *PVIDEO_STREAMING_OUTPUT_HEADER;
@@ -638,7 +638,7 @@ typedef struct _VIDEO_STILL_IMAGE_FRAME UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bEndpointAddress;
- UCHAR bNumImageSizePatterns;
+ UCHAR bNumImageSizePatterns;
VIDEO_STILL_IMAGE_RECT aStillRect[];
} VIDEO_STILL_IMAGE_FRAME, *PVIDEO_STILL_IMAGE_FRAME;
@@ -650,9 +650,9 @@ __inline size_t SizeOfVideoStillImageFrame(PVIDEO_STILL_IMAGE_FRAME pDesc) pbCurr = (PUCHAR) pDesc->aStillRect + (sizeof(VIDEO_STILL_IMAGE_RECT) * pDesc->bNumImageSizePatterns);
bNumCompressionPatterns = *pbCurr;
- return (sizeof(VIDEO_STILL_IMAGE_FRAME) +
+ return (sizeof(VIDEO_STILL_IMAGE_FRAME) +
(sizeof(VIDEO_STILL_IMAGE_RECT) * pDesc->bNumImageSizePatterns) +
- 1 + bNumCompressionPatterns);
+ 1 + bNumCompressionPatterns);
}
#define SIZEOF_VIDEO_STILL_IMAGE_FRAME(pDesc) SizeOfVideoStillImageFrame(pDesc)
@@ -763,7 +763,7 @@ typedef struct _VIDEO_FRAME_MJPEG __inline size_t SizeOfVideoFrameMjpeg(_In_ PVIDEO_FRAME_MJPEG pDesc)
-{
+{
if (pDesc->bFrameIntervalType == 0) { // Continuous
return sizeof(VIDEO_FRAME_MJPEG) + (3 * sizeof(ULONG));
}
@@ -813,7 +813,7 @@ typedef struct _VIDEO_FRAME_VENDOR } VIDEO_FRAME_VENDOR, *PVIDEO_FRAME_VENDOR;
__inline size_t SizeOfVideoFrameVendor(_In_ PVIDEO_FRAME_VENDOR pDesc)
-{
+{
if (pDesc->bFrameIntervalType == 0) { // Continuous
return sizeof(VIDEO_FRAME_VENDOR) + (3 * sizeof(ULONG));
}
@@ -833,7 +833,7 @@ typedef struct _VIDEO_FORMAT_DV UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
ULONG dwMaxVideoFrameBufferSize;
- UCHAR bFormatType;
+ UCHAR bFormatType;
} VIDEO_FORMAT_DV, *PVIDEO_FORMAT_DV;
#define SIZEOF_VIDEO_FORMAT_DV(pDesc) sizeof(VIDEO_FORMAT_DV)
@@ -848,7 +848,7 @@ typedef struct _VIDEO_FORMAT_MPEG2TS UCHAR bFormatIndex;
UCHAR bDataOffset;
UCHAR bPacketLength;
- UCHAR bStrideLength;
+ UCHAR bStrideLength;
} VIDEO_FORMAT_MPEG2TS, *PVIDEO_FORMAT_MPEG2TS;
#define SIZEOF_VIDEO_FORMAT_MPEG2TS(pDesc) sizeof(VIDEO_FORMAT_MPEG2TS)
@@ -863,7 +863,7 @@ typedef struct _VIDEO_FORMAT_MPEG1SS UCHAR bFormatIndex;
UCHAR bPacketLength;
UCHAR bPackLength;
- UCHAR bPackDataType;
+ UCHAR bPackDataType;
} VIDEO_FORMAT_MPEG1SS, *PVIDEO_FORMAT_MPEG1SS;
#define SIZEOF_VIDEO_FORMAT_MPEG1SS(pDesc) sizeof(VIDEO_FORMAT_MPEG1SS)
@@ -1096,7 +1096,7 @@ typedef struct _VS_PROBE_COMMIT_CONTROL2 } VS_PROBE_COMMIT_CONTROL2, *PVS_PROBE_COMMIT_CONTROL2;
#pragma pack( pop, vdc_descriptor_structs )
-#pragma warning( default : 4200 )
+#pragma warning( default : 4200 )
//
diff --git a/tests/projects/windows/winsdk/usbview/uvcview.h b/tests/projects/windows/winsdk/usbview/uvcview.h index d5c3f5786..979786ccb 100644 --- a/tests/projects/windows/winsdk/usbview/uvcview.h +++ b/tests/projects/windows/winsdk/usbview/uvcview.h @@ -393,7 +393,7 @@ DEFINE_GUID(NV12_Format,0x3231564EL,0x0000,0x0010,0x80,0x00,0x00,0xAA,0x00,0x38, DEFINE_GUID(H264_Format,0x34363248, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
#endif
-// The following flags/variables are all initialized in Display.c InitializePerDeviceSettings()
+// The following flags/variables are all initialized in Display.c InitializePerDeviceSettings()
//
// Save the default frame from the MJPEG, Uncompressed, Vendor and Frame Based Format descriptor
// Check for this when processing the individual Frame descriptors
@@ -422,7 +422,7 @@ DWORD dwConfigIndex; int gDeviceSpeed;
// Save the current Configuration starting and ending addresses
-// Used in ValidateDescAddress()
+// Used in ValidateDescAddress()
//
PUSB_CONFIGURATION_DESCRIPTOR g_pConfigDesc;
PSTRING_DESCRIPTOR_NODE g_pStringDescs;
@@ -462,13 +462,13 @@ EXTERN_C PCHAR GetLangIDString(USHORT idLang); EXTERN_C UINT GetConfigurationSize (PUSBDEVICEINFO info);
EXTERN_C PUSB_COMMON_DESCRIPTOR
GetNextDescriptor(
- _In_reads_bytes_(TotalLength)
+ _In_reads_bytes_(TotalLength)
PUSB_COMMON_DESCRIPTOR FirstDescriptor,
_In_
ULONG TotalLength,
- _In_
+ _In_
PUSB_COMMON_DESCRIPTOR StartDescriptor,
- _In_ long
+ _In_ long
DescriptorType
);
@@ -547,7 +547,7 @@ EXTERN_C PCHAR GetControllerFlavorString( );
EXTERN_C ULONG GetEhciDebugPort(
- ULONG vendorId,
+ ULONG vendorId,
ULONG deviceId
);
@@ -636,7 +636,7 @@ MyCheckForLeaks ( PUSB_DEVICE_PNP_STRINGS
DriverNameToDeviceProperties(
- _In_reads_bytes_(cbDriverName) PCHAR DriverName,
+ _In_reads_bytes_(cbDriverName) PCHAR DriverName,
_In_ size_t cbDriverName
);
diff --git a/tests/projects/windows/winsdk/usbview/uvcview.rc b/tests/projects/windows/winsdk/usbview/uvcview.rc index 6c7642ce3..7d05aae68 100644 --- a/tests/projects/windows/winsdk/usbview/uvcview.rc +++ b/tests/projects/windows/winsdk/usbview/uvcview.rc @@ -121,12 +121,12 @@ END // String Table
//
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_STRINGBASE "Base string"
END
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_STANDARD_FONT "Courier"
IDS_STANDARD_FONT_HEIGHT "\13"
@@ -148,5 +148,5 @@ BEGIN IDS_USBVIEW_INTERNAL_ERROR "An internal error occured, please report this as a bug\n"
IDS_USBVIEW_SAVED_TO "Usbview information saved to file : [%1]\n"
IDS_USBVIEW_INVALID_FILENAME "The argument : [%1] is invalid or incomplete.\n"
-END
+END
diff --git a/tests/projects/windows/winsdk/windemo/targetver.h b/tests/projects/windows/winsdk/windemo/targetver.h index f583181df..ad0098322 100644 --- a/tests/projects/windows/winsdk/windemo/targetver.h +++ b/tests/projects/windows/winsdk/windemo/targetver.h @@ -1,8 +1,8 @@ #pragma once
// The following macros define the minimum required platform. The minimum required platform
-// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
-// your application. The macros work by enabling all features available on platform versions up to and
+// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
+// your application. The macros work by enabling all features available on platform versions up to and
// including the version specified.
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
