使用WinRT的Media Foundation Transform进行就地处理时出错 [英] Error when taking in-place processing with Media Foundation Transform of WinRT

查看:323
本文介绍了使用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组件的错误代码??

解决方案

您好,


您可以在"Mferror.h"中查找错误。我不知道为什么RGB24和WMV适合你。我实际上不希望它们起作用。我猜你正在编写一个输入类型为mp4且输出类型为RGB24的解码器。你有
的问题是由于压缩和未压缩数据需要不同的分配器。您无法对压缩数据进行原位转换,然后将其传递到下游。您必须允许在输出和下游
拓扑节点之间协商正确的分配器。


我希望这有帮助,


James


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??

解决方案

Hello,

You can look up the error in "Mferror.h". I don't know why RGB24 and WMV work for you. I actually would not expect them to work. I'm guessing that you are writing a decoder with an input type of mp4 and an output type of RGB24. The problem you are having is due to the different allocators are needed for compressed and uncompressed data. You can't do an in place transform on compressed data and then just pass it downstream. You must allow a proper allocator to be negotiated between your output and the downstream topology node.

I hope this helps,

James


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆