Comments (3)
DX12 is supported in some scenarios (primarily: decoding, video processing, SourceReader). It is also supported by the IMFDXGIDeviceManager API, it looks like the documentation has not been properly updated however.
IMFDXGIDeviceManager::GetVideoService specifically will work fine when using a ID3D12Device pointer and IID_ID3D12Device. ResetDevice will also accept a ID3D12Device. Note that LockDevice, UnlockDevice and TestDevice should generally not be used with DX12 (DX12 is fully asynchronous and device removal is not possible).
Note that not all APIs will work if you pass a DX12 device to them. Notably SinkWriter, and MediaEngine both will fail when given a DX12 device. DX12 support for these APIs is still in progress.
from media-foundation.
Hi,
So currently it seems we need to use Directx11 as the decoding device (with Media Foundation), and DirectX 12 as the rendering device, and share the resources between DX11 and DX12?
It seems that DirectX 12 requires an "NT Handle".
Is there any API in Media Foundation to create the resource as an "NT Handle" Then we can share it with directx 12?
from media-foundation.
IMFDXGIDeviceManager::GetVideoService specifically will work fine when using a ID3D12Device pointer and IID_ID3D12Device.
There's also ID3D12VideoDevice
which is equivalent to ID3D11VideoDevice
.
BTW a simple sample would be helpful. I have some code working but when closing everything it seems the underlying D3D12+DXVA decoder is leaking some ID3D12Fence
(Win10 with NVIDIA GPU). On Xbox there's IMFD3D12SynchronizationObjectCommands
to handle synchronization. But on desktop this interface doesn't exist. It also available in Win10 21H1 (and Win11 I suppose).
In other cases on closing, it complains that there are some pending operations on a ID3D12CommandQueue
that are still pending. After analysis it's some pictures that are "decoding" but were never sent to the display. Except there is no way to wait until these pending operations are done without faking use in another command queue and wait until the buffers are ready...
I suppose I'm missing something on the exit. I'm doing all these (in that order):
MFT_MESSAGE_COMMAND_FLUSH
SetOutputType(nullptr)
MFT_MESSAGE_NOTIFY_RELEASE_RESOURCES
MFT_MESSAGE_SET_D3D_MANAGER
nullptrMFT_MESSAGE_NOTIFY_END_STREAMING
from media-foundation.
Related Issues (20)
- MediaEngineEMEUWPSample doesn't display anything HOT 2
- ID3D12Fence leak HOT 3
- Deleted
- Sample does not run in windows 11
- Does aac_mf support cbr encoding? HOT 2
- Windows Media Player fails to play Opus audio track of AV1 files with MP4 container HOT 6
- IMFContentDecryptionModuleSession::GenerateRequest failed with code 0x8004c3e8 HOT 15
- Sample pull-request checks fail
- MediaFoundation seems incompatible with Arbitrary Code Guard
- License persistent in IMFContentDecryptionModuleSession::Update HOT 11
- MXA training video links are broken
- Switching from minimize to restore breaks video placement
- TransferVideoFrame in MediaEngineDCompWin32Sample always returns black HOT 1
- mpg video cannot be loaded. HOT 5
- Crash when using VP8 decoder with D3D11 HOT 9
- HEVCVideoExtension support Windows Server (2019 / 2022) HOT 3
- [MediaEngineEMEUWPSample] The sample protection algorithms supported by components are not compatible. (0xC00D7176))) HOT 6
- Does IMFExtendedDRMTypeSupport::IsTypeSupportedEx and IMFMediaEngine::CanPlayType supported on ARM64? HOT 1
- GPU memory leak with HEVC hardware decoder when draining and sending MFT_MESSAGE_NOTIFY_END_STREAMING message HOT 2
- MF_MPEG4SINK_MOOV_BEFORE_MDAT = TRUE : invalid output file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media-foundation.