Re: Replace default audio renderer in Dshow video Graph ? C++
- From: "The March Hare [MVP]" <phil@xxxxxxxxx>
- Date: Sun, 15 May 2005 16:03:08 -0600
On Sun, 15 May 2005 22:20:57 +0200, Gaël Rosset wrote:
> >Approach 3: add the chosen audio renderer to the graph
> >*before* RenderFile() so that intelligent connect will (at
> >least should) pick the already added one instead of using
> >the default device.
>
> This worked and was very simple to do... The other advantage of this
> approach is that it works regardless if the file is simple audio or a
> movie file...
>
> Many thanks to both Alessandro and Phil !
You're welcome. I'm glad that Alessandro jumped in. This explains why it
works (As A.A. expected, intelligent connect doesn't look at the merits of
filters already in the filter graph):
"To connect each output pin, the Render method does the following:
1. If the pin supports the IStreamBuilder interface, the Filter Graph
Manager delegates the entire process to the pin's IStreamBuilder::Render
method. By exposing this interface, the pin assumes responsibility for
building the remainder of the graph, down to the renderer. However, very
few pins support this interface.
2. The Filter Graph Manager tries to use filters that are cached in memory,
if any. Throughout the Intelligent Connect process, the Filter Graph
Manager may cache filters from earlier steps in the process. (Also, see
Dynamic Graph Building.)
3. If the filter graph contains any filters with unconnected input pins,
the Filter Graph Manager tries them next. You can force the Render method
to try a particular filter by adding that filter to the graph before
calling Render.
4. Finally, the Filter Graph Manager searches the registry, using the
IFilterMapper2::EnumMatchingFilters method. It tries to match the output
pin's preferred media types against media types listed in the registry.
Each filter is registered with a merit, a numerical value that indicates
how preferable the filter is, relative to other filters. The
EnumMatchingFilters method returns filters in order of merit, with a
minimum merit of MERIT_DO_NOT_USE + 1. It ignores filters with a merit of
MERIT_DO_NOT_USE or less. Filters are also grouped into categories, defined
by GUID. Categories themselves have merit, and the EnumMatchingFilters
method ignores any category with a merit of MERIT_DO_NOT_USE or less, even
if the filters in that category have higher merit values."
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
.
- References:
- Re: Replace default audio renderer in Dshow video Graph ? C++
- From: The March Hare [MVP]
- Re: Replace default audio renderer in Dshow video Graph ? C++
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: Replace default audio renderer in Dshow video Graph ? C++
- From: The March Hare [MVP]
- Re: Replace default audio renderer in Dshow video Graph ? C++
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: Replace default audio renderer in Dshow video Graph ? C++
- From: Gaël Rosset
- Re: Replace default audio renderer in Dshow video Graph ? C++
- Prev by Date: Re: Replace default audio renderer in Dshow video Graph ? C++
- Next by Date: Problem with DES and MPEG files
- Previous by thread: Re: Replace default audio renderer in Dshow video Graph ? C++
- Next by thread: Source of the NullRenderer
- Index(es):
Relevant Pages
|