11const GUID IID_IKsObject = {0x423c13a2, 0x2070, 0x11d0, {0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}};
95 m_Handle = KsObject->KsGetObjectHandle();
131 PinInfo.pFilter->Release();
146 IKsDataTypeHandler *KsDataTypeHandler,
149 KSIOOPERATION IoOperation,
150 PKSSTREAM_SEGMENT *OutStreamSegment)
159 if (*SampleCount == 0 || *SampleCount < 0)
163 *OutStreamSegment =
NULL;
187 StreamSegment->
StreamSegment.KsDataTypeHandler = KsDataTypeHandler;
188 StreamSegment->
StreamSegment.KsInterfaceHandler = (IKsInterfaceHandler*)
this;
195 if (KsDataTypeHandler)
198 KsDataTypeHandler->KsQueryExtendedSize(&ExtendedSize);
203 KsDataTypeHandler->AddRef();
247 hr = KsDataTypeHandler->KsPrepareIoOperation(SampleList[
Index], (CurStreamHeader + 1), IoOperation);
279 if (SampleList[
Index]->IsDiscontinuity() ==
S_OK)
282 if (SampleList[
Index]->IsPreroll() ==
S_OK)
285 if (SampleList[
Index]->IsSyncPoint() ==
S_OK)
300 if (IoOperation == KsIoOperation_Write)
317 m_Pin->KsIncrementPendingIoCount();
330 *OutStreamSegment = (PKSSTREAM_SEGMENT)StreamSegment;
336 *OutStreamSegment = (PKSSTREAM_SEGMENT)StreamSegment;
346 PKSSTREAM_SEGMENT InStreamSegment)
403 if (bOverlapped && StreamSegment->
StreamSegment.IoOperation == KsIoOperation_Read)
433 if (StreamSegment->
StreamSegment.IoOperation == KsIoOperation_Read)
441 else if (StreamSegment->
StreamSegment.IoOperation == KsIoOperation_Write)
460 m_Pin->KsDecrementPendingIoCount();
463 m_Pin->KsMediaSamplesCompleted(InStreamSegment);
#define InterlockedIncrement
#define InterlockedDecrement
@ AM_SAMPLE_DATADISCONTINUITY
#define STDMETHODCALLTYPE
HRESULT STDMETHODCALLTYPE KsCompleteIo(PKSSTREAM_SEGMENT StreamSegment)
HRESULT STDMETHODCALLTYPE KsProcessMediaSamples(IKsDataTypeHandler *KsDataTypeHandler, IMediaSample **SampleList, PLONG SampleCount, KSIOOPERATION IoOperation, PKSSTREAM_SEGMENT *StreamSegment)
STDMETHODIMP_(ULONG) Release()
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
STDMETHODIMP_(ULONG) AddRef()
HRESULT STDMETHODCALLTYPE KsSetPin(IKsPin *KsPin)
virtual ~CKsInterfaceHandler()
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
UINT(* handler)(MSIPACKAGE *)
#define MAKE_HRESULT(sev, fac, code)
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
HRESULT QueryPinInfo([out] PIN_INFO *pInfo)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HRESULT WINAPI CKsInterfaceHandler_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
struct KSSTREAM_SEGMENT_EXT * PKSSTREAM_SEGMENT_EXT
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
struct KSSTREAM_HEADER * PKSSTREAM_HEADER
#define KSSTREAM_HEADER_OPTIONSF_DURATIONVALID
#define KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT
#define KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY
#define IOCTL_KS_READ_STREAM
#define KSSTREAM_HEADER_OPTIONSF_TIMEVALID
#define IOCTL_KS_WRITE_STREAM
#define KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY
#define KSSTREAM_HEADER_OPTIONSF_PREROLL
_In_opt_ PVOID _Out_ BOOLEAN * Stop
static ULONG WINAPI AddRef(IStream *iface)
#define IsEqualGUID(rguid1, rguid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
IMediaSample * MediaSample[64]
PKSSTREAM_HEADER StreamHeader
KSSTREAM_SEGMENT StreamSegment
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
DWORD WINAPI GetLastError(void)