Created
September 5, 2012 14:15
-
-
Save marek-stoj/3637293 to your computer and use it in GitHub Desktop.
SharpDX MediaEngine on Win8 Metro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code (the line with new MediaEngine(...) specifically) throws: | |
// HRESULT: [0xC00D36BD], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown | |
// Startup MediaManager | |
MediaManager.Startup(); | |
// Create a DXGI Device Manager | |
dxgiDeviceManager = new DXGIDeviceManager(); | |
dxgiDeviceManager.ResetDevice(devices.DeviceDirect3D); | |
// Setup Media Engine attributes | |
var attributes = new MediaEngineAttributes | |
{ | |
DxgiManager = dxgiDeviceManager, | |
VideoOutputFormat = (int) SharpDX.DXGI.Format.B8G8R8A8_UNorm, | |
}; | |
using (var factory = new MediaEngineClassFactory()) | |
using (var mediaEngine = new MediaEngine(factory, attributes, MediaEngineCreateflags.Audioonly)) | |
mediaEngineEx = mediaEngine.QueryInterface<MediaEngineEx>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Possibly a silly question: But why are you disposing of the MediaEngine instance?