Added a way to access frame texture #70
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, I found that it is currently impossible to scale the frame and convert the color space, which makes it difficult to use in some projects. For example, I currently need to obtain NV12 textures, and I want to scale the frame directly because the size I need is not necessarily the size of the screen, it will normally be smaller.
If you are on Windows, if you want to properly utilize hardware acceleration, and your project also uses the D3D interface at the bottom, then using
Video Processor MFT
is a very good choice.If you want to handle the conversion process more efficiently and avoid frequent memory copy operations between the CPU and GPU, getting the texture directly from the frame is a better way. I can directly pass the texture into
IMFTransform
.I think
Video Processor MFT
is a better way to implement frame conversion in the current project. Have you considered integrating this part into the current project?