2009-07-23 13:13:45 +00:00
/*
* COPYRIGHT : See COPYING in the top level directory
* PROJECT : ReactOS Kernel Streaming
* FILE : drivers / ksfilter / ks / worker . c
* PURPOSE : KS pin functions
* PROGRAMMER : Johannes Anderwald
*/
2014-01-29 10:59:06 +00:00
# include "precomp.h"
2009-07-23 13:13:45 +00:00
2014-01-02 11:34:12 +00:00
# include <bdamedia.h>
# define NDEBUG
# include <debug.h>
2009-08-02 14:40:15 +00:00
typedef struct _KSISTREAM_POINTER
{
PFNKSSTREAMPOINTER Callback ;
PIRP Irp ;
KTIMER Timer ;
KDPC TimerDpc ;
struct _KSISTREAM_POINTER * Next ;
2010-04-04 21:27:07 +00:00
PKSPIN Pin ;
2010-04-07 21:45:25 +00:00
PVOID Data ;
ULONG Offset ;
ULONG Length ;
2010-04-04 21:27:07 +00:00
KSSTREAM_POINTER StreamPointer ;
2010-04-09 18:31:53 +00:00
KSPIN_LOCK Lock ;
2009-08-02 14:40:15 +00:00
} KSISTREAM_POINTER , * PKSISTREAM_POINTER ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
typedef struct
{
KSBASIC_HEADER BasicHeader ;
KSPIN Pin ;
PKSIOBJECT_HEADER ObjectHeader ;
2009-08-15 13:45:06 +00:00
KSPROCESSPIN ProcessPin ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
LIST_ENTRY Entry ;
LONG ref ;
2010-04-02 16:38:48 +00:00
IKsFilter * Filter ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
KMUTEX ProcessingMutex ;
PFILE_OBJECT FileObject ;
2009-07-30 07:31:41 +00:00
PKSGATE AttachedGate ;
BOOL OrGate ;
2009-08-02 14:40:15 +00:00
LIST_ENTRY IrpList ;
KSPIN_LOCK IrpListLock ;
2010-04-07 21:45:25 +00:00
volatile LONG IrpCount ;
2009-08-02 14:40:15 +00:00
PKSISTREAM_POINTER ClonedStreamPointer ;
2010-04-07 21:45:25 +00:00
KSISTREAM_POINTER LeadingEdgeStreamPointer ;
KSISTREAM_POINTER TrailingStreamPointer ;
2009-08-02 14:40:15 +00:00
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
PFNKSPINPOWER Sleep ;
PFNKSPINPOWER Wake ;
PFNKSPINHANDSHAKE Handshake ;
PFNKSPINFRAMERETURN FrameReturn ;
PFNKSPINIRPCOMPLETION IrpCompletion ;
2010-04-02 16:38:48 +00:00
KSCLOCK_FUNCTIONTABLE ClockTable ;
PFILE_OBJECT ClockFileObject ;
IKsReferenceClockVtbl * lpVtblReferenceClock ;
PKSDEFAULTCLOCK DefaultClock ;
2010-04-04 21:27:07 +00:00
PKSWORKER PinWorker ;
WORK_QUEUE_ITEM PinWorkQueueItem ;
KEVENT FrameComplete ;
2010-04-07 21:45:25 +00:00
ULONG FrameSize ;
ULONG NumFrames ;
PDMA_ADAPTER Dma ;
ULONG MapRegisters ;
2010-04-04 21:27:07 +00:00
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
} IKsPinImpl ;
2010-04-02 16:38:48 +00:00
NTSTATUS NTAPI IKsPin_PinStatePropertyHandler ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
NTSTATUS NTAPI IKsPin_PinDataFormatPropertyHandler ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
NTSTATUS NTAPI IKsPin_PinAllocatorFramingPropertyHandler ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
NTSTATUS NTAPI IKsPin_PinStreamAllocator ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
NTSTATUS NTAPI IKsPin_PinMasterClock ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
NTSTATUS NTAPI IKsPin_PinPipeId ( IN PIRP Irp , IN PKSIDENTIFIER Request , IN OUT PVOID Data ) ;
DEFINE_KSPROPERTY_CONNECTIONSET ( PinConnectionSet , IKsPin_PinStatePropertyHandler , IKsPin_PinDataFormatPropertyHandler , IKsPin_PinAllocatorFramingPropertyHandler ) ;
DEFINE_KSPROPERTY_STREAMSET ( PinStreamSet , IKsPin_PinStreamAllocator , IKsPin_PinMasterClock , IKsPin_PinPipeId ) ;
//TODO
// KSPROPSETID_Connection
// KSPROPERTY_CONNECTION_ACQUIREORDERING
// KSPROPSETID_StreamInterface
// KSPROPERTY_STREAMINTERFACE_HEADERSIZE
KSPROPERTY_SET PinPropertySet [ ] =
{
{
& KSPROPSETID_Connection ,
sizeof ( PinConnectionSet ) / sizeof ( KSPROPERTY_ITEM ) ,
( const KSPROPERTY_ITEM * ) & PinConnectionSet ,
0 ,
NULL
} ,
{
& KSPROPSETID_Stream ,
sizeof ( PinStreamSet ) / sizeof ( KSPROPERTY_ITEM ) ,
( const KSPROPERTY_ITEM * ) & PinStreamSet ,
0 ,
NULL
}
} ;
const GUID KSPROPSETID_Connection = { 0x1D58C920L , 0xAC9B , 0x11CF , { 0xA5 , 0xD6 , 0x28 , 0xDB , 0x04 , 0xC1 , 0x00 , 0x00 } } ;
const GUID KSPROPSETID_Stream = { 0x65aaba60L , 0x98ae , 0x11cf , { 0xa1 , 0x0d , 0x00 , 0x20 , 0xaf , 0xd1 , 0x56 , 0xe4 } } ;
const GUID KSPROPSETID_Clock = { 0xDF12A4C0L , 0xAC17 , 0x11CF , { 0xA5 , 0xD6 , 0x28 , 0xDB , 0x04 , 0xC1 , 0x00 , 0x00 } } ;
NTSTATUS
NTAPI
IKsPin_PinStreamAllocator (
IN PIRP Irp ,
IN PKSIDENTIFIER Request ,
IN OUT PVOID Data )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2010-04-02 16:38:48 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_PinMasterClock (
IN PIRP Irp ,
IN PKSIDENTIFIER Request ,
IN OUT PVOID Data )
{
PIO_STACK_LOCATION IoStack ;
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
NTSTATUS Status = STATUS_SUCCESS ;
PHANDLE Handle ;
PFILE_OBJECT FileObject ;
KPROCESSOR_MODE Mode ;
KSPROPERTY Property ;
ULONG BytesReturned ;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
DPRINT ( " IKsPin_PinMasterClock \n " ) ;
/* sanity check */
ASSERT ( IoStack - > FileObject ) ;
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
/* get the object header */
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2010-04-10 18:00:17 +00:00
/* sanity check */
ASSERT ( ObjectHeader ) ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation from KSPIN offset */
2010-04-02 16:38:48 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
2010-04-10 18:00:17 +00:00
/* sanity check */
ASSERT ( This ) ;
2010-04-02 16:38:48 +00:00
Handle = ( PHANDLE ) Data ;
if ( Request - > Flags & KSPROPERTY_TYPE_GET )
{
if ( This - > Pin . Descriptor - > PinDescriptor . Communication ! = KSPIN_COMMUNICATION_NONE & &
This - > Pin . Descriptor - > Dispatch & &
( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_IMPLEMENT_CLOCK ) )
{
* Handle = NULL ;
Status = STATUS_SUCCESS ;
}
else
{
/* no clock available */
Status = STATUS_UNSUCCESSFUL ;
}
}
else if ( Request - > Flags & KSPROPERTY_TYPE_SET )
{
if ( This - > Pin . ClientState ! = KSSTATE_STOP )
{
/* can only set in stopped state */
Status = STATUS_INVALID_DEVICE_STATE ;
}
else
{
if ( * Handle )
{
Mode = ExGetPreviousMode ( ) ;
2014-05-11 23:11:16 +00:00
Status = ObReferenceObjectByHandle ( * Handle , SYNCHRONIZE | DIRECTORY_QUERY , * IoFileObjectType , Mode , ( PVOID * ) & FileObject , NULL ) ;
2010-04-02 16:38:48 +00:00
DPRINT ( " IKsPin_PinMasterClock ObReferenceObjectByHandle %lx \n " , Status ) ;
if ( NT_SUCCESS ( Status ) )
{
Property . Set = KSPROPSETID_Clock ;
Property . Id = KSPROPERTY_CLOCK_FUNCTIONTABLE ;
Property . Flags = KSPROPERTY_TYPE_GET ;
Status = KsSynchronousIoControlDevice ( FileObject , KernelMode , IOCTL_KS_PROPERTY , & Property , sizeof ( KSPROPERTY ) , & This - > ClockTable , sizeof ( KSCLOCK_FUNCTIONTABLE ) , & BytesReturned ) ;
DPRINT ( " IKsPin_PinMasterClock KSPROPERTY_CLOCK_FUNCTIONTABLE %lx \n " , Status ) ;
if ( NT_SUCCESS ( Status ) )
{
This - > ClockFileObject = FileObject ;
}
else
{
ObDereferenceObject ( FileObject ) ;
}
}
}
else
{
/* zeroing clock handle */
RtlZeroMemory ( & This - > ClockTable , sizeof ( KSCLOCK_FUNCTIONTABLE ) ) ;
Status = STATUS_SUCCESS ;
if ( This - > ClockFileObject )
{
FileObject = This - > ClockFileObject ;
This - > ClockFileObject = NULL ;
ObDereferenceObject ( This - > ClockFileObject ) ;
}
}
}
}
2010-04-10 18:00:17 +00:00
DPRINT ( " IKsPin_PinMasterClock Status %lx \n " , Status ) ;
2010-04-02 16:38:48 +00:00
return Status ;
}
NTSTATUS
NTAPI
IKsPin_PinPipeId (
IN PIRP Irp ,
IN PKSIDENTIFIER Request ,
IN OUT PVOID Data )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2010-04-02 16:38:48 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_PinStatePropertyHandler (
IN PIRP Irp ,
IN PKSIDENTIFIER Request ,
IN OUT PVOID Data )
{
PIO_STACK_LOCATION IoStack ;
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
NTSTATUS Status = STATUS_SUCCESS ;
KSSTATE OldState ;
PKSSTATE NewState ;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
DPRINT ( " IKsPin_PinStatePropertyHandler \n " ) ;
/* sanity check */
ASSERT ( IoStack - > FileObject ) ;
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
/* get the object header */
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation from KSPIN offset */
2010-04-02 16:38:48 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
/* acquire control mutex */
KeWaitForSingleObject ( This - > BasicHeader . ControlMutex , Executive , KernelMode , FALSE , NULL ) ;
/* grab state */
NewState = ( PKSSTATE ) Data ;
if ( Request - > Flags & KSPROPERTY_TYPE_GET )
{
* NewState = This - > Pin . DeviceState ;
Irp - > IoStatus . Information = sizeof ( KSSTATE ) ;
}
else if ( Request - > Flags & KSPROPERTY_TYPE_SET )
{
if ( This - > Pin . Descriptor - > Dispatch - > SetDeviceState )
{
/* backup old state */
OldState = This - > Pin . ClientState ;
/* set new state */
This - > Pin . ClientState = * NewState ;
2010-04-15 10:07:38 +00:00
This - > Pin . DeviceState = KSSTATE_RUN ;
2010-04-02 16:38:48 +00:00
/* check if it supported */
Status = This - > Pin . Descriptor - > Dispatch - > SetDeviceState ( & This - > Pin , * NewState , OldState ) ;
DPRINT ( " IKsPin_PinStatePropertyHandler NewState %lu Result %lx \n " , * NewState , Status ) ;
if ( ! NT_SUCCESS ( Status ) )
{
/* revert to old state */
This - > Pin . ClientState = OldState ;
2010-04-04 21:27:07 +00:00
This - > Pin . DeviceState = OldState ;
2010-04-09 18:31:53 +00:00
DPRINT ( " IKsPin_PinStatePropertyHandler failed to set state %lx Result %lx \n " , * NewState , Status ) ;
2010-04-02 16:38:48 +00:00
DbgBreakPoint ( ) ;
}
else
{
/* update device state */
This - > Pin . DeviceState = * NewState ;
}
}
else
{
/* just set new state */
This - > Pin . DeviceState = * NewState ;
This - > Pin . ClientState = * NewState ;
}
}
/* release processing mutex */
KeReleaseMutex ( This - > BasicHeader . ControlMutex , FALSE ) ;
DPRINT ( " IKsPin_PinStatePropertyHandler Status %lx \n " , Status ) ;
return Status ;
}
NTSTATUS
NTAPI
IKsPin_PinAllocatorFramingPropertyHandler (
IN PIRP Irp ,
IN PKSIDENTIFIER Request ,
IN OUT PVOID Data )
{
2010-04-15 10:07:38 +00:00
PIO_STACK_LOCATION IoStack ;
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
ULONG Size ;
NTSTATUS Status = STATUS_SUCCESS ;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
/* sanity check */
ASSERT ( IoStack - > FileObject ) ;
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
/* get the object header */
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation from KSPIN offset */
2010-04-15 10:07:38 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
/* setting allocator flags is not supported */
ASSERT ( ! ( Request - > Flags & KSPROPERTY_TYPE_SET ) ) ;
/* acquire control mutex */
KeWaitForSingleObject ( This - > BasicHeader . ControlMutex , Executive , KernelMode , FALSE , NULL ) ;
if ( This - > Pin . Descriptor - > AllocatorFraming )
{
/* calculate size */
Size = FIELD_OFFSET ( KSALLOCATOR_FRAMING_EX , FramingItem [ 0 ] ) + This - > Pin . Descriptor - > AllocatorFraming - > CountItems * sizeof ( KS_FRAMING_ITEM ) ;
if ( IoStack - > Parameters . DeviceIoControl . OutputBufferLength = = 0 )
{
/* no buffer */
Status = STATUS_BUFFER_OVERFLOW ;
}
else if ( Size > IoStack - > Parameters . DeviceIoControl . OutputBufferLength )
{
/* buffer too small */
Status = STATUS_BUFFER_TOO_SMALL ;
}
else
{
/* copy buffer */
RtlMoveMemory ( Data , This - > Pin . Descriptor - > AllocatorFraming , Size ) ;
}
/* store size */
Irp - > IoStatus . Information = Size ;
}
else
{
/* no allocator framing details */
Status = STATUS_NOT_FOUND ;
}
/* release processing mutex */
KeReleaseMutex ( This - > BasicHeader . ControlMutex , FALSE ) ;
DPRINT ( " IKsPin_PinAllocatorFramingPropertyHandler Status %lx \n " , Status ) ;
return Status ;
2010-04-02 16:38:48 +00:00
}
NTSTATUS
NTAPI
IKsPin_PinDataFormatPropertyHandler (
IN PIRP Irp ,
IN PKSPROPERTY Request ,
IN OUT PVOID Data )
{
PIO_STACK_LOCATION IoStack ;
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
NTSTATUS Status = STATUS_SUCCESS ;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
DPRINT ( " IKsPin_PinDataFormatPropertyHandler \n " ) ;
/* sanity check */
ASSERT ( IoStack - > FileObject ) ;
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
/* get the object header */
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation from KSPIN offset */
2010-04-02 16:38:48 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
/* acquire control mutex */
KeWaitForSingleObject ( This - > BasicHeader . ControlMutex , Executive , KernelMode , FALSE , NULL ) ;
if ( Request - > Flags & KSPROPERTY_TYPE_GET )
{
if ( IoStack - > Parameters . DeviceIoControl . OutputBufferLength < This - > Pin . ConnectionFormat - > FormatSize )
{
/* buffer too small */
Irp - > IoStatus . Information = This - > Pin . ConnectionFormat - > FormatSize ;
Status = STATUS_BUFFER_TOO_SMALL ;
}
else
{
/* copy format */
RtlMoveMemory ( Data , This - > Pin . ConnectionFormat , This - > Pin . ConnectionFormat - > FormatSize ) ;
}
}
else if ( Request - > Flags & KSPROPERTY_TYPE_SET )
{
/* set format */
if ( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_FIXED_FORMAT )
{
/* format cannot be changed */
Status = STATUS_INVALID_DEVICE_REQUEST ;
}
else
{
/* FIXME check if the format is supported */
Status = _KsEdit ( This - > Pin . Bag , ( PVOID * ) & This - > Pin . ConnectionFormat , IoStack - > Parameters . DeviceIoControl . OutputBufferLength , This - > Pin . ConnectionFormat - > FormatSize , 0 ) ;
if ( NT_SUCCESS ( Status ) )
{
/* store new format */
RtlMoveMemory ( This - > Pin . ConnectionFormat , Data , IoStack - > Parameters . DeviceIoControl . OutputBufferLength ) ;
}
}
}
/* release processing mutex */
KeReleaseMutex ( This - > BasicHeader . ControlMutex , FALSE ) ;
DPRINT ( " IKsPin_PinDataFormatPropertyHandler Status %lx \n " , Status ) ;
return Status ;
}
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
NTSTATUS
NTAPI
IKsPin_fnQueryInterface (
IKsPin * iface ,
IN REFIID refiid ,
OUT PVOID * Output )
{
2010-04-15 10:07:38 +00:00
NTSTATUS Status ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , BasicHeader . OuterUnknown ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
if ( IsEqualGUIDAligned ( refiid , & IID_IUnknown ) )
{
2010-04-15 10:07:38 +00:00
* Output = & This - > BasicHeader . OuterUnknown ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
_InterlockedIncrement ( & This - > ref ) ;
return STATUS_SUCCESS ;
}
2010-04-15 10:07:38 +00:00
if ( This - > BasicHeader . ClientAggregate )
{
/* using client aggregate */
Status = This - > BasicHeader . ClientAggregate - > lpVtbl - > QueryInterface ( This - > BasicHeader . ClientAggregate , refiid , Output ) ;
if ( NT_SUCCESS ( Status ) )
{
/* client aggregate supports interface */
return Status ;
}
}
DPRINT ( " IKsPin_fnQueryInterface no interface \n " ) ;
return STATUS_NOT_SUPPORTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
ULONG
NTAPI
IKsPin_fnAddRef (
IKsPin * iface )
{
2010-04-15 10:07:38 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , BasicHeader . OuterUnknown ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return InterlockedIncrement ( & This - > ref ) ;
}
ULONG
NTAPI
IKsPin_fnRelease (
IKsPin * iface )
{
2010-04-15 10:07:38 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , BasicHeader . OuterUnknown ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
InterlockedDecrement ( & This - > ref ) ;
if ( This - > ref = = 0 )
{
FreeItem ( This ) ;
return 0 ;
}
/* Return new reference count */
return This - > ref ;
}
NTSTATUS
NTAPI
IKsPin_fnTransferKsIrp (
IN IKsPin * iface ,
IN PIRP Irp ,
IN IKsTransport * * OutTransport )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
VOID
NTAPI
IKsPin_fnDiscardKsIrp (
IN IKsPin * iface ,
IN PIRP Irp ,
IN IKsTransport * * OutTransport )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_fnConnect (
IN IKsPin * iface ,
IN IKsTransport * TransportIn ,
OUT IKsTransport * * OutTransportIn ,
OUT IKsTransport * * OutTransportOut ,
IN KSPIN_DATAFLOW DataFlow )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_fnSetDeviceState (
IN IKsPin * iface ,
IN KSSTATE OldState ,
IN KSSTATE NewState ,
IN IKsTransport * * OutTransport )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
VOID
NTAPI
IKsPin_fnSetResetState (
IN IKsPin * iface ,
IN KSRESET ResetState ,
OUT IKsTransport * * OutTransportOut )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_fnGetTransportConfig (
IN IKsPin * iface ,
IN struct KSPTRANSPORTCONFIG * TransportConfig ,
OUT IKsTransport * * OutTransportIn ,
OUT IKsTransport * * OutTransportOut )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_fnSetTransportConfig (
IN IKsPin * iface ,
IN struct KSPTRANSPORTCONFIG const * TransportConfig ,
OUT IKsTransport * * OutTransportIn ,
OUT IKsTransport * * OutTransportOut )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_fnResetTransportConfig (
IN IKsPin * iface ,
OUT IKsTransport * * OutTransportIn ,
OUT IKsTransport * * OutTransportOut )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
PKSPIN
NTAPI
IKsPin_fnGetStruct (
IN IKsPin * iface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return NULL ;
}
PKSPROCESSPIN
NTAPI
IKsPin_fnGetProcessPin (
IN IKsPin * iface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return NULL ;
}
NTSTATUS
NTAPI
IKsPin_fnAttemptBypass (
IN IKsPin * iface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
NTSTATUS
NTAPI
IKsPin_fnAttemptUnbypass (
IN IKsPin * iface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
VOID
NTAPI
IKsPin_fnGenerateConnectionEvents (
IN IKsPin * iface ,
IN ULONG EventMask )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_fnClientSetDeviceState (
IN IKsPin * iface ,
IN KSSTATE StateIn ,
IN KSSTATE StateOut )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
static IKsPinVtbl vt_IKsPin =
{
IKsPin_fnQueryInterface ,
IKsPin_fnAddRef ,
IKsPin_fnRelease ,
IKsPin_fnTransferKsIrp ,
IKsPin_fnDiscardKsIrp ,
IKsPin_fnConnect ,
IKsPin_fnSetDeviceState ,
IKsPin_fnSetResetState ,
IKsPin_fnGetTransportConfig ,
IKsPin_fnSetTransportConfig ,
IKsPin_fnResetTransportConfig ,
IKsPin_fnGetStruct ,
IKsPin_fnGetProcessPin ,
IKsPin_fnAttemptBypass ,
IKsPin_fnAttemptUnbypass ,
IKsPin_fnGenerateConnectionEvents ,
IKsPin_fnClientSetDeviceState
} ;
//==============================================================
2010-04-02 16:38:48 +00:00
NTSTATUS
NTAPI
IKsReferenceClock_fnQueryInterface (
IKsReferenceClock * iface ,
IN REFIID refiid ,
OUT PVOID * Output )
{
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-15 10:07:38 +00:00
return IKsPin_fnQueryInterface ( ( IKsPin * ) & This - > BasicHeader . OuterUnknown , refiid , Output ) ;
2010-04-02 16:38:48 +00:00
}
ULONG
NTAPI
IKsReferenceClock_fnAddRef (
IKsReferenceClock * iface )
{
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-15 10:07:38 +00:00
return IKsPin_fnAddRef ( ( IKsPin * ) & This - > BasicHeader . OuterUnknown ) ;
2010-04-02 16:38:48 +00:00
}
ULONG
NTAPI
IKsReferenceClock_fnRelease (
IKsReferenceClock * iface )
{
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-15 10:07:38 +00:00
return IKsPin_fnRelease ( ( IKsPin * ) & This - > BasicHeader . OuterUnknown ) ;
2010-04-02 16:38:48 +00:00
}
LONGLONG
NTAPI
IKsReferenceClock_fnGetTime (
IKsReferenceClock * iface )
{
LONGLONG Result ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-09 18:31:53 +00:00
DPRINT1 ( " IKsReferenceClock_fnGetTime \n " ) ;
2010-04-02 16:38:48 +00:00
if ( ! This - > ClockFileObject | | ! This - > ClockTable . GetTime )
{
Result = 0 ;
}
else
{
Result = This - > ClockTable . GetTime ( This - > ClockFileObject ) ;
}
return Result ;
}
LONGLONG
NTAPI
IKsReferenceClock_fnGetPhysicalTime (
IKsReferenceClock * iface )
{
LONGLONG Result ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-09 18:31:53 +00:00
DPRINT1 ( " IKsReferenceClock_fnGetPhysicalTime \n " ) ;
2010-04-02 16:38:48 +00:00
if ( ! This - > ClockFileObject | | ! This - > ClockTable . GetPhysicalTime )
{
Result = 0 ;
}
else
{
Result = This - > ClockTable . GetPhysicalTime ( This - > ClockFileObject ) ;
}
return Result ;
}
LONGLONG
NTAPI
IKsReferenceClock_fnGetCorrelatedTime (
IKsReferenceClock * iface ,
OUT PLONGLONG SystemTime )
{
LONGLONG Result ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-09 18:31:53 +00:00
DPRINT1 ( " IKsReferenceClock_fnGetCorrelatedTime \n " ) ;
2010-04-02 16:38:48 +00:00
if ( ! This - > ClockFileObject | | ! This - > ClockTable . GetCorrelatedTime )
{
Result = 0 ;
}
else
{
Result = This - > ClockTable . GetCorrelatedTime ( This - > ClockFileObject , SystemTime ) ;
}
return Result ;
}
LONGLONG
NTAPI
IKsReferenceClock_fnGetCorrelatedPhysicalTime (
IKsReferenceClock * iface ,
OUT PLONGLONG SystemTime )
{
LONGLONG Result ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
2010-04-09 18:31:53 +00:00
DPRINT1 ( " IKsReferenceClock_fnGetCorrelatedPhysicalTime \n " ) ;
2010-04-02 16:38:48 +00:00
if ( ! This - > ClockFileObject | | ! This - > ClockTable . GetCorrelatedPhysicalTime )
{
Result = 0 ;
}
else
{
Result = This - > ClockTable . GetCorrelatedPhysicalTime ( This - > ClockFileObject , SystemTime ) ;
}
return Result ;
}
NTSTATUS
NTAPI
IKsReferenceClock_fnGetResolution (
IKsReferenceClock * iface ,
OUT PKSRESOLUTION Resolution )
{
KSPROPERTY Property ;
ULONG BytesReturned ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
DPRINT1 ( " IKsReferenceClock_fnGetResolution \n " ) ;
if ( ! This - > ClockFileObject )
{
Resolution - > Error = 0 ;
Resolution - > Granularity = 1 ;
DPRINT1 ( " IKsReferenceClock_fnGetResolution Using HACK \n " ) ;
return STATUS_SUCCESS ;
}
if ( ! This - > ClockFileObject )
return STATUS_DEVICE_NOT_READY ;
Property . Set = KSPROPSETID_Clock ;
Property . Id = KSPROPERTY_CLOCK_RESOLUTION ;
Property . Flags = KSPROPERTY_TYPE_GET ;
return KsSynchronousIoControlDevice ( This - > ClockFileObject , KernelMode , IOCTL_KS_PROPERTY , & Property , sizeof ( KSPROPERTY ) , Resolution , sizeof ( KSRESOLUTION ) , & BytesReturned ) ;
}
NTSTATUS
NTAPI
IKsReferenceClock_fnGetState (
IKsReferenceClock * iface ,
OUT PKSSTATE State )
{
KSPROPERTY Property ;
ULONG BytesReturned ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( iface , IKsPinImpl , lpVtblReferenceClock ) ;
DPRINT1 ( " IKsReferenceClock_fnGetState \n " ) ;
if ( ! This - > ClockFileObject )
{
* State = This - > Pin . ClientState ;
DPRINT1 ( " IKsReferenceClock_fnGetState Using HACK \n " ) ;
return STATUS_SUCCESS ;
}
if ( ! This - > ClockFileObject )
return STATUS_DEVICE_NOT_READY ;
Property . Set = KSPROPSETID_Clock ;
Property . Id = KSPROPERTY_CLOCK_RESOLUTION ;
Property . Flags = KSPROPERTY_TYPE_GET ;
return KsSynchronousIoControlDevice ( This - > ClockFileObject , KernelMode , IOCTL_KS_PROPERTY , & Property , sizeof ( KSPROPERTY ) , State , sizeof ( KSSTATE ) , & BytesReturned ) ;
}
static IKsReferenceClockVtbl vt_ReferenceClock =
{
IKsReferenceClock_fnQueryInterface ,
IKsReferenceClock_fnAddRef ,
IKsReferenceClock_fnRelease ,
IKsReferenceClock_fnGetTime ,
IKsReferenceClock_fnGetPhysicalTime ,
IKsReferenceClock_fnGetCorrelatedTime ,
IKsReferenceClock_fnGetCorrelatedPhysicalTime ,
IKsReferenceClock_fnGetResolution ,
IKsReferenceClock_fnGetState
} ;
//==============================================================
2009-07-23 13:13:45 +00:00
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinAcquireProcessingMutex (
IN PKSPIN Pin )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
KeWaitForSingleObject ( & This - > ProcessingMutex , Executive , KernelMode , FALSE , NULL ) ;
2009-07-23 13:13:45 +00:00
}
/*
2009-07-30 07:31:41 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinAttachAndGate (
IN PKSPIN Pin ,
IN PKSGATE AndGate OPTIONAL )
{
2009-07-30 07:31:41 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* FIXME attach to filter's and gate (filter-centric processing) */
This - > AttachedGate = AndGate ;
This - > OrGate = FALSE ;
2009-07-23 13:13:45 +00:00
}
/*
2009-07-30 07:31:41 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinAttachOrGate (
IN PKSPIN Pin ,
IN PKSGATE OrGate OPTIONAL )
{
2009-07-30 07:31:41 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* FIXME attach to filter's and gate (filter-centric processing) */
This - > AttachedGate = OrGate ;
This - > OrGate = TRUE ;
2009-07-23 13:13:45 +00:00
}
2009-07-30 07:31:41 +00:00
/*
@ implemented
*/
PKSGATE
NTAPI
KsPinGetAndGate (
IN PKSPIN Pin )
{
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
return This - > AttachedGate ;
}
2009-07-23 13:13:45 +00:00
/*
@ unimplemented
*/
VOID
NTAPI
KsPinAttemptProcessing (
IN PKSPIN Pin ,
IN BOOLEAN Asynchronous )
{
2010-04-01 03:14:45 +00:00
DPRINT ( " KsPinAttemptProcessing \n " ) ;
2010-04-04 21:27:07 +00:00
DbgBreakPoint ( ) ;
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
NTSTATUS
NTAPI
KsPinGetAvailableByteCount (
IN PKSPIN Pin ,
OUT PLONG InputDataBytes OPTIONAL ,
OUT PLONG OutputBufferBytes OPTIONAL )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
/*
@ unimplemented
*/
NTSTATUS
NTAPI
KsPinGetConnectedFilterInterface (
IN PKSPIN Pin ,
IN const GUID * InterfaceId ,
OUT PVOID * Interface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
/*
2009-08-15 13:45:06 +00:00
@ unimplemented
2009-07-23 13:13:45 +00:00
*/
PDEVICE_OBJECT
NTAPI
KsPinGetConnectedPinDeviceObject (
IN PKSPIN Pin )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-08-15 13:45:06 +00:00
return NULL ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-13 09:54:51 +00:00
@ unimplemented
2009-07-23 13:13:45 +00:00
*/
PFILE_OBJECT
NTAPI
KsPinGetConnectedPinFileObject (
IN PKSPIN Pin )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-08-13 09:54:51 +00:00
return NULL ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-15 13:45:06 +00:00
@ unimplemented
2009-07-23 13:13:45 +00:00
*/
NTSTATUS
NTAPI
KsPinGetConnectedPinInterface (
IN PKSPIN Pin ,
IN const GUID * InterfaceId ,
OUT PVOID * Interface )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-08-15 13:45:06 +00:00
return STATUS_NOT_IMPLEMENTED ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
VOID
NTAPI
KsPinGetCopyRelationships (
IN PKSPIN Pin ,
OUT PKSPIN * CopySource ,
OUT PKSPIN * DelegateBranch )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
PKSPIN
NTAPI
KsPinGetNextSiblingPin (
IN PKSPIN Pin )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return KsGetNextSibling ( ( PVOID ) Pin ) ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
PKSFILTER
NTAPI
KsPinGetParentFilter (
IN PKSPIN Pin )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* return parent filter */
return This - > BasicHeader . Parent . KsFilter ;
2009-07-23 13:13:45 +00:00
}
/*
2010-04-02 16:38:48 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
NTSTATUS
NTAPI
2010-04-15 10:07:38 +00:00
KsPinGetReferenceClockInterface (
2009-07-23 13:13:45 +00:00
IN PKSPIN Pin ,
OUT PIKSREFERENCECLOCK * Interface )
{
2010-04-02 16:38:48 +00:00
NTSTATUS Status = STATUS_DEVICE_NOT_READY ;
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
if ( This - > ClockFileObject )
{
/* clock is available */
* Interface = ( PIKSREFERENCECLOCK ) & This - > lpVtblReferenceClock ;
Status = STATUS_SUCCESS ;
}
DPRINT ( " KsPinGetReferenceClockInterface Pin %p Interface %p Status %x \n " , Pin , Interface , Status ) ;
return Status ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinRegisterFrameReturnCallback (
IN PKSPIN Pin ,
IN PFNKSPINFRAMERETURN FrameReturn )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* register frame return callback */
This - > FrameReturn = FrameReturn ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinRegisterHandshakeCallback (
IN PKSPIN Pin ,
IN PFNKSPINHANDSHAKE Handshake )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* register private protocol handshake callback */
This - > Handshake = Handshake ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinRegisterIrpCompletionCallback (
IN PKSPIN Pin ,
IN PFNKSPINIRPCOMPLETION IrpCompletion )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* register irp completion callback */
This - > IrpCompletion = IrpCompletion ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinRegisterPowerCallbacks (
IN PKSPIN Pin ,
IN PFNKSPINPOWER Sleep OPTIONAL ,
IN PFNKSPINPOWER Wake OPTIONAL )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* register power callbacks */
This - > Sleep = Sleep ;
This - > Wake = Wake ;
2009-07-23 13:13:45 +00:00
}
/*
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
VOID
NTAPI
KsPinReleaseProcessingMutex (
IN PKSPIN Pin )
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IKsPinImpl * This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* release processing mutex */
KeReleaseMutex ( & This - > ProcessingMutex , FALSE ) ;
2009-07-23 13:13:45 +00:00
}
2009-07-30 06:29:24 +00:00
/*
@ implemented
*/
KSDDKAPI
PKSPIN
NTAPI
KsGetPinFromIrp (
IN PIRP Irp )
{
PKSIOBJECT_HEADER ObjectHeader ;
2010-04-02 16:38:48 +00:00
PKSPIN Pin ;
PKSBASIC_HEADER Header ;
2009-07-30 06:29:24 +00:00
PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
2010-04-01 03:14:45 +00:00
DPRINT ( " KsGetPinFromIrp \n " ) ;
2009-07-30 06:29:24 +00:00
/* get object header */
2009-09-12 14:35:27 +00:00
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2009-07-30 06:29:24 +00:00
2010-04-02 16:38:48 +00:00
if ( ! ObjectHeader )
return NULL ;
Pin = ( PKSPIN ) ObjectHeader - > ObjectType ;
Header = ( PKSBASIC_HEADER ) ( ( ULONG_PTR ) Pin - sizeof ( KSBASIC_HEADER ) ) ;
/* sanity check */
ASSERT ( Header - > Type = = KsObjectTypePin ) ;
/* return object type */
return Pin ;
2009-07-30 06:29:24 +00:00
}
2009-07-23 13:13:45 +00:00
/*
@ unimplemented
*/
VOID
NTAPI
KsPinSetPinClockTime (
IN PKSPIN Pin ,
IN LONGLONG Time )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
NTSTATUS
NTAPI
KsPinSubmitFrame (
IN PKSPIN Pin ,
IN PVOID Data OPTIONAL ,
IN ULONG Size OPTIONAL ,
IN PKSSTREAM_HEADER StreamHeader OPTIONAL ,
IN PVOID Context OPTIONAL )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_UNSUCCESSFUL ;
}
/*
@ unimplemented
*/
KSDDKAPI
NTSTATUS
NTAPI
KsPinSubmitFrameMdl (
IN PKSPIN Pin ,
IN PMDL Mdl OPTIONAL ,
IN PKSSTREAM_HEADER StreamHeader OPTIONAL ,
IN PVOID Context OPTIONAL )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_UNSUCCESSFUL ;
}
/*
@ unimplemented
*/
KSDDKAPI
BOOLEAN
NTAPI
KsProcessPinUpdate (
IN PKSPROCESSPIN ProcessPin )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return FALSE ;
}
2010-04-07 21:45:25 +00:00
NTSTATUS
IKsPin_PrepareStreamHeader (
IN IKsPinImpl * This ,
IN PKSISTREAM_POINTER StreamPointer )
{
PKSSTREAM_HEADER Header ;
ULONG Length ;
/* grab new irp */
StreamPointer - > Irp = KsRemoveIrpFromCancelableQueue ( & This - > IrpList , & This - > IrpListLock , KsListEntryHead , KsAcquireAndRemoveOnlySingleItem ) ;
if ( ! StreamPointer - > Irp )
{
/* run out of mappings */
DPRINT ( " OutOfMappings \n " ) ;
return STATUS_DEVICE_NOT_READY ;
}
InterlockedDecrement ( & This - > IrpCount ) ;
2010-04-09 18:31:53 +00:00
KsDecrementCountedWorker ( This - > PinWorker ) ;
2010-04-07 21:45:25 +00:00
/* get stream header */
if ( StreamPointer - > Irp - > RequestorMode = = UserMode )
Header = ( PKSSTREAM_HEADER ) StreamPointer - > Irp - > AssociatedIrp . SystemBuffer ;
else
Header = ( PKSSTREAM_HEADER ) StreamPointer - > Irp - > UserBuffer ;
/* initialize stream pointer */
StreamPointer - > Callback = NULL ;
StreamPointer - > Length = max ( Header - > DataUsed , Header - > FrameExtent ) ;
StreamPointer - > Next = NULL ;
StreamPointer - > Offset = 0 ;
StreamPointer - > Pin = & This - > Pin ;
StreamPointer - > Data = Header - > Data ;
StreamPointer - > StreamPointer . Context = NULL ;
StreamPointer - > StreamPointer . Pin = & This - > Pin ;
StreamPointer - > StreamPointer . StreamHeader = Header ;
if ( This - > Pin . Descriptor - > PinDescriptor . DataFlow = = KSPIN_DATAFLOW_IN )
StreamPointer - > StreamPointer . Offset = & StreamPointer - > StreamPointer . OffsetIn ;
else
StreamPointer - > StreamPointer . Offset = & StreamPointer - > StreamPointer . OffsetOut ;
2010-06-04 15:58:43 +00:00
# ifndef _WIN64
2010-04-07 21:45:25 +00:00
StreamPointer - > StreamPointer . Offset - > Alignment = 0 ;
2010-06-04 15:58:43 +00:00
# endif
2010-04-07 21:45:25 +00:00
StreamPointer - > StreamPointer . Offset - > Count = 0 ;
StreamPointer - > StreamPointer . Offset - > Data = NULL ;
StreamPointer - > StreamPointer . Offset - > Remaining = 0 ;
ASSERT ( StreamPointer - > StreamPointer . Offset - > Remaining = = 0 ) ;
//StreamPointer->Offset += StreamPointer->StreamPointer.Offset->Count;
ASSERT ( StreamPointer - > Length > StreamPointer - > Offset ) ;
ASSERT ( StreamPointer - > StreamPointer . StreamHeader ) ;
ASSERT ( This - > FrameSize ) ;
/* calculate length */
/* TODO split into frames */
Length = StreamPointer - > Length ;
/* FIXME */
ASSERT ( Length ) ;
2010-06-04 15:58:43 +00:00
# ifndef _WIN64
2010-04-07 21:45:25 +00:00
StreamPointer - > StreamPointer . Offset - > Alignment = 0 ;
2010-06-04 15:58:43 +00:00
# endif
2010-04-07 21:45:25 +00:00
StreamPointer - > StreamPointer . Context = NULL ;
StreamPointer - > StreamPointer . Pin = & This - > Pin ;
StreamPointer - > StreamPointer . Offset - > Count = Length ;
StreamPointer - > StreamPointer . Offset - > Remaining = Length ;
StreamPointer - > StreamPointer . Offset - > Data = ( PVOID ) ( ( ULONG_PTR ) StreamPointer - > Data + StreamPointer - > Offset ) ;
StreamPointer - > StreamPointer . StreamHeader - > FrameExtent = Length ;
if ( StreamPointer - > StreamPointer . StreamHeader - > DataUsed )
StreamPointer - > StreamPointer . StreamHeader - > DataUsed = Length ;
StreamPointer - > StreamPointer . StreamHeader - > Data = StreamPointer - > StreamPointer . Offset - > Data ;
return STATUS_SUCCESS ;
}
2009-07-23 13:13:45 +00:00
/*
@ unimplemented
*/
KSDDKAPI
PKSSTREAM_POINTER
NTAPI
KsPinGetLeadingEdgeStreamPointer (
IN PKSPIN Pin ,
IN KSSTREAM_POINTER_STATE State )
{
2010-04-04 21:27:07 +00:00
IKsPinImpl * This ;
2010-04-07 21:45:25 +00:00
NTSTATUS Status ;
2010-04-04 21:27:07 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
2010-04-07 21:45:25 +00:00
DPRINT ( " KsPinGetLeadingEdgeStreamPointer Pin %p State %x Count %lu Remaining %lu \n " , Pin , State ,
This - > LeadingEdgeStreamPointer . Length ,
This - > LeadingEdgeStreamPointer . Offset ) ;
2010-04-04 21:27:07 +00:00
/* sanity check */
ASSERT ( State = = KSSTREAM_POINTER_STATE_LOCKED ) ;
if ( State = = KSSTREAM_POINTER_STATE_LOCKED )
{
2010-04-07 21:45:25 +00:00
if ( ! This - > LeadingEdgeStreamPointer . Irp | | This - > LeadingEdgeStreamPointer . StreamPointer . Offset - > Remaining = = 0 )
2010-04-04 21:27:07 +00:00
{
2010-04-07 21:45:25 +00:00
Status = IKsPin_PrepareStreamHeader ( This , & This - > LeadingEdgeStreamPointer ) ;
if ( ! NT_SUCCESS ( Status ) )
return NULL ;
2010-04-04 21:27:07 +00:00
}
2010-04-07 21:45:25 +00:00
DPRINT ( " KsPinGetLeadingEdgeStreamPointer NewOffset %lu TotalLength %lu \n " , This - > LeadingEdgeStreamPointer . Offset , This - > LeadingEdgeStreamPointer . Length ) ;
}
return & This - > LeadingEdgeStreamPointer . StreamPointer ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
KSDDKAPI
PKSSTREAM_POINTER
NTAPI
KsPinGetTrailingEdgeStreamPointer (
IN PKSPIN Pin ,
IN KSSTREAM_POINTER_STATE State )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return NULL ;
}
/*
@ unimplemented
*/
KSDDKAPI
NTSTATUS
NTAPI
KsStreamPointerSetStatusCode (
IN PKSSTREAM_POINTER StreamPointer ,
IN NTSTATUS Status )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_UNSUCCESSFUL ;
}
/*
@ unimplemented
*/
KSDDKAPI
NTSTATUS
NTAPI
KsStreamPointerLock (
IN PKSSTREAM_POINTER StreamPointer )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return STATUS_UNSUCCESSFUL ;
}
/*
@ unimplemented
*/
KSDDKAPI
VOID
NTAPI
KsStreamPointerUnlock (
IN PKSSTREAM_POINTER StreamPointer ,
IN BOOLEAN Eject )
{
2010-04-09 18:31:53 +00:00
PKSISTREAM_POINTER Pointer = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
2016-10-20 20:02:43 +00:00
DPRINT1 ( " KsStreamPointerUnlock StreamPointer %pEject %lu \n " , StreamPointer , Eject ) ;
2010-04-09 18:31:53 +00:00
Pointer - > Irp = NULL ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
KSDDKAPI
VOID
NTAPI
KsStreamPointerAdvanceOffsetsAndUnlock (
IN PKSSTREAM_POINTER StreamPointer ,
IN ULONG InUsed ,
IN ULONG OutUsed ,
IN BOOLEAN Eject )
{
2016-10-20 20:02:43 +00:00
DPRINT1 ( " KsStreamPointerAdvanceOffsets InUsed %lu OutUsed %lu Eject %lu \n " , InUsed , OutUsed , Eject ) ;
2010-04-04 21:27:07 +00:00
DbgBreakPoint ( ) ;
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-02 14:40:15 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
VOID
NTAPI
KsStreamPointerDelete (
IN PKSSTREAM_POINTER StreamPointer )
{
2009-08-02 14:40:15 +00:00
IKsPinImpl * This ;
PKSISTREAM_POINTER Cur , Last ;
2010-04-04 21:27:07 +00:00
PKSISTREAM_POINTER Pointer = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
DPRINT ( " KsStreamPointerDelete %p \n " , Pointer ) ;
2010-04-07 21:45:25 +00:00
DbgBreakPoint ( ) ;
2009-08-02 14:40:15 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pointer - > StreamPointer . Pin , IKsPinImpl , Pin ) ;
/* point to first stream pointer */
Last = NULL ;
Cur = This - > ClonedStreamPointer ;
while ( Cur ! = Pointer & & Cur )
{
Last = Cur ;
/* iterate to next cloned pointer */
Cur = Cur - > Next ;
}
if ( ! Cur )
{
/* you naughty driver */
return ;
}
if ( ! Last )
{
/* remove first cloned pointer */
This - > ClonedStreamPointer = Pointer - > Next ;
}
else
{
Last - > Next = Pointer - > Next ;
}
/* FIXME make sure no timeouts are pending */
FreeItem ( Pointer ) ;
2009-07-23 13:13:45 +00:00
}
/*
2010-04-04 21:27:07 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
NTSTATUS
NTAPI
KsStreamPointerClone (
IN PKSSTREAM_POINTER StreamPointer ,
IN PFNKSSTREAMPOINTER CancelCallback OPTIONAL ,
IN ULONG ContextSize ,
OUT PKSSTREAM_POINTER * CloneStreamPointer )
{
2010-04-04 21:27:07 +00:00
IKsPinImpl * This ;
PKSISTREAM_POINTER CurFrame ;
PKSISTREAM_POINTER NewFrame ;
2010-06-04 15:58:43 +00:00
ULONG_PTR RefCount ;
2010-04-07 21:45:25 +00:00
NTSTATUS Status ;
2010-04-04 21:27:07 +00:00
ULONG Size ;
DPRINT ( " KsStreamPointerClone StreamPointer %p CancelCallback %p ContextSize %p CloneStreamPointer %p \n " , StreamPointer , CancelCallback , ContextSize , CloneStreamPointer ) ;
/* get stream pointer */
CurFrame = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
/* calculate context size */
Size = sizeof ( KSISTREAM_POINTER ) + ContextSize ;
/* allocate new stream pointer */
2010-06-09 14:44:46 +00:00
NewFrame = ( PKSISTREAM_POINTER ) AllocateItem ( NonPagedPool , Size ) ;
2010-04-04 21:27:07 +00:00
if ( ! NewFrame )
return STATUS_INSUFFICIENT_RESOURCES ;
/* get current irp stack location */
2010-06-04 15:58:43 +00:00
RefCount = ( ULONG_PTR ) CurFrame - > Irp - > Tail . Overlay . DriverContext [ 0 ] ;
2010-04-04 21:27:07 +00:00
/* increment reference count */
RefCount + + ;
CurFrame - > Irp - > Tail . Overlay . DriverContext [ 0 ] = ( PVOID ) RefCount ;
/* copy stream pointer */
RtlMoveMemory ( NewFrame , CurFrame , sizeof ( KSISTREAM_POINTER ) ) ;
2010-04-07 21:45:25 +00:00
/* locate pin */
This = ( IKsPinImpl * ) CONTAINING_RECORD ( CurFrame - > Pin , IKsPinImpl , Pin ) ;
/* prepare stream header in case required */
if ( CurFrame - > StreamPointer . Offset - > Remaining = = 0 )
{
Status = IKsPin_PrepareStreamHeader ( This , NewFrame ) ;
if ( ! NT_SUCCESS ( Status ) )
{
FreeItem ( NewFrame ) ;
return STATUS_DEVICE_NOT_READY ;
}
}
2010-04-04 21:27:07 +00:00
if ( ContextSize )
NewFrame - > StreamPointer . Context = ( NewFrame + 1 ) ;
2010-04-07 21:45:25 +00:00
if ( This - > Pin . Descriptor - > PinDescriptor . DataFlow = = KSPIN_DATAFLOW_IN )
NewFrame - > StreamPointer . Offset = & NewFrame - > StreamPointer . OffsetIn ;
else
NewFrame - > StreamPointer . Offset = & NewFrame - > StreamPointer . OffsetOut ;
2010-04-04 21:27:07 +00:00
NewFrame - > StreamPointer . Pin = & This - > Pin ;
ASSERT ( NewFrame - > StreamPointer . Pin ) ;
ASSERT ( NewFrame - > StreamPointer . Context ) ;
ASSERT ( NewFrame - > StreamPointer . Offset ) ;
ASSERT ( NewFrame - > StreamPointer . StreamHeader ) ;
/* store result */
* CloneStreamPointer = & NewFrame - > StreamPointer ;
2010-04-07 21:45:25 +00:00
DPRINT ( " KsStreamPointerClone CloneStreamPointer %p \n " , * CloneStreamPointer ) ;
2010-04-04 21:27:07 +00:00
return STATUS_SUCCESS ;
2009-07-23 13:13:45 +00:00
}
/*
2010-04-04 21:27:07 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
NTSTATUS
NTAPI
KsStreamPointerAdvanceOffsets (
IN PKSSTREAM_POINTER StreamPointer ,
IN ULONG InUsed ,
IN ULONG OutUsed ,
IN BOOLEAN Eject )
{
2010-04-04 21:27:07 +00:00
PKSISTREAM_POINTER CurFrame ;
IKsPinImpl * This ;
2010-04-07 21:45:25 +00:00
NTSTATUS Status ;
2010-04-04 21:27:07 +00:00
2010-04-07 21:45:25 +00:00
DPRINT ( " KsStreamPointerAdvanceOffsets StreamPointer %p InUsed %lu OutUsed %lu Eject %lu \n " , StreamPointer , InUsed , OutUsed , Eject ) ;
2010-04-04 21:27:07 +00:00
/* get stream pointer */
CurFrame = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
/* locate pin */
This = ( IKsPinImpl * ) CONTAINING_RECORD ( CurFrame - > Pin , IKsPinImpl , Pin ) ;
2010-04-07 21:45:25 +00:00
/* TODO */
ASSERT ( InUsed = = 0 ) ;
ASSERT ( Eject = = 0 ) ;
ASSERT ( OutUsed ) ;
DPRINT ( " KsStreamPointerAdvanceOffsets Offset %lu Length %lu NewOffset %lu Remaining %lu LeadingEdge %p DataUsed %lu \n " , CurFrame - > Offset , CurFrame - > Length , CurFrame - > Offset + OutUsed ,
CurFrame - > StreamPointer . OffsetOut . Remaining , & This - > LeadingEdgeStreamPointer . StreamPointer , CurFrame - > StreamPointer . StreamHeader - > DataUsed ) ;
DbgBreakPoint ( ) ;
2010-04-04 21:27:07 +00:00
if ( This - > Pin . Descriptor - > PinDescriptor . DataFlow = = KSPIN_DATAFLOW_IN )
{
2010-04-07 21:45:25 +00:00
ASSERT ( CurFrame - > StreamPointer . OffsetIn . Remaining > = InUsed ) ;
CurFrame - > StreamPointer . OffsetIn . Remaining - = InUsed ;
CurFrame - > StreamPointer . OffsetIn . Data = ( PVOID ) ( ( ULONG_PTR ) CurFrame - > StreamPointer . OffsetIn . Data + InUsed ) ;
2010-04-04 21:27:07 +00:00
}
else
{
2010-04-07 21:45:25 +00:00
if ( ! CurFrame - > StreamPointer . OffsetOut . Remaining )
2010-04-04 21:27:07 +00:00
{
2010-04-07 21:45:25 +00:00
Status = IKsPin_PrepareStreamHeader ( This , CurFrame ) ;
if ( ! NT_SUCCESS ( Status ) )
{
2010-04-04 21:27:07 +00:00
return STATUS_DEVICE_NOT_READY ;
2010-04-07 21:45:25 +00:00
}
}
else
{
ASSERT ( CurFrame - > StreamPointer . OffsetOut . Remaining > = OutUsed ) ;
CurFrame - > StreamPointer . OffsetOut . Remaining - = OutUsed ;
CurFrame - > StreamPointer . OffsetOut . Data = ( PVOID ) ( ( ULONG_PTR ) CurFrame - > StreamPointer . OffsetOut . Data + OutUsed ) ;
2010-04-04 21:27:07 +00:00
}
}
return STATUS_SUCCESS ;
2009-07-23 13:13:45 +00:00
}
/*
@ unimplemented
*/
KSDDKAPI
NTSTATUS
NTAPI
KsStreamPointerAdvance (
IN PKSSTREAM_POINTER StreamPointer )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2010-04-07 21:45:25 +00:00
DbgBreakPoint ( ) ;
2009-07-23 13:13:45 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
/*
@ unimplemented
*/
KSDDKAPI
PMDL
NTAPI
KsStreamPointerGetMdl (
IN PKSSTREAM_POINTER StreamPointer )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return NULL ;
}
/*
@ unimplemented
*/
KSDDKAPI
PIRP
NTAPI
KsStreamPointerGetIrp (
IN PKSSTREAM_POINTER StreamPointer ,
OUT PBOOLEAN FirstFrameInIrp OPTIONAL ,
OUT PBOOLEAN LastFrameInIrp OPTIONAL )
{
2017-02-06 15:49:23 +00:00
UNIMPLEMENTED ;
2009-07-23 13:13:45 +00:00
return NULL ;
}
/*
2009-08-02 14:40:15 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
VOID
NTAPI
KsStreamPointerScheduleTimeout (
IN PKSSTREAM_POINTER StreamPointer ,
IN PFNKSSTREAMPOINTER Callback ,
IN ULONGLONG Interval )
{
2009-08-02 14:40:15 +00:00
LARGE_INTEGER DueTime ;
2010-04-07 21:45:25 +00:00
PKSISTREAM_POINTER Pointer ;
/* get stream pointer */
Pointer = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
2009-08-02 14:40:15 +00:00
/* setup timer callback */
Pointer - > Callback = Callback ;
/* setup expiration */
DueTime . QuadPart = ( LONGLONG ) Interval ;
/* setup the timer */
KeSetTimer ( & Pointer - > Timer , DueTime , & Pointer - > TimerDpc ) ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-02 14:40:15 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
VOID
NTAPI
KsStreamPointerCancelTimeout (
IN PKSSTREAM_POINTER StreamPointer )
{
2010-04-07 21:45:25 +00:00
PKSISTREAM_POINTER Pointer ;
/* get stream pointer */
Pointer = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
2009-08-02 14:40:15 +00:00
KeCancelTimer ( & Pointer - > Timer ) ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-02 14:40:15 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
PKSSTREAM_POINTER
NTAPI
KsPinGetFirstCloneStreamPointer (
IN PKSPIN Pin )
{
2010-04-01 03:14:45 +00:00
IKsPinImpl * This ;
DPRINT ( " KsPinGetFirstCloneStreamPointer %p \n " , Pin ) ;
2010-04-09 18:31:53 +00:00
2010-04-01 03:14:45 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
2010-04-09 18:31:53 +00:00
if ( ! This - > ClonedStreamPointer )
return NULL ;
2009-08-02 14:40:15 +00:00
/* return first cloned stream pointer */
return & This - > ClonedStreamPointer - > StreamPointer ;
2009-07-23 13:13:45 +00:00
}
/*
2009-08-02 14:40:15 +00:00
@ implemented
2009-07-23 13:13:45 +00:00
*/
KSDDKAPI
PKSSTREAM_POINTER
NTAPI
KsStreamPointerGetNextClone (
IN PKSSTREAM_POINTER StreamPointer )
{
2010-04-07 21:45:25 +00:00
PKSISTREAM_POINTER Pointer ;
2009-08-02 14:40:15 +00:00
2010-04-01 03:14:45 +00:00
DPRINT ( " KsStreamPointerGetNextClone \n " ) ;
2010-04-07 21:45:25 +00:00
DbgBreakPoint ( ) ;
/* get stream pointer */
Pointer = ( PKSISTREAM_POINTER ) CONTAINING_RECORD ( StreamPointer , KSISTREAM_POINTER , StreamPointer ) ;
2009-08-02 14:40:15 +00:00
/* is there a another cloned stream pointer */
if ( ! Pointer - > Next )
return NULL ;
/* return next stream pointer */
return & Pointer - > Next - > StreamPointer ;
2009-07-23 13:13:45 +00:00
}
2010-04-04 21:27:07 +00:00
VOID
NTAPI
IKsPin_PinCentricWorker (
IN PVOID Parameter )
{
NTSTATUS Status ;
IKsPinImpl * This = ( IKsPinImpl * ) Parameter ;
DPRINT ( " IKsPin_PinCentricWorker \n " ) ;
/* sanity checks */
ASSERT ( This ) ;
ASSERT ( This - > Pin . Descriptor ) ;
ASSERT ( This - > Pin . Descriptor - > Dispatch ) ;
ASSERT ( This - > Pin . Descriptor - > Dispatch - > Process ) ;
ASSERT ( KeGetCurrentIrql ( ) = = PASSIVE_LEVEL ) ;
ASSERT ( ! ( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING ) ) ;
2010-04-07 21:45:25 +00:00
ASSERT ( ! ( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_GENERATE_MAPPINGS ) ) ;
2010-04-04 21:27:07 +00:00
do
{
DPRINT ( " IKsPin_PinCentricWorker calling Pin Process Routine \n " ) ;
2010-04-07 21:45:25 +00:00
Status = This - > Pin . Descriptor - > Dispatch - > Process ( & This - > Pin ) ;
DPRINT ( " IKsPin_PinCentricWorker Status %lx, Offset %lu Length %lu \n " , Status ,
This - > LeadingEdgeStreamPointer . Offset ,
This - > LeadingEdgeStreamPointer . Length ) ;
2010-04-04 21:27:07 +00:00
break ;
2010-04-07 21:45:25 +00:00
} while ( This - > IrpCount ) ;
2010-04-04 21:27:07 +00:00
}
2010-04-07 21:45:25 +00:00
2010-04-02 16:38:48 +00:00
NTSTATUS
2010-04-04 21:27:07 +00:00
NTAPI
2010-04-02 16:38:48 +00:00
IKsPin_DispatchKsStream (
PDEVICE_OBJECT DeviceObject ,
PIRP Irp ,
IKsPinImpl * This )
{
PKSPROCESSPIN_INDEXENTRY ProcessPinIndex ;
2010-04-07 21:45:25 +00:00
PKSSTREAM_HEADER Header ;
ULONG NumHeaders ;
2010-04-02 16:38:48 +00:00
PKSFILTER Filter ;
2010-04-04 21:27:07 +00:00
PIO_STACK_LOCATION IoStack ;
2010-04-02 16:38:48 +00:00
NTSTATUS Status = STATUS_SUCCESS ;
DPRINT ( " IKsPin_DispatchKsStream \n " ) ;
/* FIXME handle reset states */
ASSERT ( This - > Pin . ResetState = = KSRESET_END ) ;
2010-04-04 21:27:07 +00:00
/* get current stack location */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
2010-04-02 16:38:48 +00:00
2010-04-07 21:45:25 +00:00
/* probe stream pointer */
2010-04-04 21:27:07 +00:00
if ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_WRITE_STREAM )
Status = KsProbeStreamIrp ( Irp , KSSTREAM_WRITE | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK | KSPROBE_SYSTEMADDRESS , This - > Pin . StreamHeaderSize ) ;
else
Status = KsProbeStreamIrp ( Irp , KSSTREAM_READ | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK | KSPROBE_SYSTEMADDRESS , This - > Pin . StreamHeaderSize ) ;
if ( ! NT_SUCCESS ( Status ) )
{
DPRINT1 ( " KsProbeStreamIrp failed with %x \n " , Status ) ;
Irp - > IoStatus . Status = Status ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2010-04-04 21:27:07 +00:00
return Status ;
}
2010-04-02 16:38:48 +00:00
2010-04-07 21:45:25 +00:00
if ( Irp - > RequestorMode = = UserMode )
Header = ( PKSSTREAM_HEADER ) Irp - > AssociatedIrp . SystemBuffer ;
else
Header = ( PKSSTREAM_HEADER ) Irp - > UserBuffer ;
if ( ! Header )
{
DPRINT ( " NoHeader Canceling Irp %p \n " , Irp ) ;
Irp - > IoStatus . Status = STATUS_INSUFFICIENT_RESOURCES ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2010-04-07 21:45:25 +00:00
return Status ;
}
/* calculate num headers */
NumHeaders = IoStack - > Parameters . DeviceIoControl . OutputBufferLength / Header - > Size ;
/* assume headers of same length */
ASSERT ( IoStack - > Parameters . DeviceIoControl . OutputBufferLength % Header - > Size = = 0 ) ;
/* FIXME support multiple stream headers */
ASSERT ( NumHeaders = = 1 ) ;
if ( Irp - > RequestorMode = = UserMode )
{
/* prepare header */
ASSERT ( Irp - > MdlAddress ) ;
Header - > Data = MmGetSystemAddressForMdlSafe ( Irp - > MdlAddress , NormalPagePriority ) ;
if ( ! Header - > Data )
{
DPRINT ( " NoHeader->Data Canceling Irp %p \n " , Irp ) ;
Irp - > IoStatus . Status = STATUS_INSUFFICIENT_RESOURCES ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2010-04-07 21:45:25 +00:00
return Status ;
}
}
2010-04-02 16:38:48 +00:00
if ( This - > Pin . Descriptor - > Dispatch - > Process )
{
/* it is a pin centric avstream */
2010-04-04 21:27:07 +00:00
/* mark irp as pending */
IoMarkIrpPending ( Irp ) ;
/* add irp to cancelable queue */
KsAddIrpToCancelableQueue ( & This - > IrpList , & This - > IrpListLock , Irp , KsListEntryTail , NULL /* FIXME */ ) ;
/* sanity checks */
ASSERT ( ! ( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING ) ) ;
ASSERT ( This - > PinWorker ) ;
2010-04-07 21:45:25 +00:00
InterlockedIncrement ( & This - > IrpCount ) ;
DPRINT ( " IKsPin_DispatchKsStream IrpCount %lu \n " , This - > IrpCount ) ;
2010-04-04 21:27:07 +00:00
/* start the processing loop */
KsIncrementCountedWorker ( This - > PinWorker ) ;
Status = STATUS_PENDING ;
2010-04-02 16:38:48 +00:00
}
else
{
/* filter-centric avstream */
ASSERT ( This - > Filter ) ;
ProcessPinIndex = This - > Filter - > lpVtbl - > GetProcessDispatch ( This - > Filter ) ;
Filter = This - > Filter - > lpVtbl - > GetStruct ( This - > Filter ) ;
ASSERT ( ProcessPinIndex ) ;
ASSERT ( Filter ) ;
ASSERT ( Filter - > Descriptor ) ;
ASSERT ( Filter - > Descriptor - > Dispatch ) ;
if ( ! Filter - > Descriptor - > Dispatch - > Process )
{
/* invalid device request */
DPRINT ( " Filter Centric Processing No Process Routine \n " ) ;
Irp - > IoStatus . Status = STATUS_UNSUCCESSFUL ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2010-04-02 16:38:48 +00:00
return STATUS_UNSUCCESSFUL ;
}
2010-04-04 21:27:07 +00:00
/* mark irp as pending */
IoMarkIrpPending ( Irp ) ;
/* add irp to cancelable queue */
KsAddIrpToCancelableQueue ( & This - > IrpList , & This - > IrpListLock , Irp , KsListEntryTail , NULL /* FIXME */ ) ;
2010-04-02 16:38:48 +00:00
Status = Filter - > Descriptor - > Dispatch - > Process ( Filter , ProcessPinIndex ) ;
DPRINT ( " IKsPin_DispatchKsStream FilterCentric: Status %lx \n " , Status ) ;
2010-04-04 21:27:07 +00:00
2010-04-02 16:38:48 +00:00
}
return Status ;
}
2010-04-01 17:22:21 +00:00
NTSTATUS
2010-04-10 18:00:17 +00:00
NTAPI
IKsPin_DispatchDeviceIoControl (
IN PDEVICE_OBJECT DeviceObject ,
IN PIRP Irp )
2010-04-01 17:22:21 +00:00
{
PIO_STACK_LOCATION IoStack ;
2010-04-10 18:00:17 +00:00
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
NTSTATUS Status ;
2010-04-01 17:22:21 +00:00
UNICODE_STRING GuidString ;
2010-04-10 18:00:17 +00:00
PKSPROPERTY Property ;
ULONG SetCount = 0 ;
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
2010-04-01 17:22:21 +00:00
/* sanity check */
2010-04-10 18:00:17 +00:00
ASSERT ( IoStack - > FileObject ) ;
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
2010-04-01 17:22:21 +00:00
2010-04-10 18:00:17 +00:00
/* get the object header */
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation from KSPIN offset */
2010-04-10 18:00:17 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
/* current irp stack */
2010-04-01 17:22:21 +00:00
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
2010-04-15 10:07:38 +00:00
if ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_READ_STREAM | |
IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_WRITE_STREAM )
{
/* handle ks stream packets */
return IKsPin_DispatchKsStream ( DeviceObject , Irp , This ) ;
}
2010-04-10 18:00:17 +00:00
/* get property from input buffer */
Property = ( PKSPROPERTY ) IoStack - > Parameters . DeviceIoControl . Type3InputBuffer ;
2010-04-01 17:22:21 +00:00
2010-04-10 18:00:17 +00:00
/* sanity check */
ASSERT ( IoStack - > Parameters . DeviceIoControl . InputBufferLength > = sizeof ( KSIDENTIFIER ) ) ;
ASSERT ( This - > Pin . Descriptor - > AutomationTable ) ;
2010-04-01 17:22:21 +00:00
2010-04-10 18:00:17 +00:00
RtlStringFromGUID ( & Property - > Set , & GuidString ) ;
DPRINT ( " IKsPin_DispatchDeviceIoControl property Set |%S| Id %u Flags %x \n " , GuidString . Buffer , Property - > Id , Property - > Flags ) ;
RtlFreeUnicodeString ( & GuidString ) ;
2010-04-01 17:22:21 +00:00
2010-04-10 18:00:17 +00:00
if ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_METHOD )
2010-04-02 16:38:48 +00:00
{
2010-04-10 18:00:17 +00:00
const KSMETHOD_SET * MethodSet = NULL ;
ULONG MethodItemSize = 0 ;
/* check if the driver supports method sets */
if ( This - > Pin . Descriptor - > AutomationTable - > MethodSetsCount )
2010-04-02 16:38:48 +00:00
{
2010-04-10 18:00:17 +00:00
SetCount = This - > Pin . Descriptor - > AutomationTable - > MethodSetsCount ;
MethodSet = This - > Pin . Descriptor - > AutomationTable - > MethodSets ;
MethodItemSize = This - > Pin . Descriptor - > AutomationTable - > MethodItemSize ;
2010-04-02 16:38:48 +00:00
}
2010-04-10 18:00:17 +00:00
/* call method set handler */
Status = KspMethodHandlerWithAllocator ( Irp , SetCount , MethodSet , NULL , MethodItemSize ) ;
2010-04-02 16:38:48 +00:00
}
2010-04-10 18:00:17 +00:00
else if ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_PROPERTY )
{
const KSPROPERTY_SET * PropertySet = NULL ;
ULONG PropertyItemSize = 0 ;
/* check if the driver supports method sets */
if ( This - > Pin . Descriptor - > AutomationTable - > PropertySetsCount )
{
SetCount = This - > Pin . Descriptor - > AutomationTable - > PropertySetsCount ;
PropertySet = This - > Pin . Descriptor - > AutomationTable - > PropertySets ;
PropertyItemSize = This - > Pin . Descriptor - > AutomationTable - > PropertyItemSize ;
}
2010-04-02 16:38:48 +00:00
2010-04-10 18:00:17 +00:00
/* needed for our property handlers */
KSPROPERTY_ITEM_IRP_STORAGE ( Irp ) = ( KSPROPERTY_ITEM * ) This ;
2010-04-01 17:22:21 +00:00
2010-04-10 18:00:17 +00:00
/* call property handler */
Status = KspPropertyHandler ( Irp , SetCount , PropertySet , NULL , PropertyItemSize ) ;
}
else
2010-04-01 17:22:21 +00:00
{
2010-04-10 18:00:17 +00:00
/* sanity check */
ASSERT ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_ENABLE_EVENT | |
IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_DISABLE_EVENT ) ;
if ( IoStack - > Parameters . DeviceIoControl . IoControlCode = = IOCTL_KS_ENABLE_EVENT )
2010-04-01 17:22:21 +00:00
{
2010-04-10 18:00:17 +00:00
/* call enable event handlers */
Status = KspEnableEvent ( Irp ,
This - > Pin . Descriptor - > AutomationTable - > EventSetsCount ,
( PKSEVENT_SET ) This - > Pin . Descriptor - > AutomationTable - > EventSets ,
& This - > BasicHeader . EventList ,
KSEVENTS_SPINLOCK ,
( PVOID ) & This - > BasicHeader . EventListLock ,
NULL ,
This - > Pin . Descriptor - > AutomationTable - > EventItemSize ) ;
}
else
{
/* disable event handler */
Status = KsDisableEvent ( Irp , & This - > BasicHeader . EventList , KSEVENTS_SPINLOCK , & This - > BasicHeader . EventListLock ) ;
2010-04-01 17:22:21 +00:00
}
}
RtlStringFromGUID ( & Property - > Set , & GuidString ) ;
2010-04-10 18:00:17 +00:00
DPRINT ( " IKsPin_DispatchDeviceIoControl property Set |%S| Id %u Flags %x Status %lx ResultLength %lu \n " , GuidString . Buffer , Property - > Id , Property - > Flags , Status , Irp - > IoStatus . Information ) ;
2010-04-01 17:22:21 +00:00
RtlFreeUnicodeString ( & GuidString ) ;
2010-04-10 18:00:17 +00:00
if ( Status ! = STATUS_PENDING )
2009-08-02 14:40:15 +00:00
{
2010-04-10 18:00:17 +00:00
Irp - > IoStatus . Status = Status ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2009-08-02 14:40:15 +00:00
}
2010-04-10 18:00:17 +00:00
/* done */
return Status ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_Close (
IN PDEVICE_OBJECT DeviceObject ,
IN PIRP Irp )
{
2009-08-02 14:40:15 +00:00
PIO_STACK_LOCATION IoStack ;
PKSIOBJECT_HEADER ObjectHeader ;
IKsPinImpl * This ;
NTSTATUS Status = STATUS_SUCCESS ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
2009-08-02 14:40:15 +00:00
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
/* sanity check */
ASSERT ( IoStack - > FileObject ) ;
2009-09-12 14:35:27 +00:00
ASSERT ( IoStack - > FileObject - > FsContext2 ) ;
2009-08-02 14:40:15 +00:00
/* get the object header */
2009-09-12 14:35:27 +00:00
ObjectHeader = ( PKSIOBJECT_HEADER ) IoStack - > FileObject - > FsContext2 ;
2009-08-02 14:40:15 +00:00
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation fro KSPIN offset */
2009-08-02 14:40:15 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( ObjectHeader - > ObjectType , IKsPinImpl , Pin ) ;
if ( This - > Pin . Descriptor - > Dispatch - > Close )
{
/* call pin close routine */
Status = This - > Pin . Descriptor - > Dispatch - > Close ( & This - > Pin , Irp ) ;
if ( ! NT_SUCCESS ( Status ) )
{
/* abort closing */
Irp - > IoStatus . Status = Status ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2009-08-02 14:40:15 +00:00
return Status ;
}
2010-04-10 18:00:17 +00:00
/* remove pin from filter pin list and decrement reference count */
IKsFilter_RemovePin ( This - > Filter - > lpVtbl - > GetStruct ( This - > Filter ) , & This - > Pin ) ;
2009-08-02 14:40:15 +00:00
if ( Status ! = STATUS_PENDING )
{
Irp - > IoStatus . Status = Status ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2009-08-02 14:40:15 +00:00
return Status ;
}
}
return Status ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_DispatchCreateAllocator (
IN PDEVICE_OBJECT DeviceObject ,
IN PIRP Irp )
2009-07-28 19:32:22 +00:00
{
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
UNIMPLEMENTED ;
2009-07-28 19:32:22 +00:00
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
Irp - > IoStatus . Status = STATUS_NOT_IMPLEMENTED ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2009-07-28 19:32:22 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
NTSTATUS
NTAPI
IKsPin_DispatchCreateClock (
IN PDEVICE_OBJECT DeviceObject ,
IN PIRP Irp )
{
2010-04-02 16:38:48 +00:00
PKSPIN Pin ;
NTSTATUS Status = STATUS_SUCCESS ;
IKsPinImpl * This ;
KSRESOLUTION Resolution ;
PKSRESOLUTION pResolution = NULL ;
PKSOBJECT_CREATE_ITEM CreateItem ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
2010-04-02 16:38:48 +00:00
DPRINT ( " IKsPin_DispatchCreateClock \n " ) ;
/* get the create item */
CreateItem = KSCREATE_ITEM_IRP_STORAGE ( Irp ) ;
/* sanity check */
ASSERT ( CreateItem ) ;
/* get the pin object */
Pin = ( PKSPIN ) CreateItem - > Context ;
/* sanity check */
ASSERT ( Pin ) ;
2016-11-13 15:31:39 +00:00
/* locate ks pin implementation fro KSPIN offset */
2010-04-02 16:38:48 +00:00
This = ( IKsPinImpl * ) CONTAINING_RECORD ( Pin , IKsPinImpl , Pin ) ;
/* sanity check */
ASSERT ( This - > BasicHeader . Type = = KsObjectTypePin ) ;
ASSERT ( This - > BasicHeader . ControlMutex ) ;
/* acquire control mutex */
KsAcquireControl ( Pin ) ;
if ( ( This - > Pin . Descriptor - > PinDescriptor . Communication ! = KSPIN_COMMUNICATION_NONE & &
This - > Pin . Descriptor - > Dispatch ) | |
( This - > Pin . Descriptor - > Flags & KSPIN_FLAG_IMPLEMENT_CLOCK ) )
{
if ( ! This - > DefaultClock )
{
if ( This - > Pin . Descriptor - > Dispatch & & This - > Pin . Descriptor - > Dispatch - > Clock )
{
if ( This - > Pin . Descriptor - > Dispatch - > Clock - > Resolution )
{
This - > Pin . Descriptor - > Dispatch - > Clock - > Resolution ( & This - > Pin , & Resolution ) ;
pResolution = & Resolution ;
}
2014-05-11 23:11:16 +00:00
Status = KsAllocateDefaultClockEx ( & This - > DefaultClock ,
2010-04-02 16:38:48 +00:00
( PVOID ) & This - > Pin ,
( PFNKSSETTIMER ) This - > Pin . Descriptor - > Dispatch - > Clock - > SetTimer ,
( PFNKSCANCELTIMER ) This - > Pin . Descriptor - > Dispatch - > Clock - > CancelTimer ,
( PFNKSCORRELATEDTIME ) This - > Pin . Descriptor - > Dispatch - > Clock - > CorrelatedTime ,
pResolution ,
0 ) ;
}
else
{
Status = KsAllocateDefaultClockEx ( & This - > DefaultClock , ( PVOID ) & This - > Pin , NULL , NULL , NULL , NULL , 0 ) ;
}
}
if ( NT_SUCCESS ( Status ) )
{
Status = KsCreateDefaultClock ( Irp , This - > DefaultClock ) ;
}
}
DPRINT ( " IKsPin_DispatchCreateClock %lx \n " , Status ) ;
/* release control mutex */
KsReleaseControl ( Pin ) ;
/* done */
Irp - > IoStatus . Status = Status ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
2010-04-02 16:38:48 +00:00
return Status ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
}
NTSTATUS
NTAPI
IKsPin_DispatchCreateNode (
IN PDEVICE_OBJECT DeviceObject ,
IN PIRP Irp )
{
UNIMPLEMENTED ;
Irp - > IoStatus . Status = STATUS_NOT_IMPLEMENTED ;
2010-12-21 13:06:47 +00:00
CompleteRequest ( Irp , IO_NO_INCREMENT ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_NOT_IMPLEMENTED ;
}
2014-05-11 23:11:16 +00:00
static KSDISPATCH_TABLE PinDispatchTable =
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
{
IKsPin_DispatchDeviceIoControl ,
KsDispatchInvalidDeviceRequest ,
KsDispatchInvalidDeviceRequest ,
KsDispatchInvalidDeviceRequest ,
IKsPin_Close ,
KsDispatchQuerySecurity ,
KsDispatchSetSecurity ,
KsDispatchFastIoDeviceControlFailure ,
KsDispatchFastReadFailure ,
KsDispatchFastReadFailure
} ;
NTSTATUS
KspCreatePin (
IN PDEVICE_OBJECT DeviceObject ,
2010-04-02 16:38:48 +00:00
IN PIRP Irp ,
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
IN PKSDEVICE KsDevice ,
IN IKsFilterFactory * FilterFactory ,
IN IKsFilter * Filter ,
IN PKSPIN_CONNECT Connect ,
IN KSPIN_DESCRIPTOR_EX * Descriptor )
{
IKsPinImpl * This ;
PIO_STACK_LOCATION IoStack ;
IKsDevice * Device ;
PDEVICE_EXTENSION DeviceExtension ;
PKSOBJECT_CREATE_ITEM CreateItem ;
NTSTATUS Status ;
2010-04-01 17:22:21 +00:00
PKSDATAFORMAT DataFormat ;
2010-04-02 16:38:48 +00:00
PKSBASIC_HEADER BasicHeader ;
2010-04-07 21:45:25 +00:00
ULONG Index ;
ULONG FrameSize = 0 ;
ULONG NumFrames = 0 ;
2010-04-10 18:00:17 +00:00
KSAUTOMATION_TABLE AutomationTable ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
/* sanity checks */
ASSERT ( Descriptor - > Dispatch ) ;
2010-04-02 16:38:48 +00:00
DPRINT ( " KspCreatePin PinId %lu Flags %x \n " , Connect - > PinId , Descriptor - > Flags ) ;
//Output Pin: KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY
//Input Pin: KSPIN_FLAG_FIXED_FORMAT|KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT|KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING
2010-04-01 14:53:16 +00:00
2010-04-15 10:07:38 +00:00
DPRINT ( " KspCreatePin Dataflow %lu \n " , Descriptor - > PinDescriptor . DataFlow ) ;
DPRINT ( " KspCreatePin Communication %lu \n " , Descriptor - > PinDescriptor . Communication ) ;
2010-04-07 21:45:25 +00:00
if ( Descriptor - > AllocatorFraming )
{
DPRINT ( " KspCreatePin CountItems %lu \n " , Descriptor - > AllocatorFraming - > CountItems ) ;
DPRINT ( " KspCreatePin PinFlags %lx \n " , Descriptor - > AllocatorFraming - > PinFlags ) ;
DPRINT ( " KspCreatePin OutputCompression RatioNumerator %lu RatioDenominator %lu RatioConstantMargin %lu \n " , Descriptor - > AllocatorFraming - > OutputCompression . RatioNumerator ,
Descriptor - > AllocatorFraming - > OutputCompression . RatioDenominator , Descriptor - > AllocatorFraming - > OutputCompression . RatioConstantMargin ) ;
DPRINT ( " KspCreatePin PinWeight %lx \n " , Descriptor - > AllocatorFraming - > PinWeight ) ;
for ( Index = 0 ; Index < Descriptor - > AllocatorFraming - > CountItems ; Index + + )
{
DPRINT ( " KspCreatePin Index %lu MemoryFlags %lx \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . MemoryFlags ) ;
DPRINT ( " KspCreatePin Index %lu BusFlags %lx \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . BusFlags ) ;
DPRINT ( " KspCreatePin Index %lu Flags %lx \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . Flags ) ;
DPRINT ( " KspCreatePin Index %lu Frames %lu \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . Frames ) ;
DPRINT ( " KspCreatePin Index %lu FileAlignment %lx \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FileAlignment ) ;
DPRINT ( " KspCreatePin Index %lu MemoryTypeWeight %lx \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . MemoryTypeWeight ) ;
DPRINT ( " KspCreatePin Index %lu PhysicalRange MinFrameSize %lu MaxFrameSize %lu Stepping %lu \n " , Index , Descriptor - > AllocatorFraming - > FramingItem [ Index ] . PhysicalRange . MinFrameSize ,
2014-05-11 23:11:16 +00:00
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . PhysicalRange . MaxFrameSize ,
2010-04-07 21:45:25 +00:00
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . PhysicalRange . Stepping ) ;
2014-05-11 23:11:16 +00:00
DPRINT ( " KspCreatePin Index %lu FramingRange MinFrameSize %lu MaxFrameSize %lu Stepping %lu InPlaceWeight %lu NotInPlaceWeight %lu \n " ,
2010-04-07 21:45:25 +00:00
Index ,
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . Range . MinFrameSize ,
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . Range . MaxFrameSize ,
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . Range . Stepping ,
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . InPlaceWeight ,
Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . NotInPlaceWeight ) ;
FrameSize = Descriptor - > AllocatorFraming - > FramingItem [ Index ] . FramingRange . Range . MaxFrameSize ;
NumFrames = Descriptor - > AllocatorFraming - > FramingItem [ Index ] . Frames ;
}
}
2010-04-15 10:07:38 +00:00
for ( Index = 0 ; Index < Descriptor - > PinDescriptor . DataRangesCount ; Index + + )
{
UNICODE_STRING GuidString ;
/* convert the guid to string */
RtlStringFromGUID ( & Descriptor - > PinDescriptor . DataRanges [ Index ] - > MajorFormat , & GuidString ) ;
DPRINT ( " Index %lu MajorFormat %S \n " , Index , GuidString . Buffer ) ;
RtlStringFromGUID ( & Descriptor - > PinDescriptor . DataRanges [ Index ] - > SubFormat , & GuidString ) ;
DPRINT ( " Index %lu SubFormat %S \n " , Index , GuidString . Buffer ) ;
RtlStringFromGUID ( & Descriptor - > PinDescriptor . DataRanges [ Index ] - > Specifier , & GuidString ) ;
DPRINT ( " Index %lu Specifier %S \n " , Index , GuidString . Buffer ) ;
RtlStringFromGUID ( & Descriptor - > PinDescriptor . DataRanges [ Index ] - > Specifier , & GuidString ) ;
DPRINT ( " Index %lu FormatSize %lu Flags %lu SampleSize %lu Reserved %lu KSDATAFORMAT %lu \n " , Index ,
Descriptor - > PinDescriptor . DataRanges [ Index ] - > FormatSize , Descriptor - > PinDescriptor . DataRanges [ Index ] - > Flags , Descriptor - > PinDescriptor . DataRanges [ Index ] - > SampleSize , Descriptor - > PinDescriptor . DataRanges [ Index ] - > Reserved , sizeof ( KSDATAFORMAT ) ) ;
if ( IsEqualGUIDAligned ( & Descriptor - > PinDescriptor . DataRanges [ Index ] - > SubFormat , & KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT ) )
{
2015-09-11 20:42:49 +00:00
# if !defined(NDEBUG)
2010-04-15 10:07:38 +00:00
PKS_DATARANGE_BDA_TRANSPORT Transport = ( PKS_DATARANGE_BDA_TRANSPORT ) & Descriptor - > PinDescriptor . DataRanges [ Index ] ;
DPRINT ( " KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT AvgTimePerFrame %I64u ulcbPhyiscalFrame %lu ulcbPhyiscalFrameAlignment %lu ulcbPhyiscalPacket %lu \n " , Transport - > BdaTransportInfo . AvgTimePerFrame , Transport - > BdaTransportInfo . ulcbPhyiscalFrame ,
Transport - > BdaTransportInfo . ulcbPhyiscalFrameAlignment , Transport - > BdaTransportInfo . ulcbPhyiscalPacket ) ;
2015-09-11 20:42:49 +00:00
# endif
2010-04-15 10:07:38 +00:00
}
}
2010-04-07 21:45:25 +00:00
if ( ! FrameSize )
{
/* default to 50 * 188 (MPEG2 TS packet size) */
FrameSize = 9400 ;
}
if ( ! NumFrames )
{
NumFrames = 8 ;
}
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
/* get current irp stack */
IoStack = IoGetCurrentIrpStackLocation ( Irp ) ;
/* get device extension */
DeviceExtension = ( PDEVICE_EXTENSION ) DeviceObject - > DeviceExtension ;
/* get ks device interface */
2010-04-15 10:07:38 +00:00
Device = ( IKsDevice * ) & DeviceExtension - > DeviceHeader - > BasicHeader . OuterUnknown ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
/* first allocate pin ctx */
This = AllocateItem ( NonPagedPool , sizeof ( IKsPinImpl ) ) ;
if ( ! This )
{
/* not enough memory */
return STATUS_INSUFFICIENT_RESOURCES ;
}
/* allocate create item */
CreateItem = AllocateItem ( NonPagedPool , sizeof ( KSOBJECT_CREATE_ITEM ) * 3 ) ;
if ( ! CreateItem )
{
/* not enough memory */
FreeItem ( This ) ;
2010-04-01 14:53:16 +00:00
DPRINT ( " KspCreatePin OutOfMemory \n " ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
return STATUS_INSUFFICIENT_RESOURCES ;
}
/* initialize basic header */
This - > BasicHeader . KsDevice = KsDevice ;
This - > BasicHeader . Type = KsObjectTypePin ;
This - > BasicHeader . Parent . KsFilter = Filter - > lpVtbl - > GetStruct ( Filter ) ;
2010-04-15 10:07:38 +00:00
This - > BasicHeader . OuterUnknown = ( PUNKNOWN ) & vt_IKsPin ;
2010-04-10 18:00:17 +00:00
InitializeListHead ( & This - > BasicHeader . EventList ) ;
KeInitializeSpinLock ( & This - > BasicHeader . EventListLock ) ;
2010-04-02 16:38:48 +00:00
ASSERT ( This - > BasicHeader . Parent . KsFilter ) ;
BasicHeader = ( PKSBASIC_HEADER ) ( ( ULONG_PTR ) This - > BasicHeader . Parent . KsFilter - sizeof ( KSBASIC_HEADER ) ) ;
This - > BasicHeader . ControlMutex = BasicHeader - > ControlMutex ;
ASSERT ( This - > BasicHeader . ControlMutex ) ;
2009-07-30 07:31:41 +00:00
InitializeListHead ( & This - > BasicHeader . EventList ) ;
KeInitializeSpinLock ( & This - > BasicHeader . EventListLock ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
/* initialize pin */
2010-04-07 21:45:25 +00:00
This - > FrameSize = FrameSize ;
This - > NumFrames = NumFrames ;
2010-04-02 16:38:48 +00:00
This - > lpVtblReferenceClock = & vt_ReferenceClock ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
This - > ref = 1 ;
This - > FileObject = IoStack - > FileObject ;
2010-04-02 16:38:48 +00:00
This - > Filter = Filter ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
KeInitializeMutex ( & This - > ProcessingMutex , 0 ) ;
2009-08-02 14:40:15 +00:00
InitializeListHead ( & This - > IrpList ) ;
KeInitializeSpinLock ( & This - > IrpListLock ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
/* allocate object bag */
This - > Pin . Bag = AllocateItem ( NonPagedPool , sizeof ( KSIOBJECT_BAG ) ) ;
if ( ! This - > Pin . Bag )
{
/* not enough memory */
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
return STATUS_INSUFFICIENT_RESOURCES ;
}
/* initialize object bag */
2010-04-02 16:38:48 +00:00
Device - > lpVtbl - > InitializeObjectBag ( Device , This - > Pin . Bag , NULL ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
2010-04-10 18:00:17 +00:00
/* allocate pin descriptor */
This - > Pin . Descriptor = AllocateItem ( NonPagedPool , sizeof ( KSPIN_DESCRIPTOR_EX ) ) ;
if ( ! This - > Pin . Descriptor )
{
/* not enough memory */
KsFreeObjectBag ( This - > Pin . Bag ) ;
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
return STATUS_INSUFFICIENT_RESOURCES ;
}
/* copy pin descriptor */
RtlMoveMemory ( ( PVOID ) This - > Pin . Descriptor , Descriptor , sizeof ( KSPIN_DESCRIPTOR_EX ) ) ;
/* initialize automation table */
RtlZeroMemory ( & AutomationTable , sizeof ( KSAUTOMATION_TABLE ) ) ;
AutomationTable . PropertyItemSize = sizeof ( KSPROPERTY_ITEM ) ;
AutomationTable . PropertySets = PinPropertySet ;
AutomationTable . PropertySetsCount = sizeof ( PinPropertySet ) / sizeof ( KSPROPERTY_SET ) ;
/* merge in pin property sets */
Status = KsMergeAutomationTables ( ( PKSAUTOMATION_TABLE * ) & This - > Pin . Descriptor - > AutomationTable , ( PKSAUTOMATION_TABLE ) Descriptor - > AutomationTable , & AutomationTable , This - > Pin . Bag ) ;
if ( ! NT_SUCCESS ( Status ) )
{
/* not enough memory */
KsFreeObjectBag ( This - > Pin . Bag ) ;
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
return Status ;
}
2010-04-01 17:22:21 +00:00
/* get format */
DataFormat = ( PKSDATAFORMAT ) ( Connect + 1 ) ;
2010-04-02 16:38:48 +00:00
/* initialize pin descriptor */
2010-04-01 17:22:21 +00:00
This - > Pin . Context = NULL ;
This - > Pin . Id = Connect - > PinId ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
This - > Pin . Communication = Descriptor - > PinDescriptor . Communication ;
2010-04-01 17:22:21 +00:00
This - > Pin . ConnectionIsExternal = FALSE ; //FIXME
RtlMoveMemory ( & This - > Pin . ConnectionInterface , & Connect - > Interface , sizeof ( KSPIN_INTERFACE ) ) ;
RtlMoveMemory ( & This - > Pin . ConnectionMedium , & Connect - > Medium , sizeof ( KSPIN_MEDIUM ) ) ;
RtlMoveMemory ( & This - > Pin . ConnectionPriority , & Connect - > Priority , sizeof ( KSPRIORITY ) ) ;
/* allocate format */
Status = _KsEdit ( This - > Pin . Bag , ( PVOID * ) & This - > Pin . ConnectionFormat , DataFormat - > FormatSize , DataFormat - > FormatSize , 0 ) ;
if ( ! NT_SUCCESS ( Status ) )
{
/* failed to allocate format */
KsFreeObjectBag ( ( KSOBJECT_BAG ) This - > Pin . Bag ) ;
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
return STATUS_INSUFFICIENT_RESOURCES ;
}
/* copy format */
RtlMoveMemory ( ( PVOID ) This - > Pin . ConnectionFormat , DataFormat , DataFormat - > FormatSize ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
This - > Pin . AttributeList = NULL ; //FIXME
This - > Pin . StreamHeaderSize = sizeof ( KSSTREAM_HEADER ) ;
This - > Pin . DataFlow = Descriptor - > PinDescriptor . DataFlow ;
This - > Pin . DeviceState = KSSTATE_STOP ;
This - > Pin . ResetState = KSRESET_END ;
This - > Pin . ClientState = KSSTATE_STOP ;
2016-11-13 15:31:39 +00:00
/* initialize allocator create item */
2010-04-02 16:38:48 +00:00
CreateItem [ 0 ] . Context = ( PVOID ) & This - > Pin ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
CreateItem [ 0 ] . Create = IKsPin_DispatchCreateAllocator ;
CreateItem [ 0 ] . Flags = KSCREATE_ITEM_FREEONSTOP ;
RtlInitUnicodeString ( & CreateItem [ 0 ] . ObjectClass , KSSTRING_Allocator ) ;
2016-11-13 15:31:39 +00:00
/* initialize clock create item */
2010-04-02 16:38:48 +00:00
CreateItem [ 1 ] . Context = ( PVOID ) & This - > Pin ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
CreateItem [ 1 ] . Create = IKsPin_DispatchCreateClock ;
CreateItem [ 1 ] . Flags = KSCREATE_ITEM_FREEONSTOP ;
RtlInitUnicodeString ( & CreateItem [ 1 ] . ObjectClass , KSSTRING_Clock ) ;
2016-11-13 15:31:39 +00:00
/* initialize topology node create item */
2010-04-02 16:38:48 +00:00
CreateItem [ 2 ] . Context = ( PVOID ) & This - > Pin ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
CreateItem [ 2 ] . Create = IKsPin_DispatchCreateNode ;
CreateItem [ 2 ] . Flags = KSCREATE_ITEM_FREEONSTOP ;
RtlInitUnicodeString ( & CreateItem [ 2 ] . ObjectClass , KSSTRING_TopologyNode ) ;
/* now allocate object header */
Status = KsAllocateObjectHeader ( ( KSOBJECT_HEADER * ) & This - > ObjectHeader , 3 , CreateItem , Irp , & PinDispatchTable ) ;
if ( ! NT_SUCCESS ( Status ) )
{
/* failed to create object header */
2010-04-01 14:53:16 +00:00
DPRINT ( " KspCreatePin KsAllocateObjectHeader failed %lx \n " , Status ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
KsFreeObjectBag ( ( KSOBJECT_BAG ) This - > Pin . Bag ) ;
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
/* return failure code */
return Status ;
}
/* add extra info to object header */
This - > ObjectHeader - > Type = KsObjectTypePin ;
2010-04-15 10:07:38 +00:00
This - > ObjectHeader - > Unknown = ( PUNKNOWN ) & This - > BasicHeader . OuterUnknown ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
This - > ObjectHeader - > ObjectType = ( PVOID ) & This - > Pin ;
2009-08-15 13:45:06 +00:00
if ( ! Descriptor - > Dispatch | | ! Descriptor - > Dispatch - > Process )
{
/* the pin is part of filter-centric processing filter
* add process pin to filter
*/
2010-04-02 16:38:48 +00:00
This - > ProcessPin . BytesAvailable = 0 ;
This - > ProcessPin . BytesUsed = 0 ;
This - > ProcessPin . CopySource = NULL ;
This - > ProcessPin . Data = NULL ;
This - > ProcessPin . DelegateBranch = NULL ;
This - > ProcessPin . Flags = 0 ;
This - > ProcessPin . InPlaceCounterpart = NULL ;
This - > ProcessPin . Pin = & This - > Pin ;
2010-04-07 21:45:25 +00:00
This - > ProcessPin . StreamPointer = ( PKSSTREAM_POINTER ) & This - > LeadingEdgeStreamPointer . StreamPointer ;
2010-04-02 16:38:48 +00:00
This - > ProcessPin . Terminate = FALSE ;
2009-08-15 13:45:06 +00:00
Status = Filter - > lpVtbl - > AddProcessPin ( Filter , & This - > ProcessPin ) ;
2010-04-01 14:53:16 +00:00
DPRINT ( " KspCreatePin AddProcessPin %lx \n " , Status ) ;
2009-08-15 13:45:06 +00:00
if ( ! NT_SUCCESS ( Status ) )
{
/* failed to add process pin */
KsFreeObjectBag ( ( KSOBJECT_BAG ) This - > Pin . Bag ) ;
KsFreeObjectHeader ( & This - > ObjectHeader ) ;
2010-04-02 16:38:48 +00:00
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
2009-08-15 13:45:06 +00:00
/* return failure code */
return Status ;
}
}
2010-04-04 21:27:07 +00:00
else if ( Descriptor - > Dispatch & & Descriptor - > Dispatch - > Process )
{
/* pin centric processing filter */
/* initialize work item */
ExInitializeWorkItem ( & This - > PinWorkQueueItem , IKsPin_PinCentricWorker , ( PVOID ) This ) ;
/* allocate counted work item */
Status = KsRegisterCountedWorker ( HyperCriticalWorkQueue , & This - > PinWorkQueueItem , & This - > PinWorker ) ;
if ( ! NT_SUCCESS ( Status ) )
{
DPRINT ( " Failed to register Worker %lx \n " , Status ) ;
KsFreeObjectBag ( ( KSOBJECT_BAG ) This - > Pin . Bag ) ;
KsFreeObjectHeader ( & This - > ObjectHeader ) ;
FreeItem ( This ) ;
FreeItem ( CreateItem ) ;
return Status ;
}
2010-04-07 21:45:25 +00:00
if ( This - > Pin . Descriptor - > PinDescriptor . DataFlow = = KSPIN_DATAFLOW_IN )
This - > LeadingEdgeStreamPointer . StreamPointer . Offset = & This - > LeadingEdgeStreamPointer . StreamPointer . OffsetIn ;
else
This - > LeadingEdgeStreamPointer . StreamPointer . Offset = & This - > LeadingEdgeStreamPointer . StreamPointer . OffsetOut ;
2010-04-04 21:27:07 +00:00
KeInitializeEvent ( & This - > FrameComplete , NotificationEvent , FALSE ) ;
}
2009-08-15 13:45:06 +00:00
/* FIXME add pin instance to filter instance */
2010-04-10 18:00:17 +00:00
IKsFilter_AddPin ( Filter - > lpVtbl - > GetStruct ( Filter ) , & This - > Pin ) ;
2010-04-02 16:38:48 +00:00
if ( Descriptor - > Dispatch & & Descriptor - > Dispatch - > SetDataFormat )
{
Status = Descriptor - > Dispatch - > SetDataFormat ( & This - > Pin , NULL , NULL , This - > Pin . ConnectionFormat , NULL ) ;
DPRINT ( " KspCreatePin SetDataFormat %lx \n " , Status ) ;
}
2009-08-13 09:54:51 +00:00
/* does the driver have a pin dispatch */
if ( Descriptor - > Dispatch & & Descriptor - > Dispatch - > Create )
{
/* now inform the driver to create a new pin */
Status = Descriptor - > Dispatch - > Create ( & This - > Pin , Irp ) ;
2010-04-01 14:53:16 +00:00
DPRINT ( " KspCreatePin DispatchCreate %lx \n " , Status ) ;
2009-08-13 09:54:51 +00:00
}
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
2010-04-02 16:38:48 +00:00
2010-04-15 10:07:38 +00:00
DPRINT ( " KspCreatePin Status %lx KsDevice %p \n " , Status , KsDevice ) ;
2010-04-01 14:53:16 +00:00
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
if ( ! NT_SUCCESS ( Status ) & & Status ! = STATUS_PENDING )
{
/* failed to create pin, release resources */
2010-04-10 18:00:17 +00:00
IKsFilter_RemovePin ( Filter - > lpVtbl - > GetStruct ( Filter ) , & This - > Pin ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
KsFreeObjectBag ( ( KSOBJECT_BAG ) This - > Pin . Bag ) ;
2016-10-20 20:02:43 +00:00
KsFreeObjectHeader ( ( KSOBJECT_HEADER ) This - > ObjectHeader ) ;
- Start Implementing IKsPin interface
- Increment PinInstanceCount when a pin has succcessfully been created
- Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex
- Initialize pin dispatch table
- Add create items for allocator, clock, node create requests
- AVStream clients should now be able to instantiated pins, streaming not yet supported
svn path=/trunk/; revision=42283
2009-07-29 09:48:36 +00:00
FreeItem ( This ) ;
/* return failure code */
return Status ;
}
return Status ;
}