MFCreateAggregateSource 是否对排序做出任何保证?
Does MFCreateAggregateSource make any guarantees about ordering?
如果我使用 MFCreateAggregateSource
在 Windows Media Foundation 中创建聚合媒体源,流的排序顺序是否与传递给 MFCreateAggregateSource
的集合中的源顺序相同?如果不是,是否有任何方法可以确定哪个实际源创建哪个流?
MSDN 文章 MFCreateAggregateSource
解释聚合顺序可以消除疑虑,但它没有提供此类细节(目前)。
那些使用过 API 的人报告说聚合顺序很简单:集合元素的顺序,以及各个来源中的流。
在 MSDN Forums 上的 cross-post 中查看更多内容:
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 )
如果我使用 MFCreateAggregateSource
在 Windows Media Foundation 中创建聚合媒体源,流的排序顺序是否与传递给 MFCreateAggregateSource
的集合中的源顺序相同?如果不是,是否有任何方法可以确定哪个实际源创建哪个流?
MSDN 文章 MFCreateAggregateSource
解释聚合顺序可以消除疑虑,但它没有提供此类细节(目前)。
那些使用过 API 的人报告说聚合顺序很简单:集合元素的顺序,以及各个来源中的流。
在 MSDN Forums 上的 cross-post 中查看更多内容:
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 )