|
|
How to use DirectVobSub and Morgan Stream Switcher programmatically?
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 quot;Equot; key and
hear people talking in english, quot;Squot; 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 quot;doomedquot;. 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
I don't know if it's the same with Delphi, but in C/C++ I do the following :
1-Find the correct filter (quot;Morgan Stream Switcherquot;)
2-Query the interface IAMStreamSelect (pMSS is a IBaseFilter):
IAMStreamSelect *pStrm = NULL; pMSS-gt;QueryInterface(IID_IAMStreamSelect, (void**)amp;pStrm);
3-Now you can access the filter's info pStrm-gt;Info(...)To enable a quot;streamquot;, you do steps 1 and 2 and : pStrm-gt;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.
Many thanks NoWoL
Although I'm not a C++ developer, your post has given to me A Lot of information about quot;how it worksquot;.
After taking a look at the DirectX help file I think I have seen quot;the big picturequot;.
Many thanks again, I would have never discovered it by myself.
Bye,
UNICO |
|