locked
Directx canvas for html5 RRS feed

Answers

  • Yes, you can use Media Extensions through the WinRT media APIs (not part of WinJS speifically--WinJS is just a library). In that case it's a specific plug-in model as supported by Media Foundation, and that plug-in sits between the video decoder and the video element rendering. The video element itself, however, does not expose the D3D surface it that it uses internally.

    The readback method you suggest is not something I'm familiar with. In any case, getting a D3D surface that you can talk to from JavaScript is simply not a suppported scenario from everything I've seen and heard.

    Monday, March 5, 2012 3:50 PM

All replies

  • No, HTML/JS cannot access DirectX drawing surfaces. The only similar option is the HTML5 canvas (which ultimately goes to a DirectX surface within the rendering engine and takes advantage of the GPU).

    Monday, March 5, 2012 1:07 AM
  • Thanks for the reply.

    At the build keynote they showed a demo rendering C++ D3D content to WinJS  but it involved GPU readback in sending bitmaps to canvas.
    I believe Winjs video supports Media Extensions via msInsertVideoEffect, Media Foundation Transforms MFT allows passing D3D surfaces via transforms.

    http://code.msdn.microsoft.com/Media-extensions-sample-7b466096/sourcecode?fileId=50967&pathId=551181130 

    Could you potentially put a custom directx surface in the video element? 



    • Edited by slyi Thursday, March 8, 2012 4:33 PM
    Monday, March 5, 2012 3:20 PM
  • Yes, you can use Media Extensions through the WinRT media APIs (not part of WinJS speifically--WinJS is just a library). In that case it's a specific plug-in model as supported by Media Foundation, and that plug-in sits between the video decoder and the video element rendering. The video element itself, however, does not expose the D3D surface it that it uses internally.

    The readback method you suggest is not something I'm familiar with. In any case, getting a D3D surface that you can talk to from JavaScript is simply not a suppported scenario from everything I've seen and heard.

    Monday, March 5, 2012 3:50 PM
  • Jmorrill did something like this twitpic.com/9dicm8 on his gpu metro media effects sample
    
    Thursday, July 12, 2012 11:17 AM