PDA

View Full Version : How to use DirectVobSub and Morgan Stream Switcher programmatically?


UNICO
3rd December 2002, 17:33
Hi there!

I'm developping DivX player for my personal use (no pop-up menus,
no skins, no green text displayed on screen while viewing the
movie whenever I do anything...).

After several days trying to find out how to code a certain
functionality without success :( I'm posting here hoping you
guys will help me. :)

Let me explain what I want to do:

For each movie file I have several audio tracks and subtitles,
and I would like to -while watching the movie- hit "E" key and
hear people talking in english, "S" and hear spanish, and so on.
The same on subtitles.

The only way I can think of to achieve those functionalities is
by controlling Morgan Stream Switcher Filter and and DirectVobSub
filter programmatically.

My problem is that I have absolute no idea of how to control those
filters from Delphi. I'm begining to learn how to build a graph
programmatically, but when it cames to add those filters and set
them I get "doomed". Therefore I would very much appreciate any
kind of guideline about this subject.

Of course I will be happy to know other ways to implement those
features.

Many thanks in advance,

UNICO

NoWoL
11th December 2002, 17:34
I don't know if it's the same with Delphi, but in C/C++ I do the following :

1-Find the correct filter ("Morgan Stream Switcher")

2-Query the interface IAMStreamSelect (pMSS is a IBaseFilter):
IAMStreamSelect *pStrm = NULL;
pMSS->QueryInterface(IID_IAMStreamSelect, (void**)&pStrm);


3-Now you can access the filter's info

pStrm->Info(...)



To enable a "stream", you do steps 1 and 2 and :

pStrm->Enable(index, AMSTREAMSELECTENABLE_ENABLE);

where index is the stream you want.


If you want some part of my code that query/change Morgan Stream Switcher, just ask.

Hope it help.

UNICO
13th December 2002, 13:08
Many thanks NoWoL :)

Although I'm not a C++ developer, your post has given to me A Lot of information about "how it works".

After taking a look at the DirectX help file I think I have seen "the big picture".

Many thanks again, I would have never discovered it by myself.

Bye,

UNICO