ReactOS  0.4.15-dev-1171-gab82533
pin_wavert.cpp
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/backpln/portcls/pin_wavert.cpp
5  * PURPOSE: WaveRT IRP Audio Pin
6  * PROGRAMMER: Johannes Anderwald
7  */
8 
9 #include "private.hpp"
10 
11 #ifndef YDEBUG
12 #define NDEBUG
13 #endif
14 
15 #include <debug.h>
16 
17 class CPortPinWaveRT : public IPortPinWaveRT
18 {
19 public:
21 
23  {
25  return m_Ref;
26  }
28  {
30 
31  if (!m_Ref)
32  {
33  delete this;
34  return 0;
35  }
36  return m_Ref;
37  }
39  CPortPinWaveRT(IUnknown *OuterUnknown){}
40  virtual ~CPortPinWaveRT(){}
41 
42 protected:
43 
44  IPortWaveRT * m_Port;
45  IPortFilterWaveRT * m_Filter;
46  KSPIN_DESCRIPTOR * m_KsPinDescriptor;
53 
57 
58  IIrpQueue * m_IrpQueue;
59 
61 
65 
67 
70 
72 
78 
79 };
80 
81 
82 typedef struct
83 {
85  PIO_WORKITEM WorkItem;
86  KSSTATE State;
88 
89 
90 //==================================================================================================================================
92 NTAPI
94  IN REFIID refiid,
95  OUT PVOID* Output)
96 {
97  DPRINT("IServiceSink_fnQueryInterface entered\n");
98 
99  if (IsEqualGUIDAligned(refiid, IID_IIrpTarget) ||
101  {
102  *Output = PVOID(PUNKNOWN((IIrpTarget*)this));
103  PUNKNOWN(*Output)->AddRef();
104  return STATUS_SUCCESS;
105  }
106  return STATUS_UNSUCCESSFUL;
107 }
108 
109 //==================================================================================================================================
110 
111 NTSTATUS
112 NTAPI
113 CPortPinWaveRT::NewIrpTarget(
114  OUT struct IIrpTarget **OutTarget,
115  IN PCWSTR Name,
119  IN PIRP Irp,
120  IN KSOBJECT_CREATE *CreateObject)
121 {
123  return STATUS_UNSUCCESSFUL;
124 }
125 
126 NTSTATUS
127 NTAPI
129  IN PIRP Irp)
130 {
134  PIO_STACK_LOCATION IoStack;
135 
137 
138  DPRINT("IPortPinWave_HandleKsProperty entered\n");
139 
140  if (IoStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KSPROPERTY))
141  {
142  Irp->IoStatus.Information = 0;
143  Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
146  }
147 
148  Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
149 
151  {
153  {
154  PKSSTATE State = (PKSSTATE)Irp->UserBuffer;
155 
156  if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(KSSTATE))
157  {
158  Irp->IoStatus.Information = sizeof(KSSTATE);
159  Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
162  }
163 
164  if (Property->Flags & KSPROPERTY_TYPE_SET)
165  {
167  Irp->IoStatus.Information = 0;
168 
169  if (m_Stream)
170  {
171  Status = m_Stream->SetState(*State);
172 
173  DPRINT("Setting state %u %x\n", *State, Status);
174  if (NT_SUCCESS(Status))
175  {
176  m_State = *State;
177  }
178  }
179  Irp->IoStatus.Status = Status;
181  return Status;
182  }
183  else if (Property->Flags & KSPROPERTY_TYPE_GET)
184  {
185  *State = m_State;
186  Irp->IoStatus.Information = sizeof(KSSTATE);
187  Irp->IoStatus.Status = STATUS_SUCCESS;
189  return STATUS_SUCCESS;
190  }
191  }
193  {
194  PKSDATAFORMAT DataFormat = (PKSDATAFORMAT)Irp->UserBuffer;
195  if (Property->Flags & KSPROPERTY_TYPE_SET)
196  {
197  PKSDATAFORMAT NewDataFormat;
198  if (!RtlCompareMemory(DataFormat, m_Format, DataFormat->FormatSize))
199  {
200  Irp->IoStatus.Information = DataFormat->FormatSize;
201  Irp->IoStatus.Status = STATUS_SUCCESS;
203  return STATUS_SUCCESS;
204  }
205 
206  NewDataFormat = (PKSDATAFORMAT)AllocateItem(NonPagedPool, DataFormat->FormatSize, TAG_PORTCLASS);
207  if (!NewDataFormat)
208  {
209  Irp->IoStatus.Information = 0;
210  Irp->IoStatus.Status = STATUS_NO_MEMORY;
212  return STATUS_NO_MEMORY;
213  }
214  RtlMoveMemory(NewDataFormat, DataFormat, DataFormat->FormatSize);
215 
216  if (m_Stream)
217  {
218 #if 0
220  ASSERT(NewDataFormat->FormatSize == sizeof(KSDATAFORMAT_WAVEFORMATEX));
224 
226 #endif
227  DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
228  ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample,
229  ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec);
230 
231  Status = m_Stream->SetFormat(NewDataFormat);
232  if (NT_SUCCESS(Status))
233  {
234  if (m_Format)
236 
237  m_Format = NewDataFormat;
238  Irp->IoStatus.Information = DataFormat->FormatSize;
239  Irp->IoStatus.Status = STATUS_SUCCESS;
241  return STATUS_SUCCESS;
242  }
243  }
244  DPRINT("Failed to set format\n");
245  Irp->IoStatus.Information = 0;
246  Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
248  return STATUS_UNSUCCESSFUL;
249  }
250  else if (Property->Flags & KSPROPERTY_TYPE_GET)
251  {
252  if (!m_Format)
253  {
254  DPRINT("No format\n");
255  Irp->IoStatus.Information = 0;
256  Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
258  return STATUS_UNSUCCESSFUL;
259  }
260  if (m_Format->FormatSize > IoStack->Parameters.DeviceIoControl.OutputBufferLength)
261  {
262  Irp->IoStatus.Information = m_Format->FormatSize;
263  Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
266  }
267 
269  Irp->IoStatus.Information = DataFormat->FormatSize;
270  Irp->IoStatus.Status = STATUS_SUCCESS;
272  return STATUS_SUCCESS;
273  }
274  }
275 
276  }
278  DPRINT("Unhandled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
280 
281  Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
282  Irp->IoStatus.Information = 0;
284  return STATUS_NOT_IMPLEMENTED;
285 }
286 
287 NTSTATUS
288 NTAPI
290  IN PIRP Irp)
291 {
292  DPRINT("IPortPinWaveRT_HandleKsStream entered State %u Stream %p is UNIMPLEMENTED\n", m_State, m_Stream);
293 
294  return STATUS_PENDING;
295 }
296 
297 NTSTATUS
298 NTAPI
301  IN PIRP Irp)
302 {
303  PIO_STACK_LOCATION IoStack;
304 
306 
307 
308  switch (IoStack->Parameters.DeviceIoControl.IoControlCode)
309  {
310  case IOCTL_KS_PROPERTY:
311  return HandleKsProperty(Irp);
312 
314  /* FIXME UNIMPLEMENTED */
316  break;
317 
319  /* FIXME UNIMPLEMENTED */
321  break;
322 
323  case IOCTL_KS_HANDSHAKE:
324  /* FIXME UNIMPLEMENTED */
326  break;
327 
328  case IOCTL_KS_METHOD:
329  /* FIXME UNIMPLEMENTED */
332 
334  /* FIXME UNIMPLEMENTED */
336  break;
337 
340  return HandleKsStream(Irp);
341 
342  default:
344  }
345 
346  Irp->IoStatus.Information = 0;
347  Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
349 
350  return STATUS_UNSUCCESSFUL;
351 }
352 
353 NTSTATUS
354 NTAPI
357  IN PIRP Irp)
358 {
360 }
361 
362 NTSTATUS
363 NTAPI
366  IN PIRP Irp)
367 {
369 }
370 
371 NTSTATUS
372 NTAPI
375  IN PIRP Irp)
376 {
378 }
379 
380 VOID
381 NTAPI
384  IN PVOID Context)
385 {
388  ISubdevice *ISubDevice;
392 
393  This = (CPortPinWaveRT*)Ctx->Pin;
394 
395  if (This->m_Stream)
396  {
397  if (This->m_State != KSSTATE_STOP)
398  {
399  This->m_Stream->SetState(KSSTATE_STOP);
401  }
402  }
403 
404  Status = This->m_Port->QueryInterface(IID_ISubdevice, (PVOID*)&ISubDevice);
405  if (NT_SUCCESS(Status))
406  {
407  Status = ISubDevice->GetDescriptor(&Descriptor);
408  if (NT_SUCCESS(Status))
409  {
410  Descriptor->Factory.Instances[This->m_ConnectDetails->PinId].CurrentPinInstanceCount--;
411  }
412  ISubDevice->Release();
413  }
414 
415  if (This->m_Format)
416  {
417  FreeItem(This->m_Format, TAG_PORTCLASS);
418  This->m_Format = NULL;
419  }
420 
421  if (This->m_IrpQueue)
422  {
423  This->m_IrpQueue->Release();
424  }
425 
426  // complete the irp
427  Ctx->Irp->IoStatus.Information = 0;
430 
431  // free the work item
432  IoFreeWorkItem(Ctx->WorkItem);
433 
434  // free work item ctx
435  FreeItem(Ctx, TAG_PORTCLASS);
436 
437  if (This->m_Stream)
438  {
439  Stream = This->m_Stream;
440  This->m_Stream = NULL;
441  DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
442  Stream->Release();
443  }
444 }
445 
446 NTSTATUS
447 NTAPI
450  IN PIRP Irp)
451 {
453 
454  if (m_Stream)
455  {
457  if (!Ctx)
458  {
459  DPRINT("Failed to allocate stream context\n");
460  goto cleanup;
461  }
462 
464  if (!Ctx->WorkItem)
465  {
466  DPRINT("Failed to allocate work item\n");
467  goto cleanup;
468  }
469 
470  Ctx->Irp = Irp;
471  Ctx->Pin = this;
472 
474  Irp->IoStatus.Information = 0;
475  Irp->IoStatus.Status = STATUS_PENDING;
476 
477  // defer work item
479  // Return result
480  return STATUS_PENDING;
481  }
482 
483  Irp->IoStatus.Information = 0;
484  Irp->IoStatus.Status = STATUS_SUCCESS;
486 
487  return STATUS_SUCCESS;
488 
489 cleanup:
490 
491  if (Ctx)
492  FreeItem(Ctx, TAG_PORTCLASS);
493 
494  Irp->IoStatus.Information = 0;
495  Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
497  return STATUS_UNSUCCESSFUL;
498 
499 }
500 
501 NTSTATUS
502 NTAPI
503 CPortPinWaveRT::QuerySecurity(
505  IN PIRP Irp)
506 {
508 }
509 
510 NTSTATUS
511 NTAPI
512 CPortPinWaveRT::SetSecurity(
514  IN PIRP Irp)
515 {
517 }
518 
519 BOOLEAN
520 NTAPI
521 CPortPinWaveRT::FastDeviceIoControl(
523  IN BOOLEAN Wait,
529  OUT PIO_STATUS_BLOCK StatusBlock,
531 {
532  return FALSE;
533 }
534 
535 BOOLEAN
536 NTAPI
537 CPortPinWaveRT::FastRead(
540  IN ULONG Length,
541  IN BOOLEAN Wait,
542  IN ULONG LockKey,
543  IN PVOID Buffer,
544  OUT PIO_STATUS_BLOCK StatusBlock,
546 {
547  return FALSE;
548 }
549 
550 BOOLEAN
551 NTAPI
552 CPortPinWaveRT::FastWrite(
555  IN ULONG Length,
556  IN BOOLEAN Wait,
557  IN ULONG LockKey,
558  IN PVOID Buffer,
559  OUT PIO_STATUS_BLOCK StatusBlock,
561 {
562  return FALSE;
563 }
564 
565 NTSTATUS
566 NTAPI
570  IN KSPIN_CONNECT * ConnectDetails,
571  IN KSPIN_DESCRIPTOR * KsPinDescriptor,
573 {
577  KSRTAUDIO_HWLATENCY Latency;
578 
579  Port->AddRef();
580  Filter->AddRef();
581 
582  m_Port = Port;
583  m_Filter = Filter;
584  m_KsPinDescriptor = KsPinDescriptor;
585  m_ConnectDetails = ConnectDetails;
587 
588  DataFormat = (PKSDATAFORMAT)(ConnectDetails + 1);
589 
590  DPRINT("CPortPinWaveRT::Init entered\n");
591 
593  if (!m_Format)
595 
597 
599  if (!NT_SUCCESS(Status))
600  {
601  goto cleanup;
602  }
603 
604  Status = m_IrpQueue->Init(ConnectDetails, KsPinDescriptor, 0, 0, FALSE);
605  if (!NT_SUCCESS(Status))
606  {
607  goto cleanup;
608  }
609 
611  if (!NT_SUCCESS(Status))
612  {
613  goto cleanup;
614  }
615 
616  if (KsPinDescriptor->Communication == KSPIN_COMMUNICATION_SINK && KsPinDescriptor->DataFlow == KSPIN_DATAFLOW_IN)
617  {
618  Capture = FALSE;
619  }
620  else if (KsPinDescriptor->Communication == KSPIN_COMMUNICATION_SINK && KsPinDescriptor->DataFlow == KSPIN_DATAFLOW_OUT)
621  {
622  Capture = TRUE;
623  }
624  else
625  {
626  DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
627  KeBugCheck(0);
628  while(TRUE);
629  }
630 
631  Status = m_Miniport->NewStream(&m_Stream, m_PortStream, ConnectDetails->PinId, Capture, m_Format);
632  DPRINT("CPortPinWaveRT::Init Status %x\n", Status);
633 
634  if (!NT_SUCCESS(Status))
635  goto cleanup;
636 
637  m_Stream->GetHWLatency(&Latency);
638  // delay of 10 millisec
639  m_Delay = Int32x32To64(10, -10000);
640 
641  Status = m_Stream->AllocateAudioBuffer(16384 * 11, &m_Mdl, &m_CommonBufferSize, &m_CommonBufferOffset, &m_CacheType);
642  if (!NT_SUCCESS(Status))
643  {
644  DPRINT("AllocateAudioBuffer failed with %x\n", Status);
645  goto cleanup;
646  }
647 
649  if (!m_CommonBuffer)
650  {
651  DPRINT("Failed to get system address %x\n", Status);
652  IoFreeMdl(m_Mdl);
653  m_Mdl = NULL;
654  goto cleanup;
655  }
656 
657  DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
658  DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
660  return STATUS_SUCCESS;
661 
662 cleanup:
663  if (m_IrpQueue)
664  {
665  m_IrpQueue->Release();
666  m_IrpQueue = NULL;
667  }
668 
669  if (m_Format)
670  {
672  m_Format = NULL;
673  }
674 
675  if (m_Stream)
676  {
677  m_Stream->Release();
678  m_Stream = NULL;
679  }
680  else
681  {
682  if (m_PortStream)
683  {
684  m_PortStream->Release();
685  m_PortStream = NULL;
686  }
687 
688  }
689  return Status;
690 }
691 
692 
693 NTSTATUS
695  OUT IPortPinWaveRT ** OutPin)
696 {
698 
700  if (!This)
702 
703  This->AddRef();
704 
705  // store result
706  *OutPin = (PPORTPINWAVERT)This;
707 
708  return STATUS_SUCCESS;
709 }
KSDDKAPI NTSTATUS NTAPI KsDefaultDeviceIoCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1184
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
IPortWaveRTStream * PPORTWAVERTSTREAM
Definition: portcls.h:1791
static PWSTR GuidString
Definition: apphelp.c:91
CPPORT Port[4]
Definition: headless.c:34
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
_In_ BOOLEAN Read
Definition: strmini.h:479
IPortWaveRT * PPORTWAVERT
Definition: interfaces.hpp:682
#define IOCTL_KS_WRITE_STREAM
Definition: ks.h:139
#define REFIID
Definition: guiddef.h:118
IPortWaveRT * m_Port
Definition: pin_wavert.cpp:44
#define IOCTL_KS_DISABLE_EVENT
Definition: ks.h:133
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define KSDATAFORMAT_SUBTYPE_PCM
Definition: ksmedia.h:921
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
KSPIN_DESCRIPTOR * m_KsPinDescriptor
Definition: pin_wavert.cpp:46
PKSDATAFORMAT m_Format
Definition: pin_wavert.cpp:51
_In_ PIRP Irp
Definition: csq.h:116
#define TRUE
Definition: types.h:120
PMINIPORTWAVERT m_Miniport
Definition: pin_wavert.cpp:47
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
#define IOCTL_KS_READ_STREAM
Definition: ks.h:142
#define TAG_PORTCLASS
Definition: private.hpp:24
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:30
KSSTATE m_State
Definition: pin_wavert.cpp:50
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1809
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NewPortWaveRTStream(PPORTWAVERTSTREAM *OutStream)
_In_ ULONG _In_ ULONG State
Definition: potypes.h:516
CPortPinWaveRT(IUnknown *OuterUnknown)
Definition: pin_wavert.cpp:39
ULONG m_PreCompleted
Definition: pin_wavert.cpp:63
IO_STATUS_BLOCK IoStatus
BOOL Init(PUSERCONNECT UserCon)
Definition: dllmain.c:385
NTSTATUS NTAPI HandleKsProperty(IN PIRP Irp)
Definition: pin_wavert.cpp:128
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
#define KSPROPSETID_Connection
Definition: ks.h:346
IMiniportWaveRT * PMINIPORTWAVERT
Definition: portcls.h:1927
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
#define IOCTL_KS_RESET_STATE
Definition: ks.h:145
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
ULONG m_CommonBufferSize
Definition: pin_wavert.cpp:55
ULONGLONG m_Delay
Definition: pin_wavert.cpp:66
STDMETHODIMP_(ULONG) Release()
Definition: pin_wavert.cpp:27
#define KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
Definition: ksmedia.h:931
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:240
_In_ ULONG IoControlCode
Definition: cdrom.h:1437
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
PVOID m_CommonBuffer
Definition: pin_wavert.cpp:54
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
enum KSSTATE * PKSSTATE
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
Definition: bug.c:1431
long LONG
Definition: pedump.c:60
MEMORY_CACHING_TYPE m_CacheType
Definition: pin_wavert.cpp:68
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define STDMETHODIMP
Definition: basetyps.h:43
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
IPortFilterWaveRT * PPORTFILTERWAVERT
Definition: interfaces.hpp:693
Definition: bufpool.h:45
void * PVOID
Definition: retypes.h:9
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:588
#define IOCTL_KS_METHOD
Definition: ks.h:136
PPORTWAVERTSTREAM m_PortStream
Definition: pin_wavert.cpp:49
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2659
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
KSDDKAPI NTSTATUS NTAPI KsDispatchInvalidDeviceRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1168
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t OutputBufferLength
Definition: cdrom.h:1437
ULONG m_TotalPackets
Definition: pin_wavert.cpp:62
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
INT POOL_TYPE
Definition: typedefs.h:78
uint64_t ULONGLONG
Definition: typedefs.h:67
const GUID IID_IUnknown
friend VOID NTAPI SetStreamWorkerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
nsrefcnt Release()
friend VOID NTAPI CloseStreamRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
Definition: pin_wavert.cpp:382
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: cdrom.h:932
IPortFilterWaveRT * m_Filter
Definition: pin_wavert.cpp:45
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
CHAR InputBuffer[80]
Definition: conmgr.c:33
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
* PFILE_OBJECT
Definition: iotypes.h:1978
VOID NTAPI IoFreeMdl(PMDL Mdl)
Definition: iomdl.c:146
ULONG AddRef()
ULONG m_CommonBufferOffset
Definition: pin_wavert.cpp:56
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
CPortPinWaveRT * Pin
Definition: pin_wavert.cpp:84
Status
Definition: gdiplustypes.h:24
VOID NTAPI CloseStreamRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
Definition: pin_wavert.cpp:382
#define InterlockedDecrement
Definition: armddk.h:52
#define IOCTL_KS_ENABLE_EVENT
Definition: ks.h:130
Definition: arc.h:85
PIO_WORKITEM WorkItem
Definition: private.hpp:424
NTSTATUS NewPortPinWaveRT(OUT IPortPinWaveRT **OutPin)
Definition: pin_wavert.cpp:694
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define KSDATAFORMAT_TYPE_AUDIO
Definition: ksmedia.h:883
ULONG m_PostCompleted
Definition: pin_wavert.cpp:64
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
_In_ DWORD Property
Definition: setupapi.h:1545
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID OutputBuffer
Definition: cdrom.h:1437
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2789
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define InterlockedIncrement
Definition: armddk.h:53
KSSTATE
Definition: ks.h:1214
virtual ~CPortPinWaveRT()
Definition: pin_wavert.cpp:40
Definition: sacdrv.h:267
PMINIPORTWAVERTSTREAM m_Stream
Definition: pin_wavert.cpp:48
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:159
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
KSPIN_CONNECT * m_ConnectDetails
Definition: pin_wavert.cpp:52
PMINIPORTWAVERT GetWaveRTMiniport(IN IPortWaveRT *iface)
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
NTSTATUS NTAPI HandleKsStream(IN PIRP Irp)
Definition: pin_wavert.cpp:289
#define OUT
Definition: typedefs.h:40
struct CLOSESTREAM_CONTEXT * PCLOSESTREAM_CONTEXT
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:581
IPortPinWaveRT * PPORTPINWAVERT
Definition: interfaces.hpp:723
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t InputBufferLength
Definition: cdrom.h:1437
#define UNIMPLEMENTED
Definition: debug.h:115
char * cleanup(char *str)
Definition: wpickclick.c:99
struct KSIDENTIFIER * PKSPROPERTY
NTSTATUS NTAPI NewIrpQueue(IN IIrpQueue **Queue)
Definition: irpstream.cpp:808
struct SETSTREAM_CONTEXT * PSETSTREAM_CONTEXT
_In_ BOOLEAN Release
Definition: cdrom.h:920
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3107
#define UNIMPLEMENTED_ONCE
Definition: typedefs.h:30
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
return STATUS_SUCCESS
Definition: btrfs.c:3014
VOID NTAPI SetStreamState(IN KSSTATE State)
IoMarkIrpPending(Irp)
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
IIrpQueue * m_IrpQueue
Definition: pin_wavert.cpp:58
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition: fltkernel.h:1092
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:95
struct _Capture Capture
Definition: capture.h:24
#define Int32x32To64(a, b)
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
KSDATAFORMAT * PKSDATAFORMAT
STDMETHODIMP_(ULONG) AddRef()
Definition: pin_wavert.cpp:22
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: pin_wavert.cpp:93
IN BOOLEAN Wait
Definition: fatprocs.h:1538