本文介绍了使用WinRT的Media Foundation Transform进行就地处理时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从MSDN,我发现我可以就地进行多次修改处理帧。


1。设置属性"dwFlags"到"MFT_INPUT_STREAM_PROCESS_IN_PLACE"在参数"MFT_INPUT_STREAM_INFO"中函数"GetInputStreamInfo"



2. 设置属性" dwFlags"到"MFT_OUTPUT_STREAM_PROVIDES_SAMPLES"在参数"MFT_OUTPUT_STREAM_INFO"中函数"GetOutputStreamInfo"



3。从输入样本中分配输出样本的指针。


但是我遇到了问题。如果我通过函数  addEffectAsync我的应用程序插入我的MFT组件来捕获流,这种方法可以正常工作。


但是对于视频播放,如果我通过msInsertVideoEffect插入我的MFT组件,则在播放时会导致错误


0x40080202: WinRT变换错误(参数:0xC00D3E85,0x00000000,0x00000009,0x037EF294)


我发现对于视频颜色空间"RGB24","NV12","YUY2"和"YUY2"的组合。和视频格式".mp4","。wmv",它仅在"RGB24"和"RGB24"的一种组合下工作。和".wmv"


我无法弄清楚捕获流的工作原理和视频播放的原因。此外,为什么只有"RGB24"的组合才能使用"RGB24"。和".wmv"有效吗?


此外,我可以找到任何文件来实现WinRT组件的错误代码??

解决方案

From MSDN, I found that I can process frames in-place for several modification.

1. Setting attribute "dwFlags" to "MFT_INPUT_STREAM_PROCESS_IN_PLACE" within parameter "MFT_INPUT_STREAM_INFO" of function "GetInputStreamInfo"

2. Setting attribute "dwFlags" to "MFT_OUTPUT_STREAM_PROVIDES_SAMPLES" within parameter "MFT_OUTPUT_STREAM_INFO" of function "GetOutputStreamInfo"

3. Assigning pointer of output sample from input sample.

But I encounter a problem. This method works fine if I insert my MFT component to capture stream through function addEffectAsync of my application.

But for video playback, if I insert my MFT component through msInsertVideoEffect, it will cause an error when playing

0x40080202: WinRT transform error (parameters: 0xC00D3E85, 0x00000000, 0x00000009, 0x037EF294)

And I found that for the combinations of video color space "RGB24", "NV12", "YUY2" and video format ".mp4", ".wmv", it only works under one combination which is "RGB24" and ".wmv"

I can't figure out why capture stream works and video playback not. Furthermore, why only the combination of "RGB24" and ".wmv" works?

Besides, any document I can find for realizing the error code of WinRT component??

解决方案


这篇关于使用WinRT的Media Foundation Transform进行就地处理时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 04:49