Asked by:
Why does MediaEngine crashes?

Question
-
Hello! I downloaded a Media engine native C++ video playback sample. And tryed to play video with it. And I noticed that if I open the raw video file than it plays well, but if I open encoded video file than example crashes.
There are two d3ddevice creation ways I see in this sample:
- With D3D_DRIVER_TYPE_HARDWARE and these D3D11_CREATE_DEVICE_VIDEO_SUPPORT | D3D11_CREATE_DEVICE_BGRA_SUPPORT flags
- With D3D_DRIVER_TYPE_WARP and this D3D11_CREATE_DEVICE_BGRA_SUPPORT flag
In the first case only raw video can be playing. With encoded video the sample will crashes.
In the second case encoded and raw video files are playing without any problems. Except this message in output window: "First-chance exception at 0x74A6277C in MEPlaybackNative.exe: Microsoft C++ exception: _com_error at memory location 0x0480F23C."
I can't find more info about the MediaEngine and Direct3D interaction. Please, MS, give more info about dependencies and interaction between MediaEngine API and Direct3D.
The second case, which I described above, of direct3d device creation allowed for encoded video playing but not for performance rendering! Driver type D3D_DRIVER_TYPE_WARP isn't suitable for our game engine, because the fps is decreasing too much.
Please, help! This issue is a very big hindrance on our game app's way to the Windows Store!
- Edited by hellobody Saturday, October 13, 2012 6:07 AM correction for more accuracy
Thursday, October 11, 2012 9:39 AM
All replies
-
I solved the problem temporarily by using two separate direct3d devices, one for rendering and second for MediaEngine usage. But the question is still open.
- Edited by hellobody Thursday, October 11, 2012 9:49 PM solecism
Thursday, October 11, 2012 2:01 PM -
What kind of 'encoding' are you using?
When you say the sample crashes what API fails?
Be sure to read the details on the limitations imposed by using D3D11_CREATE_DEVICE_VIDEO_SUPPORT.
Thursday, October 11, 2012 8:23 PM -
I have a raw video file in .avi format. This video file was created with some 3D modeling, animation and rendering application. And has unsuitable large size.
I used some free video converter soft to convert my video file to .wmv format. Seems like this soft used Windows Media Video 9 codec to encode video. Then size of file became allowable for our game project.
Then I tried to playback this compressed video file by media engine playback sample’s player. I tried to run this video playback sample at 4 different machines under Windows 8 RTM. And those machines were 3 Desktop PCs and 1 Tablet PC. All of those had a different video cards. I noticed, when was debugging the code of this sample on those machines, that if direct3d device was created with feature level 10.1 or higher the playback sample crashed, when was trying to play this converted to .wmv video file (or any other encoded video files by other supported by MediaEngine API codecs). But if direct3d device was created with feature level 9.3 than all works fine. Compressed video files were playing without any problems in this case. (For determine what is the feature level was, I was looking at output parameter D3D_FEATURE_LEVEL *pFeatureLevel of the D3D11CreateDevice method.)Here are the screenshots with some crash info below.
Seems like some internal error occured in TransferVideoFrame method, I think.
- Edited by hellobody Friday, October 12, 2012 8:01 AM corrections
Friday, October 12, 2012 7:27 AM -
Hi! I still need an answer. Why does MediaEngine crashes?Saturday, October 13, 2012 6:05 AM
-
upMonday, October 15, 2012 11:19 AM
-
Waiting for october 26?
- Edited by hellobody Tuesday, October 16, 2012 12:43 PM
Tuesday, October 16, 2012 11:57 AM -
Hi, did you ever figure this out. I'm getting the same problem. Crash is occurring at the same location.
Thx,
-y
Wednesday, January 16, 2013 1:38 AM -
This seemed to "fix" the problem for me:
change D3D_DRIVER_TYPE_HARDWARE to D3D_DRIVER_TYPE_SOFTWARE for function
D3D11CreateDevice
I guess certain GPU's don't support onboard video decoding?
Perhaps D3D_DRIVER_TYPE_SOFTWARE should be the default.
Wednesday, January 16, 2013 3:05 AM