Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to set "MPEG Audio Decoder" properties

354 views
Skip to first unread message

Mocha

unread,
Jul 20, 2002, 2:46:10 AM7/20/02
to
Hi,

I am writing a MPEG playback app that requires to set the
properties inside the MPEG Audio Decoder filter. This
filter has different properties such as Channels (First,
Second and Both). Please help me if you show me any
guideline to change these values. Thanks in advance.

John

Alessandro Angeli

unread,
Jul 20, 2002, 6:01:48 AM7/20/02
to
This filter does not support any standard or documented custom COM interface
to programmatically set its properties. The only interface it supports is
ISpecifyPropertyPages which is used by the host application to create the
property dialog as GraphEdit and WMP6.4 do.

1. You can create the individual IPropertyPage you need with
CoCreateInstance() (you can discover its CLSID looking into the array
returned by ISpecifyPropertyPages::GetPages() and matching it with the
description in the registry).
2. Initialize it passing a dummy IPropertyPageSite to
IPropertyPage::SetPageSite() and a pointer to the IBaseFilter in
SetObjects().
3. Activate() it with a hidden HWND (or any other one, use a 1x1 RECT) but
don't Show() it.
4. Now you can use FindWindowEx() to walk the windows' hierarchy to find the
IPropertyPage panel and its components which state you need to change, so
that you can SendMessage() to them to set their state and then SendMessage()
the panel to notify it of the changes.
5. In the end, Apply() and release everything.

This works fine with the filter I tried.

"Mocha" <joh...@hotmail.com> wrote in message
news:1872f01c22fb9$21dc82f0$36ef2ecf@tkmsftngxa12...

Mocha

unread,
Jul 21, 2002, 4:57:09 AM7/21/02
to
Alessandro,

I am very appreciated for your detail instructions to my
question. I will try to implement your method. If you
don't mind to do me another big favor, would you please
send me your code example to help guide me in the right
direction? Thank you again.

John

>.
>

Alessandro Angeli

unread,
Jul 23, 2002, 11:29:05 AM7/23/02
to
Here is an extract from my code that would check a checkmark once the CLSID
of the property page and the classes or atoms of the page and checkmark
window are known (you have to find out these values using
ISpecifyPropertyPages::GetPages() and walking the window hierarchy).

"Mocha" <joh...@hotmail.com> wrote in message

news:17d6d01c23094$98c92f90$a5e62ecf@tkmsftngxa07...

FilterConfig.cpp

Mocha

unread,
Jul 23, 2002, 5:16:45 PM7/23/02
to
Alessandro,

Thank you very much for your code example.

John

0 new messages