c++ - MFCreateAggregateSource 是否对排序做出任何保证?

标签 c++ ms-media-foundation

如果我使用 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/

相关文章:

c++ - 媒体基金会 AMR 解码

winapi - Color Converter DSP 的 IMFTransform 接口(interface)在 SetInputType/SetOutputType 上给出 E_INVALIDARG

c++ - 在 C++ 中映射两种对象类型

c++ - 如果使用 unsigned,为什么重载会导致调用不明确?

c++ - 在 RGB channel 中拆分连续缓冲区 (IMFMediaBuffer)

c++ - 使用IMFSourceReader进行音频流传输(Microsoft Media Foundation)

C++转义码参数

c++ - int a=1, 是一个 || 1 常量表达式?

C++ 风格——const T& 与 T const&

c++ - 媒体基础 : WavSink spools audio faster than real time consumption rate - can spooling be constrained real-time?