how to play a .wmv file using our own created filters
-
can any one help me to solve this problem i am a new leaener to direct show. i have created custom filetrs and pins and connected them but why it is not able to play the file. After compiling its not giving any error and running successiflly. but it is not rendering. can any one help me.. here is the code. /* BuildingFilter.cpp This program is to create our own filters */ #include #include #include //#include #include //audio filters defined #define INITGUID // have to define this so next line actually creates GUID structure DEFINE_GUID(CLSID_WmAudioDecoderDmo,0x2eeb4adf, 0x4578, 0x4d10, 0xbc, 0xa7, 0xbb, 0x95, 0x5f, 0x56, 0x32, 0x0a); DEFINE_GUID(IID_IDMOWrapperFilter,0x52d6f586,0x9f0f,0x4824,0x8f,0xc8,0xe3,0x2c,0xa0,0x49,0x30,0xc2); //DEFINE_GUID(CLSID_WmAudioDecoderDmo,0x874131cb, 0x4ecc, 0x443b, 0x89, 0x48, 0x74, 0x6b, 0x89, 0x59, 0x5d, 0x20); DEFINE_GUID(CLSID_WMVVideoDecoder, 0x4A69B442, 0x28BE, 0x4991, 0x96,0x9C, 0xB5, 0x00, 0xAD, 0xF5, 0xD8, 0xA8); //DEFINE_GUID(CLSID_WmVideoDecoderDmo,0x82d353df, 0x90BD, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xB7, 0x6e, 0x34); void main(void) { IGraphBuilder* g_pGraphBuilder = NULL; // assume graph builder already created IBaseFilter* g_pSource = NULL; //source filter IBaseFilter* g_pVideoRender = NULL; //video render IBaseFilter* g_pAudioRender = NULL; //sound render IFileSourceFilter* pFileSourceInt = NULL; IBaseFilter *pDmoFilter = NULL; IBaseFilter *pDmoFilterV = NULL; IDMOWrapperFilter *g_pAudioParser; IDMOWrapperFilter *g_pVideoParser; HRESULT hr; IMediaControl *gControl = NULL; IMediaEvent *gEvent = NULL; IEnumPins* EnumPins = NULL; IPin* OutPin = NULL; IPin* InPin = NULL; ULONG fetched; PIN_INFO pinfo, pinfoVideoParser, pinfoVideoParserOut, pinfoVideoRenderer; IEnumPins* EnumPinsV = NULL; IPin* OutPinV = NULL; IPin* InPinV = NULL; ULONG fetchedV; PIN_INFO pinfoV; long evCode=10; CoInitialize(NULL); CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC_SERVER,IID_IGraphBuilder, (void **)&g_pGraphBuilder); hr = g_pGraphBuilder->QueryInterface(IID_IMediaControl, (void **)&gControl); hr = g_pGraphBuilder->QueryInterface(IID_IMediaEvent, (void **)&gEvent); CoCreateInstance(CLSID_WMAsfReader, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&g_pSource); //CoCreateInstance(CLSID_WmAudioDecoderDmo, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&g_pAudioParser); //CoCreateIn