ReactOS 0.4.15-dev-8236-g99f0937
CKsProxy Class Reference
Inheritance diagram for CKsProxy:
Collaboration diagram for CKsProxy:

Public Types

typedef std::vector< IUnknown * > ProxyPluginVector
 
typedef std::vector< IPin * > PinVector
 
- Public Types inherited from IBaseFilter
typedef struct IBaseFilter::_FilterInfo FILTER_INFO
 
- Public Types inherited from IMediaFilter
enum  _FilterState { State_Stopped , State_Paused , State_Running }
 
typedef enum IMediaFilter::_FilterState FILTER_STATE
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistPropertyBag
typedef IPersistPropertyBagLPPERSISTPROPERTYBAG
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from ISpecifyPropertyPages
typedef ISpecifyPropertyPagesLPSPECIFYPROPERTYPAGES
 
typedef struct ISpecifyPropertyPages::tagCAUUID CAUUID
 
typedef struct ISpecifyPropertyPages::tagCAUUIDLPCAUUID
 

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE GetClassID (CLSID *pClassID)
 
HRESULT STDMETHODCALLTYPE Stop (void)
 
HRESULT STDMETHODCALLTYPE Pause (void)
 
HRESULT STDMETHODCALLTYPE Run (REFERENCE_TIME tStart)
 
HRESULT STDMETHODCALLTYPE GetState (DWORD dwMilliSecsTimeout, FILTER_STATE *State)
 
HRESULT STDMETHODCALLTYPE SetSyncSource (IReferenceClock *pClock)
 
HRESULT STDMETHODCALLTYPE GetSyncSource (IReferenceClock **pClock)
 
HRESULT STDMETHODCALLTYPE EnumPins (IEnumPins **ppEnum)
 
HRESULT STDMETHODCALLTYPE FindPin (LPCWSTR Id, IPin **ppPin)
 
HRESULT STDMETHODCALLTYPE QueryFilterInfo (FILTER_INFO *pInfo)
 
HRESULT STDMETHODCALLTYPE JoinFilterGraph (IFilterGraph *pGraph, LPCWSTR pName)
 
HRESULT STDMETHODCALLTYPE QueryVendorInfo (LPWSTR *pVendorInfo)
 
HRESULT STDMETHODCALLTYPE GetTime (REFERENCE_TIME *pTime)
 
HRESULT STDMETHODCALLTYPE AdviseTime (REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HEVENT hEvent, DWORD_PTR *pdwAdviseCookie)
 
HRESULT STDMETHODCALLTYPE AdvisePeriodic (REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HSEMAPHORE hSemaphore, DWORD_PTR *pdwAdviseCookie)
 
HRESULT STDMETHODCALLTYPE Unadvise (DWORD_PTR dwAdviseCookie)
 
HRESULT STDMETHODCALLTYPE GetCapabilities (DWORD *pCapabilities)
 
HRESULT STDMETHODCALLTYPE CheckCapabilities (DWORD *pCapabilities)
 
HRESULT STDMETHODCALLTYPE IsFormatSupported (const GUID *pFormat)
 
HRESULT STDMETHODCALLTYPE QueryPreferredFormat (GUID *pFormat)
 
HRESULT STDMETHODCALLTYPE GetTimeFormat (GUID *pFormat)
 
HRESULT STDMETHODCALLTYPE IsUsingTimeFormat (const GUID *pFormat)
 
HRESULT STDMETHODCALLTYPE SetTimeFormat (const GUID *pFormat)
 
HRESULT STDMETHODCALLTYPE GetDuration (LONGLONG *pDuration)
 
HRESULT STDMETHODCALLTYPE GetStopPosition (LONGLONG *pStop)
 
HRESULT STDMETHODCALLTYPE GetCurrentPosition (LONGLONG *pCurrent)
 
HRESULT STDMETHODCALLTYPE ConvertTimeFormat (LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
 
HRESULT STDMETHODCALLTYPE SetPositions (LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
 
HRESULT STDMETHODCALLTYPE GetPositions (LONGLONG *pCurrent, LONGLONG *pStop)
 
HRESULT STDMETHODCALLTYPE GetAvailable (LONGLONG *pEarliest, LONGLONG *pLatest)
 
HRESULT STDMETHODCALLTYPE SetRate (double dRate)
 
HRESULT STDMETHODCALLTYPE GetRate (double *pdRate)
 
HRESULT STDMETHODCALLTYPE GetPreroll (LONGLONG *pllPreroll)
 
HRESULT STDMETHODCALLTYPE Set (REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData)
 
HRESULT STDMETHODCALLTYPE Get (REFGUID guidPropSet, DWORD dwPropID, LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
 
HRESULT STDMETHODCALLTYPE QuerySupported (REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport)
 
ULONG STDMETHODCALLTYPE GetMiscFlags (void)
 
HRESULT STDMETHODCALLTYPE KsProperty (PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData, ULONG DataLength, ULONG *BytesReturned)
 
HRESULT STDMETHODCALLTYPE KsMethod (PKSMETHOD Method, ULONG MethodLength, LPVOID MethodData, ULONG DataLength, ULONG *BytesReturned)
 
HRESULT STDMETHODCALLTYPE KsEvent (PKSEVENT Event, ULONG EventLength, LPVOID EventData, ULONG DataLength, ULONG *BytesReturned)
 
HRESULT STDMETHODCALLTYPE CreateNodeInstance (ULONG NodeId, ULONG Flags, ACCESS_MASK DesiredAccess, IUnknown *UnkOuter, REFGUID InterfaceId, LPVOID *Interface)
 
HRESULT STDMETHODCALLTYPE KsAddAggregate (IN REFGUID AggregateClass)
 
HRESULT STDMETHODCALLTYPE KsRemoveAggregate (REFGUID AggregateClass)
 
HRESULT STDMETHODCALLTYPE KsGetTime (LONGLONG *Time)
 
HRESULT STDMETHODCALLTYPE KsSetTime (LONGLONG Time)
 
HRESULT STDMETHODCALLTYPE KsGetPhysicalTime (LONGLONG *Time)
 
HRESULT STDMETHODCALLTYPE KsSetPhysicalTime (LONGLONG Time)
 
HRESULT STDMETHODCALLTYPE KsGetCorrelatedTime (KSCORRELATED_TIME *CorrelatedTime)
 
HRESULT STDMETHODCALLTYPE KsSetCorrelatedTime (KSCORRELATED_TIME *CorrelatedTime)
 
HRESULT STDMETHODCALLTYPE KsGetCorrelatedPhysicalTime (KSCORRELATED_TIME *CorrelatedTime)
 
HRESULT STDMETHODCALLTYPE KsSetCorrelatedPhysicalTime (KSCORRELATED_TIME *CorrelatedTime)
 
HRESULT STDMETHODCALLTYPE KsGetResolution (KSRESOLUTION *Resolution)
 
HRESULT STDMETHODCALLTYPE KsGetState (KSSTATE *State)
 
HRESULT STDMETHODCALLTYPE Register (void)
 
HRESULT STDMETHODCALLTYPE Unregister (void)
 
HRESULT STDMETHODCALLTYPE InitNew (void)
 
HRESULT STDMETHODCALLTYPE Load (IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
HRESULT STDMETHODCALLTYPE Save (IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
HANDLE STDMETHODCALLTYPE KsGetObjectHandle ()
 
HANDLE STDMETHODCALLTYPE KsGetClockHandle ()
 
HRESULT STDMETHODCALLTYPE DeviceInfo (CLSID *pclsidInterfaceClass, LPWSTR *pwszSymbolicLink)
 
HRESULT STDMETHODCALLTYPE Reassociate (void)
 
HRESULT STDMETHODCALLTYPE Disassociate (void)
 
HRESULT STDMETHODCALLTYPE IsDirty (void)
 
HRESULT STDMETHODCALLTYPE Load (IStream *pStm)
 
HRESULT STDMETHODCALLTYPE Save (IStream *pStm, BOOL fClearDirty)
 
HRESULT STDMETHODCALLTYPE GetSizeMax (ULARGE_INTEGER *pcbSize)
 
HRESULT STDMETHODCALLTYPE GetPages (CAUUID *pPages)
 
 CKsProxy ()
 
 ~CKsProxy ()
 
HRESULT STDMETHODCALLTYPE GetSupportedSets (LPGUID *pOutGuid, PULONG NumGuids)
 
HRESULT STDMETHODCALLTYPE LoadProxyPlugins (LPGUID pGuids, ULONG NumGuids)
 
HRESULT STDMETHODCALLTYPE GetNumberOfPins (PULONG NumPins)
 
HRESULT STDMETHODCALLTYPE GetPinInstanceCount (ULONG PinId, PKSPIN_CINSTANCES Instances)
 
HRESULT STDMETHODCALLTYPE GetPinDataflow (ULONG PinId, KSPIN_DATAFLOW *DataFlow)
 
HRESULT STDMETHODCALLTYPE GetPinName (ULONG PinId, KSPIN_DATAFLOW DataFlow, ULONG PinCount, LPWSTR *OutPinName)
 
HRESULT STDMETHODCALLTYPE GetPinCommunication (ULONG PinId, KSPIN_COMMUNICATION *Communication)
 
HRESULT STDMETHODCALLTYPE CreatePins ()
 
HRESULT STDMETHODCALLTYPE GetMediaSeekingFormats (PKSMULTIPLE_ITEM *FormatList)
 
HRESULT STDMETHODCALLTYPE CreateClockInstance ()
 
HRESULT STDMETHODCALLTYPE PerformClockProperty (ULONG PropertyId, ULONG PropertyFlags, PVOID OutputBuffer, ULONG OutputBufferSize)
 
HRESULT STDMETHODCALLTYPE SetPinState (KSSTATE State)
 
HRESULT EnumPins ([out] IEnumPins **ppEnum)
 
HRESULT FindPin ([in, string] LPCWSTR Id, [out] IPin **ppPin)
 
HRESULT QueryFilterInfo ([out] FILTER_INFO *pInfo)
 
HRESULT JoinFilterGraph ([in] IFilterGraph *pGraph, [in, string] LPCWSTR pName)
 
HRESULT QueryVendorInfo ([out, string] LPWSTR *pVendorInfo)
 
HRESULT Stop (void)
 
HRESULT Pause (void)
 
HRESULT Run (REFERENCE_TIME tStart)
 
HRESULT GetState ([in] DWORD dwMilliSecsTimeout, [out] FILTER_STATE *State)
 
HRESULT SetSyncSource ([in] IReferenceClock *pClock)
 
HRESULT GetSyncSource ([out] IReferenceClock **pClock)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT Register ()
 
HRESULT Unregister ()
 
HRESULT InitNew ()
 
HRESULT Load ([in] IPropertyBag *pPropBag, [in] IErrorLog *pErrorLog)
 
HRESULT Save ([in] IPropertyBag *pPropBag, [in] BOOL fClearDirty, [in] BOOL fSaveAllProperties)
 
HRESULT IsDirty ()
 
HRESULT Load ([in, unique] IStream *pStm)
 
HRESULT Save ([in, unique] IStream *pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT GetPages ([out] CAUUID *pPages)
 
HRESULT GetTime ([out] REFERENCE_TIME *pTime)
 
HRESULT AdviseTime ([in] REFERENCE_TIME baseTime, [in] REFERENCE_TIME streamTime, [in] HEVENT hEvent, [out] DWORD_PTR *pdwAdviseCookie)
 
HRESULT AdvisePeriodic ([in] REFERENCE_TIME startTime, [in] REFERENCE_TIME periodTime, [in] HSEMAPHORE hSemaphore, [out] DWORD_PTR *pdwAdviseCookie)
 
HRESULT Unadvise ([in] DWORD_PTR dwAdviseCookie)
 
HRESULT GetCapabilities ([out] DWORD *pCapabilities)
 
HRESULT CheckCapabilities ([in, out] DWORD *pCapabilities)
 
HRESULT IsFormatSupported ([in] const GUID *pFormat)
 
HRESULT QueryPreferredFormat ([out] GUID *pFormat)
 
HRESULT GetTimeFormat ([out] GUID *pFormat)
 
HRESULT IsUsingTimeFormat ([in] const GUID *pFormat)
 
HRESULT SetTimeFormat ([in] const GUID *pFormat)
 
HRESULT GetDuration ([out] LONGLONG *pDuration)
 
HRESULT GetStopPosition ([out] LONGLONG *pStop)
 
HRESULT GetCurrentPosition ([out] LONGLONG *pCurrent)
 
HRESULT ConvertTimeFormat ([out] LONGLONG *pTarget, [in] const GUID *pTargetFormat, [in] LONGLONG Source, [in] const GUID *pSourceFormat)
 
HRESULT SetPositions ([in, out] LONGLONG *pCurrent, [in] DWORD dwCurrentFlags, [in, out] LONGLONG *pStop, [in] DWORD dwStopFlags)
 
HRESULT GetPositions ([out] LONGLONG *pCurrent, [out] LONGLONG *pStop)
 
HRESULT GetAvailable ([out] LONGLONG *pEarliest, [out] LONGLONG *pLatest)
 
HRESULT SetRate ([in] double dRate)
 
HRESULT GetRate ([out] double *pdRate)
 
HRESULT GetPreroll ([out] LONGLONG *pllPreroll)
 
HRESULT Set ([in] REFGUID guidPropSet, [in] DWORD dwPropID, [in, size_is(cbInstanceData)] LPVOID pInstanceData, [in] DWORD cbInstanceData, [in, size_is(cbPropData)] LPVOID pPropData, [in] DWORD cbPropData)
 
HRESULT Get ([in] REFGUID guidPropSet, [in] DWORD dwPropID, [in, size_is(cbInstanceData)] LPVOID pInstanceData, [in] DWORD cbInstanceData, [out, size_is(cbPropData)] LPVOID pPropData, [in] DWORD cbPropData, [out] DWORD *pcbReturned)
 
HRESULT QuerySupported ([in] REFGUID guidPropSet, [in] DWORD dwPropID, [out] DWORD *pTypeSupport)
 
ULONG GetMiscFlags ()
 
- Public Member Functions inherited from IKsControl
HRESULT KsProperty ([in] PKSPROPERTY Property, [in] ULONG PropertyLength, [in, out] void *PropertyData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 
HRESULT KsMethod ([in] PKSMETHOD Method, [in] ULONG MethodLength, [in, out] void *MethodData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 
HRESULT KsEvent ([in] PKSEVENT Event, [in] ULONG EventLength, [in, out] void *EventData, [in] ULONG DataLength, [out] ULONG *BytesReturned)
 

Protected Attributes

LONG m_Ref
 
IFilterGraphm_pGraph
 
IReferenceClockm_ReferenceClock
 
FILTER_STATE m_FilterState
 
HANDLE m_hDevice
 
ProxyPluginVector m_Plugins
 
PinVector m_Pins
 
LPWSTR m_DevicePath
 
CLSID m_DeviceInterfaceGUID
 
HANDLE m_hClock
 
CRITICAL_SECTION m_Lock
 

Detailed Description

Definition at line 24 of file proxy.cpp.

Member Typedef Documentation

◆ PinVector

typedef std::vector<IPin *> CKsProxy::PinVector

Definition at line 44 of file proxy.cpp.

◆ ProxyPluginVector

typedef std::vector<IUnknown *> CKsProxy::ProxyPluginVector

Definition at line 43 of file proxy.cpp.

Constructor & Destructor Documentation

◆ CKsProxy()

CKsProxy::CKsProxy ( )

Definition at line 201 of file proxy.cpp.

201 : m_Ref(0),
202 m_pGraph(0),
204 m_hDevice(0),
205 m_Plugins(),
206 m_Pins(),
207 m_DevicePath(0),
208 m_hClock(0)
209{
210 m_ReferenceClock = this;
212}
IReferenceClock * m_ReferenceClock
Definition: proxy.cpp:190
FILTER_STATE m_FilterState
Definition: proxy.cpp:191
HANDLE m_hDevice
Definition: proxy.cpp:192
HANDLE m_hClock
Definition: proxy.cpp:197
ProxyPluginVector m_Plugins
Definition: proxy.cpp:193
PinVector m_Pins
Definition: proxy.cpp:194
IFilterGraph * m_pGraph
Definition: proxy.cpp:189
LONG m_Ref
Definition: proxy.cpp:188
LPWSTR m_DevicePath
Definition: proxy.cpp:195
CRITICAL_SECTION m_Lock
Definition: proxy.cpp:198
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751

◆ ~CKsProxy()

CKsProxy::~CKsProxy ( )
inline

Definition at line 167 of file proxy.cpp.

168 {
169 if (m_hDevice)
171 };
#define CloseHandle
Definition: compat.h:739

Member Function Documentation

◆ AdvisePeriodic()

HRESULT STDMETHODCALLTYPE CKsProxy::AdvisePeriodic ( REFERENCE_TIME  startTime,
REFERENCE_TIME  periodTime,
HSEMAPHORE  hSemaphore,
DWORD_PTR pdwAdviseCookie 
)

Implements IReferenceClock.

Definition at line 719 of file proxy.cpp.

724{
725 HRESULT hr;
729
730#ifdef KSPROXY_TRACE
731 OutputDebugStringW(L"CKsProxy::AdvisePeriodic\n");
732#endif
733
734 //
735 //FIXME locks
736 //
737
738 if (!pdwAdviseCookie)
739 return E_POINTER;
740
741 if (!m_hClock)
742 {
743 // create clock
745 if (FAILED(hr))
746 return hr;
747 }
748
749 // allocate event entry
751 if (Event)
752 {
753 // setup request
757
758 Event->EventData.NotificationType = KSEVENTF_SEMAPHORE_HANDLE;
759 Event->EventData.SemaphoreHandle.Semaphore = (HANDLE)hSemaphore;
760 Event->EventData.SemaphoreHandle.Reserved = 0;
761 Event->EventData.SemaphoreHandle.Adjustment = 1;
762 Event->TimeBase = startTime;
763 Event->Interval = periodTime;
764
765 // perform request
767 if (SUCCEEDED(hr))
768 {
769 // store event handle
770 *pdwAdviseCookie = (DWORD_PTR)Event;
771 }
772 else
773 {
774 // failed to enable event
776 }
777 }
778 else
779 {
781 }
782
783 return hr;
784}
HRESULT STDMETHODCALLTYPE CreateClockInstance()
Definition: proxy.cpp:393
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static ULONGLONG startTime
Definition: main.c:113
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
@ KSEVENT_CLOCK_INTERVAL_MARK
Definition: ks.h:335
#define KSEVENTSETID_Clock
Definition: ks.h:332
#define KSEVENT_TYPE_ENABLE
Definition: ks.h:1789
struct KSEVENT_TIME_INTERVAL * PKSEVENT_TIME_INTERVAL
#define KSEVENTF_SEMAPHORE_HANDLE
Definition: ks.h:1779
#define IOCTL_KS_ENABLE_EVENT
Definition: ks.h:130
KSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle, ULONG IoControl, PVOID InBuffer, ULONG InLength, PVOID OutBuffer, ULONG OutLength, PULONG BytesReturned)
Definition: ksproxy.cpp:34
#define L(x)
Definition: ntvdm.h:50
HRESULT hr
Definition: shlfolder.c:183
#define DWORD_PTR
Definition: treelist.c:76
PVOID HANDLE
Definition: typedefs.h:73
uint32_t ULONG
Definition: typedefs.h:59
_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
Definition: wdfiotarget.h:1052
#define E_POINTER
Definition: winerror.h:2365

◆ AdviseTime()

HRESULT STDMETHODCALLTYPE CKsProxy::AdviseTime ( REFERENCE_TIME  baseTime,
REFERENCE_TIME  streamTime,
HEVENT  hEvent,
DWORD_PTR pdwAdviseCookie 
)

Implements IReferenceClock.

Definition at line 651 of file proxy.cpp.

656{
657 HRESULT hr;
661
662#ifdef KSPROXY_TRACE
663 OutputDebugStringW(L"CKsProxy::AdviseTime\n");
664#endif
665
666 //
667 //FIXME locks
668 //
669
670 if (!pdwAdviseCookie)
671 return E_POINTER;
672
673 if (!m_hClock)
674 {
675 // create clock
677 if (FAILED(hr))
678 return hr;
679 }
680
681 // allocate event entry
683 if (Event)
684 {
685 // setup request
689
690 Event->EventData.NotificationType = KSEVENTF_EVENT_HANDLE;
691 Event->EventData.EventHandle.Event = (HANDLE)hEvent;
692 Event->EventData.Alignment.Alignment[0] = 0;
693 Event->EventData.Alignment.Alignment[1] = 0;
694 Event->MarkTime = baseTime + streamTime;
695
696 // perform request
698 if (SUCCEEDED(hr))
699 {
700 // store event handle
701 *pdwAdviseCookie = (DWORD_PTR)Event;
702 }
703 else
704 {
705 // failed to enable event
707 }
708 }
709 else
710 {
712 }
713
714 return hr;
715}
@ KSEVENT_CLOCK_POSITION_MARK
Definition: ks.h:336
#define KSEVENTF_EVENT_HANDLE
Definition: ks.h:1778
struct KSEVENT_TIME_MARK * PKSEVENT_TIME_MARK
static HANDLE hEvent
Definition: comm.c:54

◆ CheckCapabilities()

HRESULT STDMETHODCALLTYPE CKsProxy::CheckCapabilities ( DWORD pCapabilities)

Implements IMediaSeeking.

Definition at line 881 of file proxy.cpp.

883{
885 HRESULT hr;
886
887#ifdef KSPROXY_TRACE
888 OutputDebugStringW(L"CKsProxy::CheckCapabilities\n");
889#endif
890
891 if (!pCapabilities)
892 return E_POINTER;
893
894 if (!*pCapabilities)
895 return E_FAIL;
896
898 if (SUCCEEDED(hr))
899 {
900 if ((Capabilities | *pCapabilities) == Capabilities)
901 {
902 // all present
903 return S_OK;
904 }
905
906 Capabilities = (Capabilities & *pCapabilities);
907 if (Capabilities)
908 {
909 // not all present
910 *pCapabilities = Capabilities;
911 return S_FALSE;
912 }
913 // no capabilities are present
914 return E_FAIL;
915 }
916
917 return hr;
918}
HRESULT STDMETHODCALLTYPE GetCapabilities(DWORD *pCapabilities)
Definition: proxy.cpp:822
#define E_FAIL
Definition: ddrawi.h:102
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
#define S_OK
Definition: intsafe.h:52
#define S_FALSE
Definition: winerror.h:2357

◆ ConvertTimeFormat()

HRESULT STDMETHODCALLTYPE CKsProxy::ConvertTimeFormat ( LONGLONG pTarget,
const GUID pTargetFormat,
LONGLONG  Source,
const GUID pSourceFormat 
)

Implements IMediaSeeking.

Definition at line 1358 of file proxy.cpp.

1363{
1366 GUID SourceFormat, TargetFormat;
1367 HRESULT hr;
1368
1372
1373#ifdef KSPROXY_TRACE
1374 OutputDebugStringW(L"CKsProxy::ConvertTimeFormat\n");
1375#endif
1376
1377 if (!pTargetFormat)
1378 {
1379 // get current format
1380 hr = GetTimeFormat(&TargetFormat);
1381 if (FAILED(hr))
1382 return hr;
1383
1384 pTargetFormat = &TargetFormat;
1385 }
1386
1387 if (!pSourceFormat)
1388 {
1389 // get current format
1390 hr = GetTimeFormat(&SourceFormat);
1391 if (FAILED(hr))
1392 return hr;
1393
1394 pSourceFormat = &SourceFormat;
1395 }
1396
1397 Property.SourceFormat = *pSourceFormat;
1398 Property.TargetFormat = *pTargetFormat;
1399 Property.Time = Source;
1400
1401
1404 {
1405 //default error
1406 hr = E_NOTIMPL;
1407
1408 // check if plugins support it
1409 for(Index = 0; Index < m_Plugins.size(); Index++)
1410 {
1411 // get plugin
1412 IUnknown * Plugin = m_Plugins[Index];
1413
1414 if (!Plugin)
1415 continue;
1416
1417 // query for IMediaSeeking interface
1418 IMediaSeeking *pSeek = NULL;
1419 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1420 if (SUCCEEDED(hr))
1421 {
1422 // convert time format
1423 hr = pSeek->ConvertTimeFormat(pTarget, pTargetFormat, Source, pSourceFormat);
1424 // release IMediaSeeking interface
1425 pSeek->Release();
1426
1427 if (hr != S_FALSE) // plugin implements it
1428 break;
1429 }
1430 }
1431 }
1432
1433 return hr;
1434}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
nsrefcnt Release()
#define KSPROPSETID_MediaSeeking
Definition: ks.h:473
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
@ KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT
Definition: ks.h:485
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
Property(long _type, long _tag, INREAL _value)
Definition: reader.h:125
int64_t LONGLONG
Definition: typedefs.h:68
_In_ WDFCOLLECTION _In_ ULONG Index
#define ERROR_SET_NOT_FOUND
Definition: winerror.h:692
#define SEVERITY_ERROR
Definition: winerror.h:65
#define FACILITY_WIN32
Definition: winerror.h:27
#define ERROR_NOT_FOUND
Definition: winerror.h:690
#define GetTimeFormat
Definition: winnls.h:1189

◆ CreateClockInstance()

HRESULT STDMETHODCALLTYPE CKsProxy::CreateClockInstance ( )

Definition at line 393 of file proxy.cpp.

394{
395 HRESULT hr;
397 ULONG Index;
398 PIN_DIRECTION PinDir;
399 IKsObject *pObject;
401
402 // find output pin and handle
403 for(Index = 0; Index < m_Pins.size(); Index++)
404 {
405 //get pin
406 IPin * pin = m_Pins[Index];
407 if (!pin)
408 continue;
409
410 // get direction
411 hr = pin->QueryDirection(&PinDir);
412 if (FAILED(hr))
413 continue;
414
415 // query IKsObject interface
416 hr = pin->QueryInterface(IID_IKsObject, (void**)&pObject);
417 if (FAILED(hr))
418 continue;
419
420
421 // get pin handle
422 hPin = pObject->KsGetObjectHandle();
423
424 //release IKsObject
425 pObject->Release();
426
427 if (hPin != INVALID_HANDLE_VALUE)
428 break;
429 }
430
431 if (hPin == INVALID_HANDLE_VALUE)
432 {
433 // clock can only be instantiated on a pin handle
434 return E_NOTIMPL;
435 }
436
437 if (m_hClock)
438 {
439 // release clock handle
441 }
442
443 //setup clock create request
445
446 // setup clock create request
447 hr = KsCreateClock(hPin, &ClockCreate, &m_hClock); // FIXME KsCreateClock returns NTSTATUS
448 if (SUCCEEDED(hr))
449 {
450 // failed to create clock
452 }
453
454 return S_OK;
455}
enum _PinDirection PIN_DIRECTION
virtual ULONG Release(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxobject.hpp:853
const GUID IID_IKsObject
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
FxObject * pObject
Definition: axcore.idl:92
_In_ PKSCLOCK_CREATE ClockCreate
Definition: ks.h:4527
KSDDKAPI DWORD NTAPI KsCreateClock(HANDLE ConnectionHandle, PKSCLOCK_CREATE ClockCreate, PHANDLE ClockHandle)
Definition: ksuser.c:145
ULONG CreateFlags
Definition: ks.h:1857
Definition: regsvr.c:104
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by AdvisePeriodic(), AdviseTime(), GetTime(), PerformClockProperty(), and QueryInterface().

◆ CreateNodeInstance()

HRESULT STDMETHODCALLTYPE CKsProxy::CreateNodeInstance ( ULONG  NodeId,
ULONG  Flags,
ACCESS_MASK  DesiredAccess,
IUnknown UnkOuter,
REFGUID  InterfaceId,
LPVOID Interface 
)

Definition at line 1883 of file proxy.cpp.

1890{
1891 HRESULT hr;
1892
1893#ifdef KSPROXY_TRACE
1894 OutputDebugStringW(L"CKsProxy::CreateNodeInstance\n");
1895#endif
1896
1897 *Interface = NULL;
1898
1899 if (IsEqualIID(IID_IUnknown, InterfaceId) || !UnkOuter)
1900 {
1901 hr = CKsNode_Constructor(UnkOuter, m_hDevice, NodeId, DesiredAccess, InterfaceId, Interface);
1902 }
1903 else
1904 {
1905 // interface not supported
1906 hr = E_NOINTERFACE;
1907 }
1908
1909 return hr;
1910}
const GUID IID_IUnknown
HRESULT WINAPI CKsNode_Constructor(IUnknown *pUnkOuter, HANDLE ParentHandle, ULONG NodeId, ACCESS_MASK DesiredAccess, REFIID riid, LPVOID *ppv)
Definition: node.cpp:115
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ CreatePins()

HRESULT STDMETHODCALLTYPE CKsProxy::CreatePins ( )

Definition at line 2450 of file proxy.cpp.

2451{
2452 ULONG NumPins, Index;
2453 KSPIN_CINSTANCES Instances;
2455 KSPIN_COMMUNICATION Communication;
2456 HRESULT hr;
2457 LPWSTR PinName;
2458 IPin * pPin;
2459 ULONG InputPin = 0;
2460 ULONG OutputPin = 0;
2461
2462 // get number of pins
2463 hr = GetNumberOfPins(&NumPins);
2464 if (FAILED(hr))
2465 return hr;
2466
2467 for(Index = 0; Index < NumPins; Index++)
2468 {
2469 // query current instance count
2470 hr = GetPinInstanceCount(Index, &Instances);
2471 if (FAILED(hr))
2472 {
2473#ifdef KSPROXY_TRACE
2474 WCHAR Buffer[100];
2475 swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
2477#endif
2478 continue;
2479 }
2480
2481
2482 // query pin communication;
2483 hr = GetPinCommunication(Index, &Communication);
2484 if (FAILED(hr))
2485 {
2486#ifdef KSPROXY_TRACE
2487 WCHAR Buffer[100];
2488 swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
2490#endif
2491 continue;
2492 }
2493
2494 if (Instances.CurrentCount == Instances.PossibleCount)
2495 {
2496 // already maximum reached for this pin
2497#ifdef KSPROXY_TRACE
2498 WCHAR Buffer[100];
2499 swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n");
2501#endif
2502 continue;
2503 }
2504
2505 // get direction of pin
2507 if (FAILED(hr))
2508 {
2509#ifdef KSPROXY_TRACE
2510 WCHAR Buffer[100];
2511 swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
2513#endif
2514 continue;
2515 }
2516
2518 hr = GetPinName(Index, DataFlow, InputPin, &PinName);
2519 else
2520 hr = GetPinName(Index, DataFlow, OutputPin, &PinName);
2521
2522 if (FAILED(hr))
2523 {
2524#ifdef KSPROXY_TRACE
2525 WCHAR Buffer[100];
2526 swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
2528#endif
2529 continue;
2530 }
2531
2532 // construct the pins
2534 {
2535 hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin);
2536 if (FAILED(hr))
2537 {
2538#ifdef KSPROXY_TRACE
2539 WCHAR Buffer[100];
2540 swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr);
2542#endif
2543 CoTaskMemFree(PinName);
2544 continue;
2545 }
2546 InputPin++;
2547 }
2548 else
2549 {
2550 hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin);
2551 if (FAILED(hr))
2552 {
2553#ifdef KSPROXY_TRACE
2554 WCHAR Buffer[100];
2555 swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr);
2557#endif
2558 CoTaskMemFree(PinName);
2559 continue;
2560 }
2561 OutputPin++;
2562 }
2563
2564 // store pins
2565 m_Pins.push_back(pPin);
2566
2567#ifdef KSPROXY_TRACE
2568 WCHAR Buffer[100];
2569 swprintf(Buffer, L"Index %lu DataFlow %lu Name %s\n", Index, DataFlow, PinName);
2571#endif
2572
2573 }
2574
2575 return S_OK;
2576}
Definition: bufpool.h:45
HRESULT STDMETHODCALLTYPE GetPinInstanceCount(ULONG PinId, PKSPIN_CINSTANCES Instances)
Definition: proxy.cpp:2323
HRESULT STDMETHODCALLTYPE GetPinCommunication(ULONG PinId, KSPIN_COMMUNICATION *Communication)
Definition: proxy.cpp:2342
HRESULT STDMETHODCALLTYPE GetPinDataflow(ULONG PinId, KSPIN_DATAFLOW *DataFlow)
Definition: proxy.cpp:2361
HRESULT STDMETHODCALLTYPE GetNumberOfPins(PULONG NumPins)
Definition: proxy.cpp:2307
HRESULT STDMETHODCALLTYPE GetPinName(ULONG PinId, KSPIN_DATAFLOW DataFlow, ULONG PinCount, LPWSTR *OutPinName)
Definition: proxy.cpp:2380
DataFlow
#define swprintf
Definition: precomp.h:40
HRESULT WINAPI CInputPin_Constructor(IBaseFilter *ParentFilter, LPCWSTR PinName, HANDLE hFilter, ULONG PinId, KSPIN_COMMUNICATION Communication, REFIID riid, LPVOID *ppv)
Definition: input_pin.cpp:1766
KSPIN_DATAFLOW
Definition: ks.h:1248
@ KSPIN_DATAFLOW_IN
Definition: ks.h:1249
KSPIN_COMMUNICATION
Definition: ks.h:1253
HRESULT WINAPI COutputPin_Constructor(IBaseFilter *ParentFilter, LPCWSTR PinName, ULONG PinId, KSPIN_COMMUNICATION Communication, REFIID riid, LPVOID *ppv)
const GUID IID_IPin
Definition: pincontrol.cpp:15
ULONG CurrentCount
Definition: ks.h:652
ULONG PossibleCount
Definition: ks.h:651
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by Load().

◆ DeviceInfo()

HRESULT STDMETHODCALLTYPE CKsProxy::DeviceInfo ( CLSID pclsidInterfaceClass,
LPWSTR pwszSymbolicLink 
)

Definition at line 2063 of file proxy.cpp.

2064{
2065#ifdef KSPROXY_TRACE
2066 OutputDebugStringW(L"CKsProxy::DeviceInfo\n");
2067#endif
2068
2069 if (!m_DevicePath)
2070 {
2071 // object not initialized
2073 }
2074
2075 // copy device interface guid
2076 CopyMemory(pclsidInterfaceClass, &m_DeviceInterfaceGUID, sizeof(GUID));
2077
2078 if (pwszSymbolicLink)
2079 {
2080 *pwszSymbolicLink = (LPWSTR)CoTaskMemAlloc((wcslen(m_DevicePath)+1) * sizeof(WCHAR));
2081 if (!*pwszSymbolicLink)
2082 return E_OUTOFMEMORY;
2083
2084 wcscpy(*pwszSymbolicLink, m_DevicePath);
2085 }
2086 return S_OK;
2087}
CLSID m_DeviceInterfaceGUID
Definition: proxy.cpp:196
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define CopyMemory
Definition: winbase.h:1710

◆ Disassociate()

HRESULT STDMETHODCALLTYPE CKsProxy::Disassociate ( void  )

Definition at line 2115 of file proxy.cpp.

2116{
2117#ifdef KSPROXY_TRACE
2118 OutputDebugStringW(L"CKsProxy::Disassociate\n");
2119#endif
2120
2121 if (!m_hDevice)
2122 return E_HANDLE;
2123
2125 m_hDevice = NULL;
2126 return NOERROR;
2127}
#define E_HANDLE
Definition: winerror.h:2850
#define NOERROR
Definition: winerror.h:2354

◆ EnumPins()

HRESULT STDMETHODCALLTYPE CKsProxy::EnumPins ( IEnumPins **  ppEnum)

Implements IBaseFilter.

Definition at line 3030 of file proxy.cpp.

3032{
3033 return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum);
3034}
HRESULT WINAPI CEnumPins_fnConstructor(std::vector< IPin * > Pins, REFIID riid, LPVOID *ppv)
Definition: enumpins.cpp:151

◆ FindPin()

HRESULT STDMETHODCALLTYPE CKsProxy::FindPin ( LPCWSTR  Id,
IPin **  ppPin 
)

Implements IBaseFilter.

Definition at line 3038 of file proxy.cpp.

3040{
3041 ULONG PinId;
3042
3043#ifdef KSPROXY_TRACE
3044 OutputDebugStringW(L"CKsProxy::FindPin\n");
3045#endif
3046
3047 if (!ppPin)
3048 return E_POINTER;
3049
3050 // convert to pin
3051 int ret = swscanf(Id, L"%u", &PinId);
3052
3053 if (!ret || ret == EOF)
3054 {
3055 // invalid id
3056 return VFW_E_NOT_FOUND;
3057 }
3058
3059 if (PinId >= m_Pins.size() || m_Pins[PinId] == NULL)
3060 {
3061 // invalid id
3062 return VFW_E_NOT_FOUND;
3063 }
3064
3065 // found pin
3066 *ppPin = m_Pins[PinId];
3067 m_Pins[PinId]->AddRef();
3068
3069 return S_OK;
3070}
DWORD Id
_Check_return_ _CRTIMP int __cdecl swscanf(_In_z_ const wchar_t *_Src, _In_z_ _Scanf_format_string_ const wchar_t *_Format,...)
#define EOF
Definition: stdio.h:24
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
int ret

◆ Get()

HRESULT STDMETHODCALLTYPE CKsProxy::Get ( REFGUID  guidPropSet,
DWORD  dwPropID,
LPVOID  pInstanceData,
DWORD  cbInstanceData,
LPVOID  pPropData,
DWORD  cbPropData,
DWORD pcbReturned 
)

Implements IKsPropertySet.

Definition at line 1812 of file proxy.cpp.

1820{
1822
1823#ifdef KSPROXY_TRACE
1824 OutputDebugStringW(L"CKsProxy::Get\n");
1825#endif
1826
1827 if (cbInstanceData)
1828 {
1829 PKSPROPERTY Property = (PKSPROPERTY)CoTaskMemAlloc(sizeof(KSPROPERTY) + cbInstanceData);
1830 if (!Property)
1831 return E_OUTOFMEMORY;
1832
1833 Property->Set = guidPropSet;
1834 Property->Id = dwPropID;
1836
1837 CopyMemory((Property+1), pInstanceData, cbInstanceData);
1838
1839 HRESULT hr = KsProperty(Property, sizeof(KSPROPERTY) + cbInstanceData, pPropData, cbPropData, &BytesReturned);
1841 return hr;
1842 }
1843 else
1844 {
1846
1847 Property.Set = guidPropSet;
1848 Property.Id = dwPropID;
1850
1851 HRESULT hr = KsProperty(&Property, sizeof(KSPROPERTY), pPropData, cbPropData, &BytesReturned);
1852 return hr;
1853 }
1854}
HRESULT STDMETHODCALLTYPE KsProperty(PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData, ULONG DataLength, ULONG *BytesReturned)
Definition: proxy.cpp:1709
struct KSIDENTIFIER * PKSPROPERTY

◆ GetAvailable()

HRESULT STDMETHODCALLTYPE CKsProxy::GetAvailable ( LONGLONG pEarliest,
LONGLONG pLatest 
)

Implements IMediaSeeking.

Definition at line 1534 of file proxy.cpp.

1537{
1541 HRESULT hr;
1542
1546
1547#ifdef KSPROXY_TRACE
1548 OutputDebugStringW(L"CKsProxy::GetAvailable\n");
1549#endif
1550
1553 {
1554 // check if plugins support it
1555 for(Index = 0; Index < m_Plugins.size(); Index++)
1556 {
1557 hr = E_NOTIMPL;
1558 // get plugin
1559 IUnknown * Plugin = m_Plugins[Index];
1560
1561 if (!Plugin)
1562 continue;
1563
1564 // query for IMediaSeeking interface
1565 IMediaSeeking *pSeek = NULL;
1566 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1567 if (SUCCEEDED(hr))
1568 {
1569 // delegate call
1570 hr = pSeek->GetAvailable(pEarliest, pLatest);
1571 // release IMediaSeeking interface
1572 pSeek->Release();
1573
1574 if (hr != S_FALSE) // plugin implements it
1575 break;
1576 }
1577 }
1578 }
1579 else if (SUCCEEDED(hr))
1580 {
1581 *pEarliest = Media.Earliest;
1582 *pLatest = Media.Latest;
1583 }
1584
1585 return hr;
1586}
@ KSPROPERTY_MEDIASEEKING_AVAILABLE
Definition: ks.h:483

◆ GetCapabilities()

HRESULT STDMETHODCALLTYPE CKsProxy::GetCapabilities ( DWORD pCapabilities)

Implements IMediaSeeking.

Definition at line 822 of file proxy.cpp.

824{
827 HRESULT hr = S_OK;
828 DWORD TempCaps;
829
833
834#ifdef KSPROXY_TRACE
835 OutputDebugStringW(L"CKsProxy::GetCapabilities\n");
836#endif
837
838
839 if (!pCapabilities)
840 return E_POINTER;
841
842
845
847 // check if plugins support it
848 for(Index = 0; Index < m_Plugins.size(); Index++)
849 {
850 // get plugin
851 IUnknown * Plugin = m_Plugins[Index];
852
853 if (!Plugin)
854 continue;
855
856 // query for IMediaSeeking interface
857 IMediaSeeking *pSeek = NULL;
858 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
859 if (FAILED(hr))
860 {
861 *pCapabilities = 0;
862 return hr;
863 }
864
865 TempCaps = 0;
866 // set time format
867 hr = pSeek->GetCapabilities(&TempCaps);
868 if (SUCCEEDED(hr))
869 {
870 // and with supported flags
871 *pCapabilities = (*pCapabilities & TempCaps);
872 }
873 // release IMediaSeeking interface
874 pSeek->Release();
875 }
876 return hr;
877}
KS_SEEKING_CAPABILITIES
Definition: ks.h:498
@ KS_SEEKING_CanSeekForwards
Definition: ks.h:500
@ KS_SEEKING_CanPlayBackwards
Definition: ks.h:505
@ KS_SEEKING_CanSeekAbsolute
Definition: ks.h:499
@ KS_SEEKING_CanGetCurrentPos
Definition: ks.h:502
@ KS_SEEKING_CanGetDuration
Definition: ks.h:504
@ KS_SEEKING_CanGetStopPos
Definition: ks.h:503
@ KS_SEEKING_CanSeekBackwards
Definition: ks.h:501
@ KSPROPERTY_MEDIASEEKING_CAPABILITIES
Definition: ks.h:476

Referenced by CheckCapabilities().

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CKsProxy::GetClassID ( CLSID pClassID)

Implements IPersist.

Definition at line 2704 of file proxy.cpp.

2706{
2707#ifdef KSPROXY_TRACE
2708 OutputDebugStringW(L"CKsProxy::GetClassID\n");
2709#endif
2710 CopyMemory(pClassID, &CLSID_Proxy, sizeof(GUID));
2711
2712 return S_OK;
2713}

◆ GetCurrentPosition()

HRESULT STDMETHODCALLTYPE CKsProxy::GetCurrentPosition ( LONGLONG pCurrent)

Implements IMediaSeeking.

Definition at line 1310 of file proxy.cpp.

1312{
1315 HRESULT hr;
1316
1320
1321#ifdef KSPROXY_TRACE
1322 OutputDebugStringW(L"CKsProxy::GetCurrentPosition\n");
1323#endif
1324
1327 {
1328 // check if plugins support it
1329 for(Index = 0; Index < m_Plugins.size(); Index++)
1330 {
1331 hr = E_NOTIMPL;
1332 // get plugin
1333 IUnknown * Plugin = m_Plugins[Index];
1334
1335 if (!Plugin)
1336 continue;
1337
1338 // query for IMediaSeeking interface
1339 IMediaSeeking *pSeek = NULL;
1340 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1341 if (SUCCEEDED(hr))
1342 {
1343 // get current position
1344 hr = pSeek->GetCurrentPosition(pCurrent);
1345 // release IMediaSeeking interface
1346 pSeek->Release();
1347
1348 if (hr != S_FALSE) // plugin implements it
1349 break;
1350 }
1351 }
1352 }
1353 return hr;
1354}
@ KSPROPERTY_MEDIASEEKING_POSITION
Definition: ks.h:479

Referenced by GetPositions(), and SetPositions().

◆ GetDuration()

HRESULT STDMETHODCALLTYPE CKsProxy::GetDuration ( LONGLONG pDuration)

Implements IMediaSeeking.

Definition at line 1214 of file proxy.cpp.

1216{
1219 HRESULT hr;
1220
1224
1225#ifdef KSPROXY_TRACE
1226 OutputDebugStringW(L"CKsProxy::GetDuration\n");
1227#endif
1228
1231 {
1232 // check if plugins support it
1233 for(Index = 0; Index < m_Plugins.size(); Index++)
1234 {
1235 hr = E_NOTIMPL;
1236 // get plugin
1237 IUnknown * Plugin = m_Plugins[Index];
1238
1239 if (!Plugin)
1240 continue;
1241
1242 // query for IMediaSeeking interface
1243 IMediaSeeking *pSeek = NULL;
1244 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1245 if (SUCCEEDED(hr))
1246 {
1247 // get duration
1248 hr = pSeek->GetStopPosition(pDuration);
1249 // release IMediaSeeking interface
1250 pSeek->Release();
1251
1252 if (hr != S_FALSE) // plugin implements it
1253 break;
1254 }
1255 }
1256 }
1257 return hr;
1258}
@ KSPROPERTY_MEDIASEEKING_DURATION
Definition: ks.h:482

◆ GetMediaSeekingFormats()

HRESULT STDMETHODCALLTYPE CKsProxy::GetMediaSeekingFormats ( PKSMULTIPLE_ITEM FormatList)

Definition at line 922 of file proxy.cpp.

924{
926 HRESULT hr;
928
932
933 // query for format size list
935
937 {
938 // allocate format list
940 if (!*FormatList)
941 {
942 // not enough memory
943 return E_OUTOFMEMORY;
944 }
945
946 // get format list
948 if (FAILED(hr))
949 {
950 // failed to query format list
951 CoTaskMemFree(FormatList);
952 }
953 }
954 return hr;
955}
#define ERROR_MORE_DATA
Definition: dderror.h:13
@ KSPROPERTY_MEDIASEEKING_FORMATS
Definition: ks.h:477
struct KSMULTIPLE_ITEM * PKSMULTIPLE_ITEM

Referenced by IsFormatSupported(), and QueryPreferredFormat().

◆ GetMiscFlags()

ULONG STDMETHODCALLTYPE CKsProxy::GetMiscFlags ( void  )

Implements IAMFilterMiscFlags.

Definition at line 1664 of file proxy.cpp.

1665{
1666 ULONG Index;
1667 ULONG Flags = 0;
1668 HRESULT hr;
1669 PIN_DIRECTION PinDirection;
1670 KSPIN_COMMUNICATION Communication;
1671
1672
1673 for(Index = 0; Index < m_Pins.size(); Index++)
1674 {
1675 // get current pin
1676 IPin * pin = m_Pins[Index];
1677 // query direction
1678 hr = pin->QueryDirection(&PinDirection);
1679 if (SUCCEEDED(hr))
1680 {
1681 if (PinDirection == PINDIR_INPUT)
1682 {
1683 if (SUCCEEDED(GetPinCommunication(Index, //FIXME verify PinId
1684 &Communication)))
1685 {
1686 if (Communication != KSPIN_COMMUNICATION_NONE && Communication != KSPIN_COMMUNICATION_BRIDGE)
1687 {
1689 }
1690 }
1691 }
1692 }
1693 }
1694
1695#ifdef KSPROXY_TRACE
1696 WCHAR Buffer[100];
1697 swprintf(Buffer, L"CKsProxy::GetMiscFlags stub Flags %x\n", Flags);
1699#endif
1700
1701 return Flags;
1702}
@ PINDIR_INPUT
Definition: axcore.idl:41
@ AM_FILTER_MISC_FLAGS_IS_SOURCE
Definition: axextend.idl:1240
@ KSPIN_COMMUNICATION_BRIDGE
Definition: ks.h:1258
@ KSPIN_COMMUNICATION_NONE
Definition: ks.h:1254
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ GetNumberOfPins()

HRESULT STDMETHODCALLTYPE CKsProxy::GetNumberOfPins ( PULONG  NumPins)

Definition at line 2307 of file proxy.cpp.

2309{
2312
2313 // setup request
2317
2319}
#define KSPROPSETID_Pin
Definition: ks.h:617
@ KSPROPERTY_PIN_CTYPES
Definition: ks.h:626

Referenced by CreatePins().

◆ GetPages()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPages ( CAUUID pPages)

Implements ISpecifyPropertyPages.

Definition at line 372 of file proxy.cpp.

373{
374#ifdef KSPROXY_TRACE
375 OutputDebugStringW(L"CKsProxy::GetPages NotImplemented\n");
376#endif
377
378 if (!pPages)
379 return E_POINTER;
380
381 pPages->cElems = 0;
382 pPages->pElems = NULL;
383
384 return S_OK;
385}

◆ GetPinCommunication()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPinCommunication ( ULONG  PinId,
KSPIN_COMMUNICATION Communication 
)

Definition at line 2342 of file proxy.cpp.

2345{
2348
2349 // setup request
2353 Property.PinId = PinId;
2354 Property.Reserved = 0;
2355
2357}
@ KSPROPERTY_PIN_COMMUNICATION
Definition: ks.h:632
Definition: ks.h:642

Referenced by CreatePins(), and GetMiscFlags().

◆ GetPinDataflow()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPinDataflow ( ULONG  PinId,
KSPIN_DATAFLOW DataFlow 
)

Definition at line 2361 of file proxy.cpp.

2364{
2367
2368 // setup request
2372 Property.PinId = PinId;
2373 Property.Reserved = 0;
2374
2376}
@ KSPROPERTY_PIN_DATAFLOW
Definition: ks.h:627

Referenced by CreatePins().

◆ GetPinInstanceCount()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPinInstanceCount ( ULONG  PinId,
PKSPIN_CINSTANCES  Instances 
)

Definition at line 2323 of file proxy.cpp.

2326{
2329
2330 // setup request
2334 Property.PinId = PinId;
2335 Property.Reserved = 0;
2336
2338}
@ KSPROPERTY_PIN_CINSTANCES
Definition: ks.h:625

Referenced by CreatePins().

◆ GetPinName()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPinName ( ULONG  PinId,
KSPIN_DATAFLOW  DataFlow,
ULONG  PinCount,
LPWSTR OutPinName 
)

Definition at line 2380 of file proxy.cpp.

2385{
2387 LPWSTR PinName;
2389 HRESULT hr;
2390 WCHAR Buffer[100];
2391
2392 // setup request
2396 Property.PinId = PinId;
2397 Property.Reserved = 0;
2398
2399 // #1 try get it from pin directly
2401
2403 {
2404 // allocate pin name
2406 if (!PinName)
2407 return E_OUTOFMEMORY;
2408
2409 // retry with allocated buffer
2411 if (SUCCEEDED(hr))
2412 {
2413 *OutPinName = PinName;
2414 return hr;
2415 }
2416
2417 //free buffer
2418 CoTaskMemFree(PinName);
2419 }
2420
2421 //
2422 // TODO: retrieve pin name from topology node
2423 //
2424
2426 {
2427 swprintf(Buffer, L"Input%lu", PinCount);
2428 }
2429 else
2430 {
2431 swprintf(Buffer, L"Output%lu", PinCount);
2432 }
2433
2434 // allocate pin name
2435 PinName = (LPWSTR)CoTaskMemAlloc((wcslen(Buffer)+1) * sizeof(WCHAR));
2436 if (!PinName)
2437 return E_OUTOFMEMORY;
2438
2439 // copy pin name
2440 wcscpy(PinName, Buffer);
2441
2442 // store result
2443 *OutPinName = PinName;
2444 // done
2445 return S_OK;
2446}
@ KSPROPERTY_PIN_NAME
Definition: ks.h:637
_In_ const GUID _In_ ULONG PinCount
Definition: strmini.h:505

Referenced by CreatePins().

◆ GetPositions()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPositions ( LONGLONG pCurrent,
LONGLONG pStop 
)

Implements IMediaSeeking.

Definition at line 1515 of file proxy.cpp.

1518{
1519 HRESULT hr;
1520
1521#ifdef KSPROXY_TRACE
1522 OutputDebugStringW(L"CKsProxy::GetPositions\n");
1523#endif
1524
1525 hr = GetCurrentPosition(pCurrent);
1526 if (SUCCEEDED(hr))
1527 hr = GetStopPosition(pStop);
1528
1529 return hr;
1530}
HRESULT STDMETHODCALLTYPE GetStopPosition(LONGLONG *pStop)
Definition: proxy.cpp:1262
HRESULT STDMETHODCALLTYPE GetCurrentPosition(LONGLONG *pCurrent)
Definition: proxy.cpp:1310

◆ GetPreroll()

HRESULT STDMETHODCALLTYPE CKsProxy::GetPreroll ( LONGLONG pllPreroll)

Implements IMediaSeeking.

Definition at line 1612 of file proxy.cpp.

1614{
1617 HRESULT hr;
1618
1622
1623#ifdef KSPROXY_TRACE
1624 OutputDebugStringW(L"CKsProxy::GetPreroll\n");
1625#endif
1626
1629 {
1630 // check if all plugins support it
1631 for(Index = 0; Index < m_Plugins.size(); Index++)
1632 {
1633 // get plugin
1634 IUnknown * Plugin = m_Plugins[Index];
1635
1636 if (!Plugin)
1637 continue;
1638
1639 // query for IMediaSeeking interface
1640 IMediaSeeking *pSeek = NULL;
1641 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1642 if (SUCCEEDED(hr))
1643 {
1644 // get preroll
1645 hr = pSeek->GetPreroll(pllPreroll);
1646 // release IMediaSeeking interface
1647 pSeek->Release();
1648
1649 if (hr != S_FALSE) // plugin implements it
1650 break;
1651 }
1652 }
1653 hr = E_NOTIMPL;
1654 }
1655 return hr;
1656}
@ KSPROPERTY_MEDIASEEKING_PREROLL
Definition: ks.h:484

◆ GetRate()

HRESULT STDMETHODCALLTYPE CKsProxy::GetRate ( double pdRate)

Implements IMediaSeeking.

Definition at line 1601 of file proxy.cpp.

1603{
1604#ifdef KSPROXY_TRACE
1605 OutputDebugStringW(L"CKsProxy::GetRate\n");
1606#endif
1607 return E_NOTIMPL;
1608}

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CKsProxy::GetSizeMax ( ULARGE_INTEGER pcbSize)

Implements IPersistStream.

Definition at line 2047 of file proxy.cpp.

2049{
2050#ifdef KSPROXY_TRACE
2051 OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
2052#endif
2053
2054 return E_NOTIMPL;
2055}

◆ GetState()

HRESULT STDMETHODCALLTYPE CKsProxy::GetState ( DWORD  dwMilliSecsTimeout,
FILTER_STATE State 
)

Implements IMediaFilter.

Definition at line 2881 of file proxy.cpp.

2884{
2885 if (!State)
2886 return E_POINTER;
2887
2889 return S_OK;
2890}

◆ GetStopPosition()

HRESULT STDMETHODCALLTYPE CKsProxy::GetStopPosition ( LONGLONG pStop)

Implements IMediaSeeking.

Definition at line 1262 of file proxy.cpp.

1264{
1267 HRESULT hr;
1268
1272
1273#ifdef KSPROXY_TRACE
1274 OutputDebugStringW(L"CKsProxy::GetStopPosition\n");
1275#endif
1276
1279 {
1280 // check if plugins support it
1281 for(Index = 0; Index < m_Plugins.size(); Index++)
1282 {
1283 hr = E_NOTIMPL;
1284 // get plugin
1285 IUnknown * Plugin = m_Plugins[Index];
1286
1287 if (!Plugin)
1288 continue;
1289
1290 // query for IMediaSeeking interface
1291 IMediaSeeking *pSeek = NULL;
1292 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1293 if (SUCCEEDED(hr))
1294 {
1295 // get stop position
1296 hr = pSeek->GetStopPosition(pStop);
1297 // release IMediaSeeking interface
1298 pSeek->Release();
1299
1300 if (hr != S_FALSE) // plugin implements it
1301 break;
1302 }
1303 }
1304 }
1305 return hr;
1306}
@ KSPROPERTY_MEDIASEEKING_STOPPOSITION
Definition: ks.h:480

Referenced by GetPositions(), and SetPositions().

◆ GetSupportedSets()

HRESULT STDMETHODCALLTYPE CKsProxy::GetSupportedSets ( LPGUID pOutGuid,
PULONG  NumGuids 
)

Definition at line 2176 of file proxy.cpp.

2179{
2181 LPGUID pGuid;
2182 ULONG NumProperty = 0;
2183 ULONG NumMethods = 0;
2184 ULONG NumEvents = 0;
2185 ULONG Length;
2187 HRESULT hr;
2188
2189 Property.Set = GUID_NULL;
2190 Property.Id = 0;
2192
2196
2197 Length = NumProperty + NumMethods + NumEvents;
2198
2199 // allocate guid buffer
2200 pGuid = (LPGUID)CoTaskMemAlloc(Length);
2201 if (!pGuid)
2202 {
2203 // failed
2204 return E_OUTOFMEMORY;
2205 }
2206
2207 NumProperty /= sizeof(GUID);
2208 NumMethods /= sizeof(GUID);
2209 NumEvents /= sizeof(GUID);
2210
2211 // get all properties
2213 if (FAILED(hr))
2214 {
2215 CoTaskMemFree(pGuid);
2216 return E_FAIL;
2217 }
2219
2220 // get all methods
2221 if (Length)
2222 {
2224 if (FAILED(hr))
2225 {
2226 CoTaskMemFree(pGuid);
2227 return E_FAIL;
2228 }
2230 }
2231
2232 // get all events
2233 if (Length)
2234 {
2236 if (FAILED(hr))
2237 {
2238 CoTaskMemFree(pGuid);
2239 return E_FAIL;
2240 }
2242 }
2243
2244#ifdef KSPROXY_TRACE
2245 WCHAR Buffer[200];
2246 swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
2248#endif
2249
2250 *pOutGuid = pGuid;
2251 *NumGuids = NumProperty+NumEvents+NumMethods;
2252 return S_OK;
2253}
#define KSPROPERTY_TYPE_SETSUPPORT
Definition: dmksctrl.h:44
#define GUID_NULL
Definition: ks.h:106
#define IOCTL_KS_METHOD
Definition: ks.h:136
@ NumMethods
Definition: actctx.c:1556
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
GUID * LPGUID
Definition: guiddef.h:81

Referenced by Load().

◆ GetSyncSource()

HRESULT STDMETHODCALLTYPE CKsProxy::GetSyncSource ( IReferenceClock **  pClock)

Implements IMediaFilter.

Definition at line 3011 of file proxy.cpp.

3013{
3014#ifdef KSPROXY_TRACE
3015 OutputDebugStringW(L"CKsProxy::GetSyncSource\n");
3016#endif
3017
3018 if (!pClock)
3019 return E_POINTER;
3020
3021 if (m_ReferenceClock)
3023
3024 *pClock = m_ReferenceClock;
3025 return S_OK;
3026}
ULONG AddRef()

◆ GetTime()

HRESULT STDMETHODCALLTYPE CKsProxy::GetTime ( REFERENCE_TIME pTime)

Implements IReferenceClock.

Definition at line 608 of file proxy.cpp.

610{
611 HRESULT hr;
614
615#ifdef KSPROXY_TRACE
616 OutputDebugStringW(L"CKsProxy::GetTime\n");
617#endif
618
619 if (!pTime)
620 return E_POINTER;
621
622 //
623 //FIXME locks
624 //
625
626 if (!m_hClock)
627 {
628 // create clock
630 if (FAILED(hr))
631 return hr;
632 }
633
634 // setup request
638
639 // perform request
641
642 // TODO
643 // increment value
644 //
645
646 return hr;
647}
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
@ KSPROPERTY_CLOCK_TIME
Definition: ks.h:318
#define KSPROPSETID_Clock
Definition: ks.h:315
_In_ PCCERT_CONTEXT _In_opt_ LPFILETIME pTime
Definition: wincrypt.h:4837

◆ GetTimeFormat()

HRESULT STDMETHODCALLTYPE CKsProxy::GetTimeFormat ( GUID pFormat)

Implements IMediaSeeking.

Definition at line 1096 of file proxy.cpp.

1098{
1101 HRESULT hr;
1102
1106
1107#ifdef KSPROXY_TRACE
1108 OutputDebugStringW(L"CKsProxy::GetTimeFormat\n");
1109#endif
1110
1113 {
1114 // check if plugins support it
1115 for(Index = 0; Index < m_Plugins.size(); Index++)
1116 {
1117 hr = E_NOTIMPL;
1118 // get plugin
1119 IUnknown * Plugin = m_Plugins[Index];
1120
1121 if (!Plugin)
1122 continue;
1123
1124 // query for IMediaSeeking interface
1125 IMediaSeeking *pSeek = NULL;
1126 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1127 if (SUCCEEDED(hr))
1128 {
1129 // set time format
1130 hr = pSeek->GetTimeFormat(pFormat);
1131 // release IMediaSeeking interface
1132 pSeek->Release();
1133
1134 if (hr != S_FALSE)
1135 break;
1136 }
1137 }
1138 }
1139 return hr;
1140}
@ KSPROPERTY_MEDIASEEKING_TIMEFORMAT
Definition: ks.h:478

◆ InitNew()

HRESULT STDMETHODCALLTYPE CKsProxy::InitNew ( void  )

Implements IPersistPropertyBag.

Definition at line 2165 of file proxy.cpp.

2166{
2167#ifdef KSPROXY_TRACE
2168 OutputDebugStringW(L"CKsProxy::InitNew\n");
2169#endif
2170
2171 return S_OK;
2172}

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CKsProxy::IsDirty ( void  )

Implements IPersistStream.

Definition at line 1945 of file proxy.cpp.

1946{
1947#ifdef KSPROXY_TRACE
1948 OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
1949#endif
1950 return E_NOTIMPL;
1951}

◆ IsFormatSupported()

HRESULT STDMETHODCALLTYPE CKsProxy::IsFormatSupported ( const GUID pFormat)

Implements IMediaSeeking.

Definition at line 959 of file proxy.cpp.

961{
962 PKSMULTIPLE_ITEM FormatList;
963 LPGUID pGuid;
964 ULONG Index;
966
967#ifdef KSPROXY_TRACE
968 WCHAR Buffer[100];
969 LPOLESTR pstr;
970 StringFromCLSID(*pFormat, &pstr);
971 swprintf(Buffer, L"CKsProxy::IsFormatSupported %s\n",pstr);
973#endif
974
975 if (!pFormat)
976 return E_POINTER;
977
978 // get media formats
979 hr = GetMediaSeekingFormats(&FormatList);
980 if (SUCCEEDED(hr))
981 {
982#ifdef KSPROXY_TRACE
983 swprintf(Buffer, L"CKsProxy::IsFormatSupported NumFormat %lu\n",FormatList->Count);
985#endif
986
987 //iterate through format list
988 pGuid = (LPGUID)(FormatList + 1);
989 for(Index = 0; Index < FormatList->Count; Index++)
990 {
991 if (IsEqualGUID(*pGuid, *pFormat))
992 {
993 CoTaskMemFree(FormatList);
994 return S_OK;
995 }
996 pGuid++;
997 }
998 // free format list
999 CoTaskMemFree(FormatList);
1000 }
1001
1002 // check if all plugins support it
1003 for(Index = 0; Index < m_Plugins.size(); Index++)
1004 {
1005 // get plugin
1006 IUnknown * Plugin = m_Plugins[Index];
1007
1008 if (!Plugin)
1009 continue;
1010
1011 // query for IMediaSeeking interface
1012 IMediaSeeking *pSeek = NULL;
1013 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1014 if (FAILED(hr))
1015 {
1016 // plugin does not support interface
1017 hr = S_FALSE;
1018#ifdef KSPROXY_TRACE
1019 OutputDebugStringW(L"CKsProxy::IsFormatSupported plugin does not support IMediaSeeking interface\n");
1020#endif
1021 break;
1022 }
1023
1024 // query if it is supported
1025 hr = pSeek->IsFormatSupported(pFormat);
1026 // release interface
1027 pSeek->Release();
1028
1029 if (FAILED(hr) || hr == S_FALSE)
1030 break;
1031 }
1032
1033 return hr;
1034}
HRESULT STDMETHODCALLTYPE GetMediaSeekingFormats(PKSMULTIPLE_ITEM *FormatList)
Definition: proxy.cpp:922
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
static LPOLESTR
Definition: stg_prop.c:27
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
ULONG Count
Definition: ks.h:1980

◆ IsUsingTimeFormat()

HRESULT STDMETHODCALLTYPE CKsProxy::IsUsingTimeFormat ( const GUID pFormat)

Implements IMediaSeeking.

Definition at line 1144 of file proxy.cpp.

1146{
1147 GUID Format;
1148
1149#ifdef KSPROXY_TRACE
1150 OutputDebugStringW(L"CKsProxy::IsUsingTimeFormat\n");
1151#endif
1152
1154 return S_FALSE;
1155
1156 if (IsEqualGUID(Format, *pFormat))
1157 return S_OK;
1158 else
1159 return S_FALSE;
1160}
HRESULT STDMETHODCALLTYPE QueryPreferredFormat(GUID *pFormat)
Definition: proxy.cpp:1038

◆ JoinFilterGraph()

HRESULT STDMETHODCALLTYPE CKsProxy::JoinFilterGraph ( IFilterGraph pGraph,
LPCWSTR  pName 
)

Implements IBaseFilter.

Definition at line 3096 of file proxy.cpp.

3099{
3100#ifdef KSPROXY_TRACE
3101 WCHAR Buffer[100];
3102 swprintf(Buffer, L"CKsProxy::JoinFilterGraph pName %s pGraph %p m_Ref %u\n", pName, pGraph, m_Ref);
3104#endif
3105
3106 if (pGraph)
3107 {
3108 // joining filter graph
3109 m_pGraph = pGraph;
3110 }
3111 else
3112 {
3113 // leaving graph
3114 m_pGraph = 0;
3115 }
3116
3117 return S_OK;
3118}
static LPSTR pName
Definition: security.c:75

◆ KsAddAggregate()

HRESULT STDMETHODCALLTYPE CKsProxy::KsAddAggregate ( IN REFGUID  AggregateClass)

Definition at line 1917 of file proxy.cpp.

1919{
1920#ifdef KSPROXY_TRACE
1921 OutputDebugStringW(L"CKsProxy::KsAddAggregate NotImplemented\n");
1922#endif
1923 return E_NOTIMPL;
1924}

◆ KsEvent()

HRESULT STDMETHODCALLTYPE CKsProxy::KsEvent ( PKSEVENT  Event,
ULONG  EventLength,
LPVOID  EventData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 1743 of file proxy.cpp.

1749{
1750#ifdef KSPROXY_TRACE
1751 OutputDebugStringW(L"CKsProxy::KsEvent\n");
1752#endif
1753
1754 assert(m_hDevice != 0);
1755 if (EventLength)
1757 else
1759}
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
#define assert(x)
Definition: debug.h:53
#define IOCTL_KS_DISABLE_EVENT
Definition: ks.h:133

◆ KsGetClockHandle()

HANDLE STDMETHODCALLTYPE CKsProxy::KsGetClockHandle ( )

Definition at line 2135 of file proxy.cpp.

2136{
2137#ifdef KSPROXY_TRACE
2138 OutputDebugStringW(L"CKsProxy::KsGetClockHandle\n");
2139#endif
2140
2141 return m_hClock;
2142}

◆ KsGetCorrelatedPhysicalTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetCorrelatedPhysicalTime ( KSCORRELATED_TIME CorrelatedTime)

Definition at line 560 of file proxy.cpp.

562{
563#ifdef KSPROXY_TRACE
564 OutputDebugStringW(L"CKsProxy::KsGetCorrelatedPhysicalTime\n");
565#endif
567}
HRESULT STDMETHODCALLTYPE PerformClockProperty(ULONG PropertyId, ULONG PropertyFlags, PVOID OutputBuffer, ULONG OutputBufferSize)
Definition: proxy.cpp:459
@ KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME
Definition: ks.h:321

◆ KsGetCorrelatedTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetCorrelatedTime ( KSCORRELATED_TIME CorrelatedTime)

Definition at line 537 of file proxy.cpp.

539{
540#ifdef KSPROXY_TRACE
541 OutputDebugStringW(L"CKsProxy::KsGetCorrelatedTime\n");
542#endif
543
545}
@ KSPROPERTY_CLOCK_CORRELATEDTIME
Definition: ks.h:320

◆ KsGetObjectHandle()

HANDLE STDMETHODCALLTYPE CKsProxy::KsGetObjectHandle ( )

Definition at line 2151 of file proxy.cpp.

2152{
2153#ifdef KSPROXY_TRACE
2154 OutputDebugStringW(L"CKsProxy::KsGetObjectHandle\n");
2155#endif
2156
2157 return m_hDevice;
2158}

◆ KsGetPhysicalTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetPhysicalTime ( LONGLONG Time)

Definition at line 513 of file proxy.cpp.

515{
516#ifdef KSPROXY_TRACE
517 OutputDebugStringW(L"CKsProxy::KsGetPhysicalTime\n");
518#endif
519
521}
@ KSPROPERTY_CLOCK_PHYSICALTIME
Definition: ks.h:319
static PLARGE_INTEGER Time
Definition: time.c:105

◆ KsGetResolution()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetResolution ( KSRESOLUTION Resolution)

Definition at line 583 of file proxy.cpp.

585{
586#ifdef KSPROXY_TRACE
587 OutputDebugStringW(L"CKsProxy::KsGetResolution\n");
588#endif
590}
@ KSPROPERTY_CLOCK_RESOLUTION
Definition: ks.h:322
static BYTE Resolution
Definition: mouse.c:35

◆ KsGetState()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetState ( KSSTATE State)

Definition at line 594 of file proxy.cpp.

596{
597#ifdef KSPROXY_TRACE
598 OutputDebugStringW(L"CKsProxy::KsGetState\n");
599#endif
601}
KSSTATE
Definition: ks.h:1214
@ KSPROPERTY_CLOCK_STATE
Definition: ks.h:323

◆ KsGetTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsGetTime ( LONGLONG Time)

Definition at line 489 of file proxy.cpp.

491{
492#ifdef KSPROXY_TRACE
493 OutputDebugStringW(L"CKsProxy::KsGetTime\n");
494#endif
495
497}

◆ KsMethod()

HRESULT STDMETHODCALLTYPE CKsProxy::KsMethod ( PKSMETHOD  Method,
ULONG  MethodLength,
LPVOID  MethodData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 1726 of file proxy.cpp.

1732{
1733#ifdef KSPROXY_TRACE
1734 OutputDebugStringW(L"CKsProxy::KsMethod\n");
1735#endif
1736
1737 assert(m_hDevice != 0);
1738 return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned);
1739}

◆ KsProperty()

HRESULT STDMETHODCALLTYPE CKsProxy::KsProperty ( PKSPROPERTY  Property,
ULONG  PropertyLength,
LPVOID  PropertyData,
ULONG  DataLength,
ULONG BytesReturned 
)

Definition at line 1709 of file proxy.cpp.

1715{
1716#ifdef KSPROXY_TRACE
1717 OutputDebugStringW(L"CKsProxy::KsProperty\n");
1718#endif
1719
1720 assert(m_hDevice != 0);
1722}
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData

Referenced by Get(), QuerySupported(), and Set().

◆ KsRemoveAggregate()

HRESULT STDMETHODCALLTYPE CKsProxy::KsRemoveAggregate ( REFGUID  AggregateClass)

Definition at line 1928 of file proxy.cpp.

1930{
1931#ifdef KSPROXY_TRACE
1932 OutputDebugStringW(L"CKsProxy::KsRemoveAggregate NotImplemented\n");
1933#endif
1934
1935 return E_NOTIMPL;
1936}

◆ KsSetCorrelatedPhysicalTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsSetCorrelatedPhysicalTime ( KSCORRELATED_TIME CorrelatedTime)

Definition at line 571 of file proxy.cpp.

573{
574#ifdef KSPROXY_TRACE
575 OutputDebugStringW(L"CKsProxy::KsSetCorrelatedPhysicalTime\n");
576#endif
577
579}
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43

◆ KsSetCorrelatedTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsSetCorrelatedTime ( KSCORRELATED_TIME CorrelatedTime)

Definition at line 549 of file proxy.cpp.

551{
552#ifdef KSPROXY_TRACE
553 OutputDebugStringW(L"CKsProxy::KsSetCorrelatedTime\n");
554#endif
556}

◆ KsSetPhysicalTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsSetPhysicalTime ( LONGLONG  Time)

Definition at line 525 of file proxy.cpp.

527{
528#ifdef KSPROXY_TRACE
529 OutputDebugStringW(L"CKsProxy::KsSetPhysicalTime\n");
530#endif
531
533}

◆ KsSetTime()

HRESULT STDMETHODCALLTYPE CKsProxy::KsSetTime ( LONGLONG  Time)

Definition at line 501 of file proxy.cpp.

503{
504#ifdef KSPROXY_TRACE
505 OutputDebugStringW(L"CKsProxy::KsSetTime\n");
506#endif
507
509}

◆ Load() [1/2]

HRESULT STDMETHODCALLTYPE CKsProxy::Load ( IPropertyBag pPropBag,
IErrorLog pErrorLog 
)

Implements IPersistPropertyBag.

Definition at line 2580 of file proxy.cpp.

2581{
2582 HRESULT hr;
2583 VARIANT varName;
2584 LPGUID pGuid;
2585 ULONG NumGuids = 0;
2587 SP_DEVICE_INTERFACE_DATA DeviceInterfaceData;
2588
2589#ifdef KSPROXY_TRACE
2590 WCHAR Buffer[100];
2591 OutputDebugStringW(L"CKsProxy::Load\n");
2592#endif
2593
2594 // read device path
2595 varName.vt = VT_BSTR;
2596 hr = pPropBag->Read(L"DevicePath", &varName, pErrorLog);
2597
2598 if (FAILED(hr))
2599 {
2600#ifdef KSPROXY_TRACE
2601 swprintf(Buffer, L"CKsProxy::Load Read %lx\n", hr);
2603#endif
2605 }
2606
2607#ifdef KSPROXY_TRACE
2608 OutputDebugStringW(L"DevicePath: ");
2609 OutputDebugStringW(varName.bstrVal);
2610 OutputDebugStringW(L"\n");
2611#endif
2612
2613 // create device list
2616 {
2617 // failed to create device list
2619 }
2620
2621 DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
2622 if (!SetupDiOpenDeviceInterfaceW(hList, (PCWSTR)varName.bstrVal, 0, &DeviceInterfaceData))
2623 {
2624 // failed to open device interface
2626 }
2627
2628 // FIXME handle device interface links(aliases)
2629 CopyMemory(&m_DeviceInterfaceGUID, &DeviceInterfaceData.InterfaceClassGuid, sizeof(GUID));
2630
2631 // close device info list
2633
2634 // open device
2636
2638 {
2639 // failed to open device
2640#ifdef KSPROXY_TRACE
2641 swprintf(Buffer, L"CKsProxy:: failed to open device with %lx\n", GetLastError());
2643#endif
2645 }
2646
2647 // store device path
2648 m_DevicePath = varName.bstrVal;
2649
2650 // get all supported sets
2651 hr = GetSupportedSets(&pGuid, &NumGuids);
2652 if (FAILED(hr))
2653 {
2655 m_hDevice = NULL;
2656 return hr;
2657 }
2658
2659 // load all proxy plugins
2660 hr = LoadProxyPlugins(pGuid, NumGuids);
2661 if (FAILED(hr))
2662 {
2663#if 0 //HACK
2665 m_hDevice = NULL;
2666 return hr;
2667#endif
2668 OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed!\n");
2669 }
2670
2671 // free sets
2672 CoTaskMemFree(pGuid);
2673
2674 // now create the input / output pins
2675 hr = CreatePins();
2676
2677#ifdef KSPROXY_TRACE
2678 swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
2680#endif
2681
2682 //HACK
2683 hr = S_OK;
2684
2685 return hr;
2686}
HRESULT STDMETHODCALLTYPE CreatePins()
Definition: proxy.cpp:2450
HRESULT STDMETHODCALLTYPE LoadProxyPlugins(LPGUID pGuids, ULONG NumGuids)
Definition: proxy.cpp:2257
HRESULT STDMETHODCALLTYPE GetSupportedSets(LPGUID *pOutGuid, PULONG NumGuids)
Definition: proxy.cpp:2176
#define OPEN_EXISTING
Definition: compat.h:775
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
@ VT_BSTR
Definition: compat.h:2303
HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid, HWND hwndParent, PCWSTR MachineName, PVOID Reserved)
Definition: devinst.c:1259
BOOL WINAPI SetupDiOpenDeviceInterfaceW(HDEVINFO DeviceInfoSet, PCWSTR DevicePath, DWORD OpenFlags, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
Definition: devinst.c:3761
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2893
HRESULT Read([in] LPCOLESTR pszPropName, [in, out] VARIANT *pVar, [in] IErrorLog *pErrorLog)
HWND hList
Definition: livecd.c:10
#define FILE_FLAG_OVERLAPPED
Definition: disk.h:46
#define GENERIC_WRITE
Definition: nt_native.h:90
struct _SP_DEVICE_INTERFACE_DATA SP_DEVICE_INTERFACE_DATA
BSTR bstrVal
Definition: compat.h:2399
VARTYPE vt
Definition: compat.h:2381
const uint16_t * PCWSTR
Definition: typedefs.h:57

◆ Load() [2/2]

HRESULT STDMETHODCALLTYPE CKsProxy::Load ( IStream pStm)

Implements IPersistStream.

Definition at line 1955 of file proxy.cpp.

1957{
1958 HRESULT hr;
1959 WCHAR Buffer[1000];
1960 AM_MEDIA_TYPE MediaType;
1962 LONG Length;
1963
1964 ULONG PinId;
1965 LPOLESTR pMajor, pSub, pFormat;
1966
1967#ifdef KSPROXY_TRACE
1968 OutputDebugStringW(L"CKsProxy::Load\n");
1969#endif
1970
1971#if 0
1972 ULONG Version = ReadInt(pStm, hr);
1973 if (Version != 1)
1974 return E_FAIL;
1975#endif
1976
1977 hr = pStm->Read(&Length, sizeof(ULONG), &BytesReturned);
1978 swprintf(Buffer, L"Length hr %x hr length %lu\n", hr, Length);
1980
1981 do
1982 {
1983 hr = pStm->Read(&PinId, sizeof(ULONG), &BytesReturned);
1984 swprintf(Buffer, L"Read: hr %08x PinId %lx BytesReturned %lu\n", hr, PinId, BytesReturned);
1986
1987 if (FAILED(hr) || !BytesReturned)
1988 break;
1989
1991
1992 hr = pStm->Read(&MediaType, sizeof(AM_MEDIA_TYPE), &BytesReturned);
1993 if (FAILED(hr) || BytesReturned != sizeof(AM_MEDIA_TYPE))
1994 {
1995 swprintf(Buffer, L"Read failed with %lx\n", hr);
1997 break;
1998 }
1999
2000
2001 StringFromIID(MediaType.majortype, &pMajor);
2002 StringFromIID(MediaType.subtype , &pSub);
2003 StringFromIID(MediaType.formattype, &pFormat);
2004
2005 swprintf(Buffer, L"BytesReturned %lu majortype %s subtype %s bFixedSizeSamples %u bTemporalCompression %u lSampleSize %u formattype %s, pUnk %p cbFormat %u pbFormat %p\n", BytesReturned, pMajor, pSub, MediaType.bFixedSizeSamples, MediaType.bTemporalCompression, MediaType.lSampleSize, pFormat, MediaType.pUnk, MediaType.cbFormat, MediaType.pbFormat);
2007
2009
2010
2011 if (MediaType.cbFormat)
2012 {
2013 MediaType.pbFormat = (BYTE*)CoTaskMemAlloc(MediaType.cbFormat);
2014 if (!MediaType.pbFormat)
2015 return E_OUTOFMEMORY;
2016
2017 hr = pStm->Read(&MediaType.pbFormat, sizeof(MediaType.cbFormat), &BytesReturned);
2018 if (FAILED(hr))
2019 {
2020 swprintf(Buffer, L"ReadFormat failed with %lx\n", hr);
2022 break;
2023 }
2025 }
2026
2027 }while(Length > 0);
2028
2029 return S_OK;
2030}
HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead)
_Check_return_ HRESULT WINAPI StringFromIID(_In_ REFIID rclsid, _Outptr_ LPOLESTR *lplpsz)
long LONG
Definition: pedump.c:60
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
unsigned char BYTE
Definition: xxhash.c:193

◆ LoadProxyPlugins()

HRESULT STDMETHODCALLTYPE CKsProxy::LoadProxyPlugins ( LPGUID  pGuids,
ULONG  NumGuids 
)

Definition at line 2257 of file proxy.cpp.

2260{
2261 ULONG Index;
2262 LPOLESTR pStr;
2263 HKEY hKey, hSubKey;
2264 HRESULT hr;
2266
2267 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\MediaInterfaces", 0, KEY_READ, &hKey) != ERROR_SUCCESS)
2268 {
2269 OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed to open MediaInterfaces key\n");
2270 return E_FAIL;
2271 }
2272
2273 // enumerate all sets
2274 for(Index = 0; Index < NumGuids; Index++)
2275 {
2276 // convert to string
2277 hr = StringFromCLSID(pGuids[Index], &pStr);
2278 if (FAILED(hr))
2279 return E_FAIL;
2280
2281 // now try open class key
2282 if (RegOpenKeyExW(hKey, pStr, 0, KEY_READ, &hSubKey) != ERROR_SUCCESS)
2283 {
2284 // no plugin for that set exists
2285 CoTaskMemFree(pStr);
2286 continue;
2287 }
2288
2289 // try load plugin
2290 hr = CoCreateInstance(pGuids[Index], (IBaseFilter*)this, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**)&pUnknown);
2291 if (SUCCEEDED(hr))
2292 {
2293 // store plugin
2294 m_Plugins.push_back(pUnknown);
2295 }
2296 // close key
2297 RegCloseKey(hSubKey);
2298 }
2299
2300 // close media interfaces key
2302 return S_OK;
2303}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
FxAutoRegKey hKey
#define KEY_READ
Definition: nt_native.h:1023
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by Load().

◆ Pause()

HRESULT STDMETHODCALLTYPE CKsProxy::Pause ( void  )

Implements IMediaFilter.

Definition at line 2738 of file proxy.cpp.

2739{
2740 HRESULT hr = S_OK;
2741
2742#ifdef KSPROXY_TRACE
2743 OutputDebugStringW(L"CKsProxy::Pause\n");
2744#endif
2745
2747
2749 {
2751 }
2752 if (SUCCEEDED(hr))
2753 {
2755 {
2757 }
2758 }
2759
2760 if (SUCCEEDED(hr))
2762
2764 return hr;
2765
2766}
HRESULT STDMETHODCALLTYPE SetPinState(KSSTATE State)
Definition: proxy.cpp:2806
@ KSSTATE_PAUSE
Definition: ks.h:1217
@ KSSTATE_STOP
Definition: ks.h:1215
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by Run().

◆ PerformClockProperty()

HRESULT STDMETHODCALLTYPE CKsProxy::PerformClockProperty ( ULONG  PropertyId,
ULONG  PropertyFlags,
PVOID  OutputBuffer,
ULONG  OutputBufferSize 
)

Definition at line 459 of file proxy.cpp.

464{
466 HRESULT hr;
468
469 if (!m_hClock)
470 {
471 // create clock
473 if (FAILED(hr))
474 return hr;
475 }
476
477 // setup request
479 Property.Id = PropertyId;
480 Property.Flags = PropertyFlags;
481
483
484 return hr;
485}
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: cdrom.h:932
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863

Referenced by KsGetCorrelatedPhysicalTime(), KsGetCorrelatedTime(), KsGetPhysicalTime(), KsGetResolution(), KsGetState(), KsGetTime(), KsSetCorrelatedPhysicalTime(), KsSetCorrelatedTime(), KsSetPhysicalTime(), and KsSetTime().

◆ QueryFilterInfo()

HRESULT STDMETHODCALLTYPE CKsProxy::QueryFilterInfo ( FILTER_INFO pInfo)

Implements IBaseFilter.

Definition at line 3075 of file proxy.cpp.

3077{
3078 if (!pInfo)
3079 return E_POINTER;
3080
3081#ifdef KSPROXY_TRACE
3082 OutputDebugStringW(L"CKsProxy::QueryFilterInfo\n");
3083#endif
3084
3085 pInfo->achName[0] = L'\0';
3086 pInfo->pGraph = m_pGraph;
3087
3088 if (m_pGraph)
3089 m_pGraph->AddRef();
3090
3091 return S_OK;
3092}

◆ QueryInterface()

HRESULT STDMETHODCALLTYPE CKsProxy::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 217 of file proxy.cpp.

220{
221 *Output = NULL;
222
223 if (IsEqualGUID(refiid, IID_IUnknown) ||
225 {
226 *Output = PVOID(this);
227 reinterpret_cast<IUnknown*>(*Output)->AddRef();
228 return NOERROR;
229 }
230 else if (IsEqualGUID(refiid, IID_IPersistPropertyBag))
231 {
232 *Output = (IPersistPropertyBag*)(this);
233 reinterpret_cast<IPersistPropertyBag*>(*Output)->AddRef();
234 return NOERROR;
235 }
236 else if (IsEqualGUID(refiid, IID_IAMDeviceRemoval))
237 {
238 *Output = (IAMDeviceRemoval*)(this);
239 reinterpret_cast<IAMDeviceRemoval*>(*Output)->AddRef();
240 return NOERROR;
241 }
242 else if (IsEqualGUID(refiid, IID_IPersistStream))
243 {
244 *Output = (IPersistStream*)(this);
245 reinterpret_cast<IPersistStream*>(*Output)->AddRef();
246 return NOERROR;
247 }
248 else if (IsEqualGUID(refiid, IID_IPersist))
249 {
250 *Output = (IPersistStream*)(this);
251 reinterpret_cast<IPersist*>(*Output)->AddRef();
252 return NOERROR;
253 }
254 else if (IsEqualGUID(refiid, IID_IKsObject))
255 {
256 *Output = (IKsObject*)(this);
257 reinterpret_cast<IKsObject*>(*Output)->AddRef();
258 return NOERROR;
259 }
260 else if (IsEqualGUID(refiid, IID_IKsClock))
261 {
262 *Output = (IKsClock*)(this);
263 reinterpret_cast<IKsClock*>(*Output)->AddRef();
264 return NOERROR;
265 }
266 else if (IsEqualGUID(refiid, IID_IReferenceClock))
267 {
268 if (!m_hClock)
269 {
271 if (FAILED(hr))
272 return hr;
273 }
274
275 *Output = (IReferenceClock*)(this);
276 reinterpret_cast<IReferenceClock*>(*Output)->AddRef();
277 return NOERROR;
278 }
279 else if (IsEqualGUID(refiid, IID_IMediaSeeking))
280 {
281 *Output = (IMediaSeeking*)(this);
282 reinterpret_cast<IMediaSeeking*>(*Output)->AddRef();
283 return NOERROR;
284 }
285 else if (IsEqualGUID(refiid, IID_IAMFilterMiscFlags))
286 {
287 *Output = (IAMFilterMiscFlags*)(this);
288 reinterpret_cast<IAMFilterMiscFlags*>(*Output)->AddRef();
289 return NOERROR;
290 }
291 else if (IsEqualGUID(refiid, IID_IKsControl))
292 {
293 *Output = (IKsControl*)(this);
294 reinterpret_cast<IKsControl*>(*Output)->AddRef();
295 return NOERROR;
296 }
297 else if (IsEqualGUID(refiid, IID_IKsPropertySet))
298 {
299 *Output = (IKsPropertySet*)(this);
300 reinterpret_cast<IKsPropertySet*>(*Output)->AddRef();
301 return NOERROR;
302 }
303 else if (IsEqualGUID(refiid, IID_IKsTopology))
304 {
305 *Output = (IKsTopology*)(this);
306 reinterpret_cast<IKsTopology*>(*Output)->AddRef();
307 return NOERROR;
308 }
309 else if (IsEqualGUID(refiid, IID_IKsAggregateControl))
310 {
311 *Output = (IKsAggregateControl*)(this);
312 reinterpret_cast<IKsAggregateControl*>(*Output)->AddRef();
313 return NOERROR;
314 }
315 else if (IsEqualGUID(refiid, IID_IKsClockPropertySet))
316 {
317 if (!m_hClock)
318 {
320 if (FAILED(hr))
321 return hr;
322 }
323
324 *Output = (IKsClockPropertySet*)(this);
325 reinterpret_cast<IKsClockPropertySet*>(*Output)->AddRef();
326 return NOERROR;
327 }
328 else if (IsEqualGUID(refiid, IID_ISpecifyPropertyPages))
329 {
330 *Output = (ISpecifyPropertyPages*)(this);
331 reinterpret_cast<ISpecifyPropertyPages*>(*Output)->AddRef();
332 return NOERROR;
333 }
334
335 for(ULONG Index = 0; Index < m_Plugins.size(); Index++)
336 {
337 if (m_Pins[Index])
338 {
339 HRESULT hr = m_Plugins[Index]->QueryInterface(refiid, Output);
340 if (SUCCEEDED(hr))
341 {
342#ifdef KSPROXY_TRACE
343 WCHAR Buffer[100];
345 StringFromCLSID(refiid, &lpstr);
346 swprintf(Buffer, L"CKsProxy::QueryInterface plugin %lu supports interface %s\n", Index, lpstr);
349#endif
350 return hr;
351 }
352 }
353 }
354#ifdef KSPROXY_TRACE
357 StringFromCLSID(refiid, &lpstr);
358 swprintf(Buffer, L"CKsProxy::QueryInterface: NoInterface for %s !!!\n", lpstr);
361#endif
362
363 return E_NOINTERFACE;
364}
const GUID IID_IKsPropertySet
Definition: controlnode.cpp:13
const GUID IID_IBaseFilter
#define MAX_PATH
Definition: compat.h:34
const GUID IID_IKsControl
Definition: filter.c:44
static LPCSTR lpstr
Definition: font.c:51
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IKsClock
Definition: proxy.cpp:19
const GUID IID_IPersistStream
Definition: proxy.cpp:13
const GUID IID_ISpecifyPropertyPages
Definition: proxy.cpp:12
const GUID IID_IKsAggregateControl
Definition: proxy.cpp:16
const GUID IID_IKsTopology
Definition: proxy.cpp:18
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
const GUID IID_IKsClockPropertySet
Definition: proxy.cpp:17
@ Output
Definition: arc.h:85
void * PVOID
Definition: typedefs.h:50

◆ QueryPreferredFormat()

HRESULT STDMETHODCALLTYPE CKsProxy::QueryPreferredFormat ( GUID pFormat)

Implements IMediaSeeking.

Definition at line 1038 of file proxy.cpp.

1040{
1041 PKSMULTIPLE_ITEM FormatList;
1042 HRESULT hr;
1043 ULONG Index;
1044
1045#ifdef KSPROXY_TRACE
1046 OutputDebugStringW(L"CKsProxy::QueryPreferredFormat\n");
1047#endif
1048
1049 if (!pFormat)
1050 return E_POINTER;
1051
1052 hr = GetMediaSeekingFormats(&FormatList);
1053 if (SUCCEEDED(hr))
1054 {
1055 if (FormatList->Count)
1056 {
1057 CopyMemory(pFormat, (FormatList + 1), sizeof(GUID));
1058 CoTaskMemFree(FormatList);
1059 return S_OK;
1060 }
1061 CoTaskMemFree(FormatList);
1062 }
1064 {
1065 // check if plugins support it
1066 for(Index = 0; Index < m_Plugins.size(); Index++)
1067 {
1068 // get plugin
1069 IUnknown * Plugin = m_Plugins[Index];
1070
1071 if (!Plugin)
1072 continue;
1073
1074 // query for IMediaSeeking interface
1075 IMediaSeeking *pSeek = NULL;
1076 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1077 if (SUCCEEDED(hr))
1078 {
1079 // get preferred time format
1080 hr = pSeek->QueryPreferredFormat(pFormat);
1081 // release IMediaSeeking interface
1082 pSeek->Release();
1083
1084 if (hr != S_FALSE)
1085 return hr;
1086 }
1087 }
1088 hr = S_FALSE;
1089 }
1090
1091 return hr;
1092}

Referenced by IsUsingTimeFormat().

◆ QuerySupported()

HRESULT STDMETHODCALLTYPE CKsProxy::QuerySupported ( REFGUID  guidPropSet,
DWORD  dwPropID,
DWORD pTypeSupport 
)

Implements IKsPropertySet.

Definition at line 1858 of file proxy.cpp.

1862{
1865
1866#ifdef KSPROXY_TRACE
1867 OutputDebugStringW(L"CKsProxy::QuerySupported\n");
1868#endif
1869
1870 Property.Set = guidPropSet;
1871 Property.Id = dwPropID;
1873
1874 return KsProperty(&Property, sizeof(KSPROPERTY), pTypeSupport, sizeof(DWORD), &BytesReturned);
1875}

◆ QueryVendorInfo()

HRESULT STDMETHODCALLTYPE CKsProxy::QueryVendorInfo ( LPWSTR pVendorInfo)

Implements IBaseFilter.

Definition at line 3123 of file proxy.cpp.

3125{
3126#ifdef KSPROXY_TRACE
3127 OutputDebugStringW(L"CKsProxy::QueryVendorInfo\n");
3128#endif
3129 return StringFromCLSID(CLSID_Proxy, pVendorInfo);
3130}

◆ Reassociate()

HRESULT STDMETHODCALLTYPE CKsProxy::Reassociate ( void  )

Definition at line 2090 of file proxy.cpp.

2091{
2092#ifdef KSPROXY_TRACE
2093 OutputDebugStringW(L"CKsProxy::Reassociate\n");
2094#endif
2095
2096 if (!m_DevicePath || m_hDevice)
2097 {
2098 // file path not available
2100 }
2101
2103 if (!m_hDevice)
2104 {
2105 // failed to open device
2107 }
2108
2109 // success
2110 return NOERROR;
2111}

◆ Register()

HRESULT STDMETHODCALLTYPE CKsProxy::Register ( void  )

Implements IAMovieSetup.

Definition at line 3138 of file proxy.cpp.

3139{
3140#ifdef KSPROXY_TRACE
3141 OutputDebugStringW(L"CKsProxy::Register : NotImplemented\n");
3142#endif
3143
3144 return E_NOTIMPL;
3145}

◆ Run()

HRESULT STDMETHODCALLTYPE CKsProxy::Run ( REFERENCE_TIME  tStart)

Implements IMediaFilter.

Definition at line 2770 of file proxy.cpp.

2772{
2773 HRESULT hr;
2774
2775#ifdef KSPROXY_TRACE
2776 OutputDebugStringW(L"CKsProxy::Run\n");
2777#endif
2778
2780
2782 {
2784 // setting filter state to pause
2785 hr = Pause();
2786 if (FAILED(hr))
2787 return hr;
2788
2791 }
2792
2794
2795 if (SUCCEEDED(hr))
2796 {
2798 }
2799
2801 return hr;
2802}
HRESULT STDMETHODCALLTYPE Pause(void)
Definition: proxy.cpp:2738
@ KSSTATE_RUN
Definition: ks.h:1218

◆ Save() [1/2]

HRESULT STDMETHODCALLTYPE CKsProxy::Save ( IPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)

Implements IPersistPropertyBag.

Definition at line 2690 of file proxy.cpp.

2691{
2692#ifdef KSPROXY_TRACE
2693 OutputDebugStringW(L"CKsProxy::Save\n");
2694#endif
2695 return E_NOTIMPL;
2696}

◆ Save() [2/2]

HRESULT STDMETHODCALLTYPE CKsProxy::Save ( IStream pStm,
BOOL  fClearDirty 
)

Implements IPersistStream.

Definition at line 2034 of file proxy.cpp.

2037{
2038#ifdef KSPROXY_TRACE
2039 OutputDebugStringW(L"CKsProxy::Save Notimplemented\n");
2040#endif
2041
2042 return E_NOTIMPL;
2043}

◆ Set()

HRESULT STDMETHODCALLTYPE CKsProxy::Set ( REFGUID  guidPropSet,
DWORD  dwPropID,
LPVOID  pInstanceData,
DWORD  cbInstanceData,
LPVOID  pPropData,
DWORD  cbPropData 
)

Implements IKsPropertySet.

Definition at line 1767 of file proxy.cpp.

1774{
1776
1777#ifdef KSPROXY_TRACE
1778 OutputDebugStringW(L"CKsProxy::Set\n");
1779#endif
1780
1781 if (cbInstanceData)
1782 {
1783 PKSPROPERTY Property = (PKSPROPERTY)CoTaskMemAlloc(sizeof(KSPROPERTY) + cbInstanceData);
1784 if (!Property)
1785 return E_OUTOFMEMORY;
1786
1787 Property->Set = guidPropSet;
1788 Property->Id = dwPropID;
1790
1791 CopyMemory((Property+1), pInstanceData, cbInstanceData);
1792
1793 HRESULT hr = KsProperty(Property, sizeof(KSPROPERTY) + cbInstanceData, pPropData, cbPropData, &BytesReturned);
1795 return hr;
1796 }
1797 else
1798 {
1800
1801 Property.Set = guidPropSet;
1802 Property.Id = dwPropID;
1804
1805 HRESULT hr = KsProperty(&Property, sizeof(KSPROPERTY), pPropData, cbPropData, &BytesReturned);
1806 return hr;
1807 }
1808}

◆ SetPinState()

HRESULT STDMETHODCALLTYPE CKsProxy::SetPinState ( KSSTATE  State)

Definition at line 2806 of file proxy.cpp.

2808{
2809 HRESULT hr = S_OK;
2810 ULONG Index;
2811 IKsObject *pObject;
2814 PIN_INFO PinInfo;
2815
2819
2820 // set all pins to running state
2821 for(Index = 0; Index < m_Pins.size(); Index++)
2822 {
2823 IPin * Pin = m_Pins[Index];
2824 if (!Pin)
2825 continue;
2826
2827 //check if the pin is connected
2828 IPin * TempPin;
2829 hr = Pin->ConnectedTo(&TempPin);
2830 if (FAILED(hr))
2831 {
2832 // skip unconnected pins
2833 continue;
2834 }
2835
2836 // release connected pin
2837 TempPin->Release();
2838
2839 // query for the pin info
2840 hr = Pin->QueryPinInfo(&PinInfo);
2841
2842 if (SUCCEEDED(hr))
2843 {
2844 if (PinInfo.pFilter)
2845 PinInfo.pFilter->Release();
2846
2847 if (PinInfo.dir == PINDIR_OUTPUT)
2848 {
2850 if (SUCCEEDED(hr))
2851 continue;
2852 }
2853 }
2854
2855 //query IKsObject interface
2856 hr = Pin->QueryInterface(IID_IKsObject, (void**)&pObject);
2857
2858 // get pin handle
2859 HANDLE hPin = pObject->KsGetObjectHandle();
2860
2861 // sanity check
2862 assert(hPin && hPin != INVALID_HANDLE_VALUE);
2863
2864 // now set state
2866
2867#ifdef KSPROXY_TRACE
2868 WCHAR Buffer[100];
2869 swprintf(Buffer, L"CKsProxy::SetPinState Index %u State %u hr %lx\n", Index, State, hr);
2871#endif
2872
2873 if (FAILED(hr))
2874 return hr;
2875 }
2876 return hr;
2877}
@ PINDIR_OUTPUT
Definition: axcore.idl:42
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:427
ULONG Release()
@ KSPROPERTY_CONNECTION_STATE
Definition: ks.h:349
#define KSPROPSETID_Connection
Definition: ks.h:346
HRESULT STDMETHODCALLTYPE COutputPin_SetState(IPin *Pin, KSSTATE State)

Referenced by Pause(), Run(), and Stop().

◆ SetPositions()

HRESULT STDMETHODCALLTYPE CKsProxy::SetPositions ( LONGLONG pCurrent,
DWORD  dwCurrentFlags,
LONGLONG pStop,
DWORD  dwStopFlags 
)

Implements IMediaSeeking.

Definition at line 1438 of file proxy.cpp.

1443{
1445 KSPROPERTY_POSITIONS Positions;
1447 HRESULT hr;
1448
1452
1453 Positions.Current = *pCurrent;
1454 Positions.CurrentFlags = (KS_SEEKING_FLAGS)dwCurrentFlags;
1455 Positions.Stop = *pStop;
1456 Positions.StopFlags = (KS_SEEKING_FLAGS)dwStopFlags;
1457
1458#ifdef KSPROXY_TRACE
1459 OutputDebugStringW(L"CKsProxy::SetPositions\n");
1460#endif
1461
1463 if (SUCCEEDED(hr))
1464 {
1465 if (dwCurrentFlags & AM_SEEKING_ReturnTime)
1466 {
1467 // retrieve current position
1468 hr = GetCurrentPosition(pCurrent);
1469 }
1470
1471 if (SUCCEEDED(hr))
1472 {
1473 if (dwStopFlags & AM_SEEKING_ReturnTime)
1474 {
1475 // retrieve current position
1476 hr = GetStopPosition(pStop);
1477 }
1478 }
1479 return hr;
1480 }
1482 {
1483 hr = E_NOTIMPL;
1484
1485 // check if plugins support it
1486 for(Index = 0; Index < m_Plugins.size(); Index++)
1487 {
1488 // get plugin
1489 IUnknown * Plugin = m_Plugins[Index];
1490
1491 if (!Plugin)
1492 continue;
1493
1494 // query for IMediaSeeking interface
1495 IMediaSeeking *pSeek = NULL;
1496 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1497 if (SUCCEEDED(hr))
1498 {
1499 // set positions
1500 hr = pSeek->SetPositions(pCurrent, dwCurrentFlags, pStop, dwStopFlags);
1501 // release IMediaSeeking interface
1502 pSeek->Release();
1503
1504 if (FAILED(hr))
1505 break;
1506 }
1507 }
1508 }
1509
1510 return hr;
1511}
@ AM_SEEKING_ReturnTime
Definition: axcore.idl:597
@ KSPROPERTY_MEDIASEEKING_POSITIONS
Definition: ks.h:481
KS_SEEKING_FLAGS
Definition: ks.h:488
LONGLONG Current
Definition: ks.h:509
LONGLONG Stop
Definition: ks.h:510
KS_SEEKING_FLAGS StopFlags
Definition: ks.h:512
KS_SEEKING_FLAGS CurrentFlags
Definition: ks.h:511

◆ SetRate()

HRESULT STDMETHODCALLTYPE CKsProxy::SetRate ( double  dRate)

Implements IMediaSeeking.

Definition at line 1590 of file proxy.cpp.

1592{
1593#ifdef KSPROXY_TRACE
1594 OutputDebugStringW(L"CKsProxy::SetRate\n");
1595#endif
1596 return E_NOTIMPL;
1597}

◆ SetSyncSource()

HRESULT STDMETHODCALLTYPE CKsProxy::SetSyncSource ( IReferenceClock pClock)

Implements IMediaFilter.

Definition at line 2894 of file proxy.cpp.

2896{
2897 HRESULT hr;
2898 IKsClock *pKsClock;
2899 HANDLE hClock, hPin;
2900 ULONG Index;
2901 IPin * pin;
2902 IKsObject * pObject;
2905 PIN_DIRECTION PinDir;
2906
2907#ifdef KSPROXY_TRACE
2908 OutputDebugStringW(L"CKsProxy::SetSyncSource\n");
2909#endif
2910
2911 // FIXME
2912 // need locks
2913
2914 if (pClock)
2915 {
2916 hr = pClock->QueryInterface(IID_IKsClock, (void**)&pKsClock);
2917 if (FAILED(hr))
2918 {
2919 hr = m_ReferenceClock->QueryInterface(IID_IKsClock, (void**)&pKsClock);
2920 if (FAILED(hr))
2921 return hr;
2922 }
2923
2924 // get clock handle
2925 hClock = pKsClock->KsGetClockHandle();
2926
2927 // release IKsClock interface
2928 pKsClock->Release();
2929 m_hClock = hClock;
2930 }
2931 else
2932 {
2933 // no clock handle
2934 m_hClock = NULL;
2935 }
2936
2937
2938 // distribute clock to all pins
2939 for(Index = 0; Index < m_Pins.size(); Index++)
2940 {
2941 // get current pin
2942 pin = m_Pins[Index];
2943 if (!pin)
2944 continue;
2945
2946 // get IKsObject interface
2947 hr = pin->QueryInterface(IID_IKsObject, (void **)&pObject);
2948 if (SUCCEEDED(hr))
2949 {
2950 // get pin handle
2951 hPin = pObject->KsGetObjectHandle();
2952 if (hPin != INVALID_HANDLE_VALUE && hPin)
2953 {
2954 // set clock
2958
2959 // set master clock
2961
2962 if (FAILED(hr))
2963 {
2966 {
2967 // failed to set master clock
2968 pObject->Release();
2969 WCHAR Buffer[100];
2970 swprintf(Buffer, L"CKsProxy::SetSyncSource KSPROPERTY_STREAM_MASTERCLOCK failed with %lx\n", hr);
2972 return hr;
2973 }
2974 }
2975 }
2976 // release IKsObject
2977 pObject->Release();
2978 }
2979
2980 // now get the direction
2981 hr = pin->QueryDirection(&PinDir);
2982 if (SUCCEEDED(hr))
2983 {
2984 if (PinDir == PINDIR_OUTPUT)
2985 {
2986 // notify pin via
2987 //CBaseStreamControl::SetSyncSource(pClock)
2988 }
2989 }
2990 }
2991
2992 if (pClock)
2993 {
2994 pClock->AddRef();
2995 }
2996
2997 if (m_ReferenceClock)
2998 {
3000 }
3001
3002 m_ReferenceClock = pClock;
3003#ifdef KSPROXY_TRACE
3004 OutputDebugStringW(L"CKsProxy::SetSyncSource done\n");
3005#endif
3006 return S_OK;
3007}
#define KSPROPSETID_Stream
Definition: ks.h:682
@ KSPROPERTY_STREAM_MASTERCLOCK
Definition: ks.h:688

◆ SetTimeFormat()

HRESULT STDMETHODCALLTYPE CKsProxy::SetTimeFormat ( const GUID pFormat)

Implements IMediaSeeking.

Definition at line 1164 of file proxy.cpp.

1166{
1169 HRESULT hr;
1170
1174
1175#ifdef KSPROXY_TRACE
1176 OutputDebugStringW(L"CKsProxy::SetTimeFormat\n");
1177#endif
1178
1181 {
1182 // check if plugins support it
1183 for(Index = 0; Index < m_Plugins.size(); Index++)
1184 {
1185 hr = E_NOTIMPL;
1186 // get plugin
1187 IUnknown * Plugin = m_Plugins[Index];
1188
1189 if (!Plugin)
1190 continue;
1191
1192 // query for IMediaSeeking interface
1193 IMediaSeeking *pSeek = NULL;
1194 hr = Plugin->QueryInterface(IID_IMediaSeeking, (void**)&pSeek);
1195 if (FAILED(hr))
1196 {
1197 //not supported
1198 break;
1199 }
1200 // set time format
1201 hr = pSeek->SetTimeFormat(pFormat);
1202 // release IMediaSeeking interface
1203 pSeek->Release();
1204
1205 if (FAILED(hr))
1206 break;
1207 }
1208 }
1209 return hr;
1210}

◆ STDMETHODIMP_() [1/2]

CKsProxy::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 48 of file proxy.cpp.

49 {
51 return m_Ref;
52 }
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CKsProxy::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 53 of file proxy.cpp.

54 {
56 if (!m_Ref)
57 {
58 //delete this;
59 return 0;
60 }
61 return m_Ref;
62 }
#define InterlockedDecrement
Definition: armddk.h:52

◆ Stop()

HRESULT STDMETHODCALLTYPE CKsProxy::Stop ( void  )

Implements IMediaFilter.

Definition at line 2717 of file proxy.cpp.

2718{
2719 HRESULT hr;
2720
2721#ifdef KSPROXY_TRACE
2722 OutputDebugStringW(L"CKsProxy::Stop\n");
2723#endif
2724
2726
2728 if (SUCCEEDED(hr))
2730
2732
2733 return hr;
2734}

◆ Unadvise()

HRESULT STDMETHODCALLTYPE CKsProxy::Unadvise ( DWORD_PTR  dwAdviseCookie)

Implements IReferenceClock.

Definition at line 788 of file proxy.cpp.

790{
791 HRESULT hr;
793
794#ifdef KSPROXY_TRACE
795 OutputDebugStringW(L"CKsProxy::Unadvise\n");
796#endif
797
798 if (m_hClock)
799 {
800 //lets disable the event
802 if (SUCCEEDED(hr))
803 {
804 // lets free event data
805 CoTaskMemFree((LPVOID)dwAdviseCookie);
806 }
807 }
808 else
809 {
810 // no clock available
811 hr = E_FAIL;
812 }
813
814 return hr;
815}

◆ Unregister()

HRESULT STDMETHODCALLTYPE CKsProxy::Unregister ( void  )

Implements IAMovieSetup.

Definition at line 3149 of file proxy.cpp.

3150{
3151#ifdef KSPROXY_TRACE
3152 OutputDebugStringW(L"CKsProxy::Unregister : NotImplemented\n");
3153#endif
3154 return E_NOTIMPL;
3155}

Member Data Documentation

◆ m_DeviceInterfaceGUID

CLSID CKsProxy::m_DeviceInterfaceGUID
protected

Definition at line 196 of file proxy.cpp.

Referenced by DeviceInfo(), and Load().

◆ m_DevicePath

LPWSTR CKsProxy::m_DevicePath
protected

Definition at line 195 of file proxy.cpp.

Referenced by DeviceInfo(), Load(), and Reassociate().

◆ m_FilterState

FILTER_STATE CKsProxy::m_FilterState
protected

Definition at line 191 of file proxy.cpp.

Referenced by GetState(), Pause(), Run(), and Stop().

◆ m_hClock

◆ m_hDevice

◆ m_Lock

CRITICAL_SECTION CKsProxy::m_Lock
protected

Definition at line 198 of file proxy.cpp.

Referenced by CKsProxy(), Pause(), Run(), and Stop().

◆ m_pGraph

IFilterGraph* CKsProxy::m_pGraph
protected

Definition at line 189 of file proxy.cpp.

Referenced by JoinFilterGraph(), and QueryFilterInfo().

◆ m_Pins

PinVector CKsProxy::m_Pins
protected

◆ m_Plugins

◆ m_Ref

LONG CKsProxy::m_Ref
protected

Definition at line 188 of file proxy.cpp.

Referenced by JoinFilterGraph(), and STDMETHODIMP_().

◆ m_ReferenceClock

IReferenceClock* CKsProxy::m_ReferenceClock
protected

Definition at line 190 of file proxy.cpp.

Referenced by CKsProxy(), GetSyncSource(), and SetSyncSource().


The documentation for this class was generated from the following file: