Using "Auto" option of MediaCaptureMemoryPreference returns "null" frame (SoftwareBitmap)

Hi,

I am trying to build an app that captures the video frames from the Locatable camera of the HoloLens.

I have referred to the following article :
https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/process-media-frames-with-mediaframereader
and this:
https://docs.microsoft.com/en-us/uwp/api/windows.media.capture.mediacaptureinitializationsettings.MemoryPreference

As suggested, I am getting hold of the SoftwareBitmap, when in "Auto" mode, via the IDirect3DSurface -
var bitmap = SoftwareBitmap.CreateCopyFromSurfaceAsync(frame.VideoMediaFrame.Direct3DSurface)

The bitmap always evaluates to null on HoloLens. While it works well on other UWP based devices.

Can someone kindly help how to address this issue?

Cheers,
Raghu

Sign In or Register to comment.