如何从M11编码器的D11纹理创建IMFSample? [英] How to create IMFSample from D11 texture for MFT encoder?
本文介绍了如何从M11编码器的D11纹理创建IMFSample?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI,
推荐答案
您的代码存在一些基本问题(即使它基本上没问题)。
There are a few fundamental problems with your code (even though it's mostly okay).
- 软件编码器既不需要Direct3D管理器也不需要输入作为纹理
- 您应该在设置媒体类型之前附加Direct3D管理器(认为这会严重影响媒体类型支持)
关于标题问题, MFCreateVideoSampleFromSurface 功能完全符合要求:
Regarding the title question, MFCreateVideoSampleFromSurface function is doing exactly the requested:
创建管理Direct3D曲面的媒体样本。
Creates a media sample that manages a Direct3D surface.
这篇关于如何从M11编码器的D11纹理创建IMFSample?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文