Skip to main content
gamedev.net
🔒 Locked

DirectShow Problem

Started by JanBacke Oct 30, 2002 at 7:38 AM 0 replies 200+ views
Original Post
JanBacke
JanBacke
Hello together I''ve try out to read the codec''s from a mediafile. But i can''t procedure GetFilter(ffile:string); var hr :HResult; Graph:IGraphBuilder; xWideChar; Filter:IEnumFilters; BFil :IBaseFilter; cFetched:DWord; FilterI:TFILTERINFO; begin CoInitialize(nil); x:=new(PWideChar); MultiByteToWideChar(CP_ACP,0,Pchar(ffile),-1,x,strlen(Pchar(FFile))+1); hr:=CoCreateInstance(CLSID_FilterGraph,nil,CLSCTX_INPROC_SERVER,IID_IGraphBuilder,Graph); if hr=0 then begin if Graph.RenderFile(x,nil)<>S_OK then begin Graph.EnumFilters(Filter); ___ here is the Problem Filter.Reset; \|/ while Filter.Next(1,BFil,@cFetched)=0 do begin BFil.QueryFilterInfo(FilterI); Form1.ListBox1.Items.Add(FilterI.achName); end; Filter:=nil; end; end; Graph:=nil; CoUnInitialize; end; The loop doesn''t run. He jump''s immediately to the end and i don''t know why. Please help

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.