MediaCaptureInitializationSettings.MemoryPreference MediaCaptureInitializationSettings.MemoryPreference MediaCaptureInitializationSettings.MemoryPreference MediaCaptureInitializationSettings.MemoryPreference MediaCaptureInitializationSettings.MemoryPreference Property

Definition

Gets or sets an object specifying the preferred memory location for storing frames acquired from a MediaFrameSource used by the MediaCapture.

public : MediaCaptureMemoryPreference MemoryPreference { get; set; }
MediaCaptureMemoryPreference MemoryPreference();

void MemoryPreference(MediaCaptureMemoryPreference memorypreference);
public MediaCaptureMemoryPreference MemoryPreference { get; set; }
Public ReadWrite Property MemoryPreference As MediaCaptureMemoryPreference
var mediaCaptureMemoryPreference = mediaCaptureInitializationSettings.memoryPreference;
mediaCaptureInitializationSettings.memoryPreference = mediaCaptureMemoryPreference;

Property Value

An object specifying preferred the memory location for storing frames acquired from a MediaFrameSource.

Additional features and requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
backgroundMediaRecording

Remarks

The MediaCapture object may store the image data of a VideoMediaFrame acquired from a MediaFrameSource in either CPU or GPU memory. When MemoryPreference is set to Cpu, CPU memory is used and therefore the SoftwareBitmap property of acquired VideoMediaFrame objects will be non-null and contain the image data for the frame. When Auto is specified, the system will dynamically choose the optimal memory location for the current device. If the system chooses to use GPU memory, the Direct3DSurface property of acquired VideoMediaFrame objects will be non-null and contain the image data for the frame.