156 sizeof(PinWaveCyclicConnectionSet) /
sizeof(KSPROPERTY_ITEM),
157 (
const KSPROPERTY_ITEM*)&PinWaveCyclicConnectionSet,
163 sizeof(PinWaveCyclicAudioSet) /
sizeof(KSPROPERTY_ITEM),
164 (
const KSPROPERTY_ITEM*)&PinWaveCyclicAudioSet,
170 sizeof(PinWaveCyclicDRMSet) /
sizeof(KSPROPERTY_ITEM),
171 (
const KSPROPERTY_ITEM*)&PinWaveCyclicDRMSet,
199 DPRINT(
"IServiceSink_fnQueryInterface entered\n");
226 DPRINT1(
"PinWaveCyclicDRMHandler\n");
376 DPRINT(
"Play %lu Record %lu\n",
Pin->m_Position.PlayOffset,
Pin->m_Position.WriteOffset);
485 Pin->m_Stream->Silence(
Pin->m_CommonBuffer,
Pin->m_CommonBufferSize);
486 Pin->m_IrpQueue->CancelBuffers();
487 Pin->m_Position.PlayOffset = 0;
488 Pin->m_Position.WriteOffset = 0;
492 Pin->m_Stream->Silence(
Pin->m_CommonBuffer,
Pin->m_CommonBufferSize);
493 Pin->m_IrpQueue->CancelBuffers();
494 Pin->m_Position.PlayOffset = 0;
495 Pin->m_Position.WriteOffset = 0;
575 Status =
Pin->m_Stream->SetFormat(NewDataFormat);
582 Pin->m_Format = NewDataFormat;
614 Irp->IoStatus.Information =
Pin->m_Format->FormatSize;
620 Irp->IoStatus.Information =
Pin->m_Format->FormatSize;
655 if (NewOffset > OldOffset)
661 DPRINT(
"Generating event at OldOffset %I64u\n", OldOffset);
663 DPRINT(
"NewOffset %I64u\n", NewOffset);
674 DPRINT(
"Generating event at OldOffset %I64u\n", OldOffset);
676 DPRINT(
"NewOffset %I64u\n", NewOffset);
694 ULONG MaxTransferCount)
754 ULONG MaxTransferCount)
816 MaxTransferCount -=
Length;
818 if (MaxTransferCount)
827CPortPinWaveCyclic::RequestService()
857CPortPinWaveCyclic::NewIrpTarget(
858 OUT struct IIrpTarget **OutTarget,
864 IN KSOBJECT_CREATE *CreateObject)
872CPortPinWaveCyclic::DeviceIoControl(
975CPortPinWaveCyclic::Read(
984CPortPinWaveCyclic::Write(
993CPortPinWaveCyclic::Flush(
1002CPortPinWaveCyclic::Close(
1006 DPRINT(
"CPortPinWaveCyclic::Close entered\n");
1048 DPRINT(
"Warning: failed to stop stream with %x\n",
Status);
1085 Irp->IoStatus.Information = 0;
1096CPortPinWaveCyclic::QuerySecurity(
1105CPortPinWaveCyclic::SetSecurity(
1114CPortPinWaveCyclic::FastDeviceIoControl(
1130CPortPinWaveCyclic::FastRead(
1145CPortPinWaveCyclic::FastWrite(
1160CPortPinWaveCyclic::Init(
1164 IN KSPIN_DESCRIPTOR * KsPinDescriptor)
1181 DPRINT(
"CPortPinWaveCyclic::Init entered Size %u\n",
DataFormat->FormatSize);
1197 DPRINT(
"Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
1205 ConnectDetails->PinId,
1215 DPRINT(
"Got IID_IDrmAudioStream interface %p\n", DrmAudio);
1226 DPRINT1(
"CPortPinWaveCyclic::Init Status %x PinId %u Capture %u\n",
Status, ConnectDetails->PinId,
Capture);
1231 ISubdevice * Subdevice =
NULL;
1238 Status = Subdevice->GetDescriptor(&SubDeviceDescriptor);
1281 DPRINT(
"Failed to add pin to service group\n");
1338CPortPinWaveCyclic::GetCompletedPosition()
1346CPortPinWaveCyclic::GetCycleCount()
1354CPortPinWaveCyclic::GetDeviceBufferSize()
1361CPortPinWaveCyclic::GetIrpStream()
1368CPortPinWaveCyclic::GetMiniport()
1375 OUT IPortPinWaveCyclic ** OutPin)
1386 *OutPin = (IPortPinWaveCyclic*)
This;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
IPortFilterWaveCyclic * PPORTFILTERWAVECYCLIC
struct SUBDEVICE_DESCRIPTOR * PSUBDEVICE_DESCRIPTOR
IPortPinWaveCyclic * PPORTPINWAVECYCLIC
_In_ PFCB _In_ LONGLONG FileOffset
friend NTSTATUS NTAPI PinWaveCyclicAudioPosition(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
VOID GeneratePositionEvents(IN ULONGLONG OldOffset, IN ULONGLONG NewOffset)
KSPIN_LOCK m_EventListLock
PMINIPORTWAVECYCLICSTREAM m_Stream
ULONG m_CommonBufferOffset
friend NTSTATUS NTAPI PinWaveCyclicAddLoopedStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry)
PSUBDEVICE_DESCRIPTOR m_Descriptor
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
PSERVICEGROUP m_ServiceGroup
friend NTSTATUS NTAPI PinWaveCyclicState(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
friend NTSTATUS NTAPI PinWaveCyclicAddEndOfStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry)
friend VOID CALLBACK PinSetStateWorkerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
virtual ~CPortPinWaveCyclic()
VOID UpdateCommonBuffer(ULONG Position, ULONG MaxTransferCount)
PKSPIN_CONNECT m_ConnectDetails
VOID UpdateCommonBufferOverlap(ULONG Position, ULONG MaxTransferCount)
PMINIPORTWAVECYCLIC m_Miniport
KSPIN_DESCRIPTOR * m_KsPinDescriptor
KSAUDIO_POSITION m_Position
KSALLOCATOR_FRAMING m_AllocatorFraming
IPortFilterWaveCyclic * m_Filter
CPortPinWaveCyclic(IUnknown *OuterUnknown)
friend NTSTATUS NTAPI PinWaveCyclicAllocatorFraming(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
friend NTSTATUS NTAPI PinWaveCyclicDataFormat(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
KSDATAFORMAT * PKSDATAFORMAT
#define NT_SUCCESS(StatCode)
KSDDKAPI NTSTATUS NTAPI KsAcquireResetValue(IN PIRP Irp, OUT KSRESET *ResetValue)
KSDDKAPI NTSTATUS NTAPI KsGenerateEvent(IN PKSEVENT_ENTRY EntryEvent)
KSDDKAPI NTSTATUS NTAPI KsDispatchInvalidDeviceRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastReadFailure(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
KSDDKAPI NTSTATUS NTAPI KsDefaultDeviceIoCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastIoDeviceControlFailure(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength, IN ULONG IoControlCode, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
#define DEFINE_KSPROPERTY_CONNECTIONSET(PinSet, PropStateHandler, PropDataFormatHandler, PropAllocatorFraming)
_Out_ PDRMRIGHTS DrmRights
#define KSPROPERTY_TYPE_SET
struct KSIDENTIFIER * PKSPROPERTY
#define KSPROPERTY_TYPE_GET
#define ExAllocatePoolWithTag(hernya, size, tag)
#define RtlCompareMemory(s1, s2, l)
#define KeGetCurrentIrql()
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
NTSYSAPI void WINAPI DbgBreakPoint(void)
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
NTSTATUS NTAPI NewIrpQueue(IN IIrpQueue **Queue)
#define IOCTL_KS_RESET_STATE
#define IOCTL_KS_PROPERTY
#define KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY
#define KSPROPSETID_Connection
@ KSPIN_COMMUNICATION_SINK
@ KSEVENT_CONNECTION_ENDOFSTREAM
struct _KSEVENT_ENTRY * PKSEVENT_ENTRY
#define KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY
struct _KSEVENT_ENTRY KSEVENT_ENTRY
#define IOCTL_KS_READ_STREAM
@ KSINTERFACE_STANDARD_STREAMING
@ KSINTERFACE_STANDARD_LOOPED_STREAMING
#define IOCTL_KS_ENABLE_EVENT
#define IOCTL_KS_WRITE_STREAM
#define IOCTL_KS_DISABLE_EVENT
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
VOID FreeItem(IN PVOID Item)
_In_ UINT _In_ UINT BytesToCopy
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define FILE_64_BYTE_ALIGNMENT
#define Int32x32To64(a, b)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IoCompleteRequest
#define STATUS_NOT_SUPPORTED
NTSTATUS NTAPI PinWaveCyclicAudioPosition(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
KSEVENT_ITEM PinWaveCyclicStreamingEventSet
KSPROPERTY_SET PinWaveCyclicPropertySet[]
NTSTATUS NTAPI PinWaveCyclicAddLoopedStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry)
NTSTATUS NTAPI PinWaveCyclicDRMHandler(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
NTSTATUS NTAPI PinWaveCyclicState(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
KSEVENT_ITEM PinWaveCyclicConnectionEventSet
NTSTATUS NTAPI PinWaveCyclicAddEndOfStreamEvent(IN PIRP Irp, IN PKSEVENTDATA EventData, IN PKSEVENT_ENTRY EventEntry)
VOID CALLBACK PinSetStateWorkerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
struct SETPIN_CONTEXT * PSETPIN_CONTEXT
struct LOOPEDSTREAMING_EVENT_CONTEXT * PLOOPEDSTREAMING_EVENT_CONTEXT
KSEVENT_SET PinWaveCyclicEventSet[]
struct ENDOFSTREAM_EVENT_CONTEXT * PENDOFSTREAM_EVENT_CONTEXT
NTSTATUS NewPortPinWaveCyclic(OUT IPortPinWaveCyclic **OutPin)
NTSTATUS NTAPI PinWaveCyclicAllocatorFraming(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
NTSTATUS NTAPI PinWaveCyclicDataFormat(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data)
PMINIPORTWAVECYCLIC GetWaveCyclicMiniport(IN IPortWaveCyclic *iface)
IMiniportWaveCyclic * PMINIPORTWAVECYCLIC
IDmaChannel * PDMACHANNEL
IServiceSink * PSERVICESINK
IMiniportWaveCyclicStream * PMINIPORTWAVECYCLICSTREAM
IPortWaveCyclic * PPORTWAVECYCLIC
IServiceGroup * PSERVICEGROUP
NTSTATUS NTAPI PcCreateSubdeviceDescriptor(OUT SUBDEVICE_DESCRIPTOR **OutSubdeviceDescriptor, IN ULONG InterfaceCount, IN GUID *InterfaceGuids, IN ULONG IdentifierCount, IN KSIDENTIFIER *Identifier, IN ULONG FilterPropertiesCount, IN KSPROPERTY_SET *FilterProperties, IN ULONG Unknown1, IN ULONG Unknown2, IN ULONG PinPropertiesCount, IN KSPROPERTY_SET *PinProperties, IN ULONG EventSetCount, IN KSEVENT_SET *EventSet, IN PPCFILTER_DESCRIPTOR FilterDescription)
NTSTATUS NTAPI PcHandleDisableEventWithTable(IN PIRP Irp, IN PSUBDEVICE_DESCRIPTOR Descriptor)
#define PC_ASSERT_IRQL(x)
#define DEFINE_KSPROPERTY_DRMSET(PinSet, PropPositionHandler)
#define DEFINE_KSPROPERTY_AUDIOSET(PinSet, PropPositionHandler)
NTSTATUS NTAPI PcHandleEnableEventWithTable(IN PIRP Irp, IN PSUBDEVICE_DESCRIPTOR Descriptor)
NTSTATUS NTAPI PcHandlePropertyWithTable(IN PIRP Irp, IN ULONG PropertySetCount, IN PKSPROPERTY_SET PropertySet, IN PSUBDEVICE_DESCRIPTOR Descriptor)
#define KeAcquireSpinLockAtDpcLevel(SpinLock)
#define KeReleaseSpinLockFromDpcLevel(SpinLock)
#define STATUS_DEVICE_NOT_READY
BOOL DigitalOutputDisable
base of all file and directory entries
KSPIN_INTERFACE Interface
PPCFILTER_DESCRIPTOR DeviceDescriptor
PKSPROPERTY_SET FilterPropertySet
ULONG FilterPropertySetCount
PKSPIN_LOCK EventListLock
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_MORE_ENTRIES
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ WDFDPC _In_ BOOLEAN Wait
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
#define IsEqualGUIDAligned(guid1, guid2)