How to use Windows Media Foundation with UWP without a topology

天大地大妈咪最大 提交于 2019-12-12 18:16:26

问题


I have been reading the Polinger book "Developing Microsoft Media Foundation Applications" in order to understand the Microsoft sample MixedRemoteViewCompositor for the Hololens. A key concept of the text is that Media Foundation components are COM objects that are connected into a graph structure called a Topology. However, the sample code is for Universal Windows Platform (UWP) and the word "topology" does not exist anywhere in the code. The call to create a topology does not exist in the code.

So my question is whether UWP applications use a topology in Media Foundation and if not how does one connect the Media Foundation COM components together to form a processing pipeline? The sample code has sources and sinks but I cannot tell how they connect.

Scott


回答1:


So my question is whether UWP applications use a topology in Media Foundation No.

Firstly, IMFTopologyNode interface is not allowed in UWP.

Secondly, IMFTopology interface which contains IMFTopologyNode, is not allowed in UWP.

Thirdly, IMFMediaSession interface which creates media pipeline by IMFTopology, is not allowed in UWP,

Fourthly, MFCreateMediaSession - "C" function which creates IMFMediaSession, is not allowed in UWP.

not how does one connect the Media Foundation COM components together to form a processing pipeline? - it is done behind of MF components with IMFSourceReader and IMFSinkWriter - developer CANNOT have direct access to those processing pipelines.

So is it possible to use Media Foundation Transforms (MFT) with the UWP architecture? Yes. If you want add your's component with IMFTransform interface - then you must use component with IMFSourceReaderEx interface - it has method AddTransformForStream - Adds a transform, such as an audio or video effect, to a stream.

About How create Source Reader you can read there - Source Reader



来源:https://stackoverflow.com/questions/47059898/how-to-use-windows-media-foundation-with-uwp-without-a-topology

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!