Share via


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:
 property MediaCaptureMemoryPreference MemoryPreference { MediaCaptureMemoryPreference get(); void set(MediaCaptureMemoryPreference value); };
MediaCaptureMemoryPreference MemoryPreference();

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

Property Value

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

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)
App 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.

Applies to