如果我使用 MFCreateAggregateSource
在 Windows Media Foundation 中创建聚合媒体源,流的排序顺序是否与传递给 MFCreateAggregateSource
的集合中的源顺序相同?如果不是,是否有任何方法可以确定哪个实际源创建哪个流?
最佳答案
MSDN 文章 MFCreateAggregateSource
可以消除疑虑解释聚合顺序,但它不提供此类详细信息(目前)。
那些有 API 经验的人报告说聚合顺序很简单:集合元素的顺序,以及各个源中的流。
在 MSDN Forums 上的交叉帖子中查看更多信息:
Example 1 :
You have 3 Media Sources, A, B and C. Each source has only one stream. If you add them in alphabetical order to a collection, you will get 3 streams on the Aggregate Source.
->
Stream 0 is Source A ( Stream 0 )
Stream 1 is Source B ( Stream 0 )
Stream 2 is Source C ( Stream 0 )
Example 2 :
Same Media Sources, but this time B has 2 streams. If you add the sources in alphabetical order to a collection, you will get 4 streams on the Aggregate Source.
->
Stream 0 is Source A ( Stream 0 )
Stream 1 is Source B ( Stream 0 )
Stream 2 is Source B ( Stream 1 )
Stream 3 is Source C ( Stream 0 )
关于c++ - MFCreateAggregateSource 是否对排序做出任何保证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37279485/