Article View: microsoft.public.directx
Article #34Re: about direct show file format
From: Jim Chapman
Date: Mon, 06 Jul 1998 00:00
Date: Mon, 06 Jul 1998 00:00
49 lines
2710 bytes
2710 bytes
Yes, you do indeed need to set the file format. There is sample code to do this in the "mpgparse" sample. In this case it looks at the mpeg audio header info and sets the paramaters of the mediatype.format to the correct values. If the format is not set correctly, then you cannot connect to the renderer (since it won't know what frequency the file is,etc.) In your case, since you are reading a wav file you will have to find the same type of info within the wav file so you can set the parameters. I'm sure there are plenty of places on the web where you can get the spec for wav files. Good luck, Jim wyx wrote: > > hello, > > I want to write a direct show source filter which can read a wave > file(.wav) and connect to a > audio renderer filter provided by direct show. > > However, I found that I need to specify the file media format (not > media type) in order to > play the file using my filter. > > But I have look through those sample source filter codes, none of > them need to specify the file format. > > Can anyone tell me at which point the sample source code (say, > async) specify(get) the file format ? > > Or do I really need to specify the file format in order to connect > my filter to another filter ? > At the beginning, I just specify the media type and media sub type. > But it fails to connect to another > filter. After adding the code to specify the file format in the > GetMediaType(), the filter works. > > So is there any method that can make a source filter without specify > the file format ? > > Thank you very much !! > > reagrds, > yung
Technical Details
Message-ID:
<35A11FEB.7635F78A@c-cube.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35A0BBD3.1015F65E@ust.hk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 105253,f8857bdfe985c1e3 X-Google-Attributes: gid105253,public X-Google-Thread: 113bbb,f8857bdfe985c1e3 X-Google-Attributes: gid113bbb,public X-Google-Thread: 104d65,f8857bdfe985c1e3 X-Google-Attributes: gid104d65,public X-Google-Thread: f72d4,f8857bdfe985c1e3 X-Google-Attributes: gidf72d4,public X-Google-Thread: 114ffc,f8857bdfe985c1e3 X-Google-Attributes: gid114ffc,public X-Google-Thread: f7a71,f8857bdfe985c1e3 X-Google-Attributes: gidf7a71,public From: Jim Chapman <jim.chapman@c-cube.com> Subject: Re: about direct show file format Date: 1998/07/06 Message-ID: <35A11FEB.7635F78A@c-cube.com> X-Deja-AN: 368975898 Content-Transfer-Encoding: 7bit References: <35A0BBD3.1015F65E@ust.hk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Newsgroups: microsoft.public.directx,microsoft.public.multimedia.directx.dshow.activemovie,microsoft.public.win32.programmer.directx,tw.bbs.comp.hacker,hk.comp.hacker,microsoft.public.vc.mfc