gpt4 book ai didi

c# - 如何使用 RenderFile 构建 Filtergraph 在多个音轨之间进行选择?

转载 作者:太空宇宙 更新时间:2023-11-03 22:00:07 24 4
gpt4 key购买 nike

我正在用 C# 开发一个应用程序,我正在使用 DirectShow.NET 库来呈现具有多个音轨的 .AVI 文件

如何在多个音轨之间切换?我正在使用 RenderFile 构建我的过滤器图,而不是手动构建它。

最佳答案

如果支持在音轨之间切换,管道中的过滤器之一(多路分解过滤器)将公开 IAMStreamSelect界面,您可以使用它来切换轨道。

The IAMStreamSelect interface 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)。

关于c# - 如何使用 RenderFile 构建 Filtergraph 在多个音轨之间进行选择?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10530765/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com