Skip to main content

Posts

Showing posts from October, 2014

DirectShow Source Filter that reads data from application

Mentioned below is an example of a DirectShow source filter that reads data from application For reference I have taken CPushSource filter from DirectShow samples Include the code mentioned below in a common header file DECLARE_INTERFACE_ ( IMySettingsInterface , IUnknown ) { STDMETHOD ( GetParamInt )( char * szName , int * pParam ) = 0 ; STDMETHOD ( SetParamInt )( char * szName , int nParam ) = 0 ; }; // {F350FE9E-65BA-4AC1-A6C0-FD9F2979D342} DEFINE_GUID ( IID_IMySettings , 0xf350fe9e , 0x65ba , 0x4ac1 , 0xa6 , 0xc0 , 0xfd , 0x9f , 0x29 , 0x79 , 0xd3 , 0x42 ); Change made to CPushSourceDesktop class: class CPushSourceDesktop : public CSource , public IMySettingsInterface { private : // Constructor is private because you have to use CreateInstance CPushSourceDesktop ( IUnknown * pUnk , HRESULT * phr ); ~ CPushSourceDesktop (); CPushPinDesktop * m_pPin ; public : DECLARE_IUNKNOWN ; static CUnknown * WINAPI Creat