Log in

View Full Version : Anyone ever dealt with WMV files with multiple language audio streams?


Blight
4th January 2005, 05:25
Rather recent development, it seems certain commercial HD-WMV files are now coming out with multiple language audio streams.

I manage to get the audio stream count and language by calling "IWMReaderAdvanced4::GetLanguageCount" and "IWMReaderAdvanced4::GetLanguage".

However, I have no idea how to get the currently playing language and how to set a new language.

The WMF 9.5 SDK lists the following:

To Read Files with Multiple Languages
The reader object provides methods to identify the available languages of streams in a file. You can retrieve the number of supported languages for an output by calling IWMReaderAdvanced4::GetLanguageCount. You can then retrieve details about each language with calls to IWMReaderAdvanced4::GetLanguage.

You can specify the language to play by passing the index of that language to the reader with a call to IWMReaderAdvanced2::SetOutputSetting. This will select the specified language while maintaining automatic stream selection for any other mutual exclusion objects in the file.


However, calling IWMReaderAdvanced2::SetOutputSetting(0,g_wszStreamLanguage,WMT_TYPE_WORD,[value],2) doesn't do anything. Trying to call the IWMReaderAdvanced2::GetOutputSetting function with similar parameters throws an error.

Any ideas?