locked
MediaCapture without XAML ?

    Question

  • I can use Windows::Media::Capture::MediaCapture without XAML (in d3d game)? 

    Without setting MediaCapture to CaptureElement.Source, MediaCapture::StartPreviewAsync throws unknown exception: HRESULT:0xC00D36BB


    Or should I use StartPreviewToCustomSinkAsync ? Can I use it without encoding? I just want the raw data.



    • Edited by Raptor K Sunday, September 16, 2012 2:43 PM
    Sunday, September 16, 2012 2:21 PM

Answers

  • Hello,

    You should be able to use the MediaCapture component independent of the CaptureElement. However use of the CaptureElement requires that you have the XAML environment initialized in your environment. You can easily mix D3D and XAML in the same application.

    DirectX and XAML interop (Windows Store apps using C++ and DirectX)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, September 21, 2012 10:39 PM
    Moderator

All replies

  • Hello,

    You should be able to use the MediaCapture component independent of the CaptureElement. However use of the CaptureElement requires that you have the XAML environment initialized in your environment. You can easily mix D3D and XAML in the same application.

    DirectX and XAML interop (Windows Store apps using C++ and DirectX)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, September 21, 2012 10:39 PM
    Moderator
  • If using XAML, the preview video surface will always above the back buffer of D3D scene. And it will be always a single square that can not be transformed or rendered to 3D objects ...too monotonous.


    Win8 Developer QQ Group 95331609

    Saturday, September 22, 2012 2:24 AM