我正在用 C# 开发一个应用程序,我正在使用 DirectShow.NET 库来呈现具有多个音轨的 .AVI 文件
如何在多个音轨之间切换?我正在使用 RenderFile 构建我的过滤器图,而不是手动构建它。
请您参考如下方法:
如果支持在音轨之间切换,管道中的过滤器之一(多路分解过滤器)将公开 IAMStreamSelect界面,您可以使用它来切换轨道。
The
IAMStreamSelectinterface selects from the available streams on a parser filter. For example, a file might contain audio streams encoded in several languages, such as English, German, and French. The application could use this interface to select which language is played.
您可以使用ICaptureGraphBuilder2::FindInterface 方法在您的过滤图中快速定位接口(interface)。
