Ask a questionAsk a question
 

QuestionWMAsfReader has no pins

  • Wednesday, November 04, 2009 7:26 AMg_media Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    i want to play mp3 files with wmasfreader as source filter. In graph edit all works perfect, the file is playing.
    If i manually add the filter like below, i get no pins on the filter (but the file seems to be load in the filter (graph edit shows it like "test.mp3").

    Could it be with the string given to the interface? I tried several ways but none gave me any pins on the interface.
    It also happens if if try a wma file - no Pins!

    Does anybody have any ideas? Thanks in advance.


    CODE:


                IBaseFilter* ASF;
                IFileSourceFilter* source;

                CoCreateInstance(CLSID_WMAsfReader, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter,(void**)&ASF);

                pGraphBuilder->AddFilter(ASF,NULL);
     
                BSTR str = SysAllocString(L"D:\\test.mp3");
               
                ASF->QueryInterface(IID_IFileSourceFilter, (void**)&source);

                source->Load(str,NULL);

                SysFreeString(str);
                source->Release();
                ASF->Release();

All Replies