BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

play an mp3 using DShow

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
ramya
Guest





PostPosted: Wed Feb 14, 2007 5:43 pm    Post subject: play an mp3 using DShow Reply with quote



Hi all,
Im trying to play an mp3 file using DirectShow on PocketPc emulator.
But the RenderFile func returns a 0x80040218 err code(class not
registered).

i tried to manually add the following filters instead of using
RenderFile() :

res = pGraph->AddSourceFilter(L"\
\Cuppy_Cake_Song.mp3",_T("Source"),&pSource);

res = CoCreateInstance(CLSID_MPEG1Splitter, NULL,
CLSCTX_INPROC_SERVER,IID_IBaseFilter, (void**)&pBase);

res = pGraph->AddFilter(pBase,_T("MPEG-1 Stream Splitter"));

IPin *pSourceOut = GetOutPin(pSource, 0);
IPin *pGrabIn = GetInPin(pBase, 0);
res = pGraph->Connect(pSourceOut, pGrabIn);

res = CoCreateInstance(CLSID_MPEGLayer3Decoder, NULL, CLSCTX_INPROC,
IID_IBaseFilter, (void**)&pAD);
res = pGraph->AddFilter(pAD,_T("MPEG Audio decoder"));

IPin *pPSource = GetOutPin(pBase, 0);
IPin *pGrab = GetInPin(pAD, 0);
res = pGraph->Connect(pPSource, pGrab);

res = CoCreateInstance(CLSID_DSoundRender, NULL,
CLSCTX_INPROC,IID_IBaseFilter, (void**)&pAR);
res = pGraph->AddFilter(pAR,_T("Audio Renderer"));

pPSource = GetOutPin(pAD, 0);
pGrab = GetInPin(pAR, 0);
res = pGraph->Connect(pPSource, pGrab);


But the first CoCreateInstance(i.e for CLSID_MPEG1Splitter) returns
the same 0x80040218 err code. I hav checked in the RegEdit n this
CLSID is present there.i dont kno how to proceed. plz help. any other
way to play an mp3 file is welcome too. Thanks in advance
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.