MediaCaptureSettings MediaCaptureSettings MediaCaptureSettings MediaCaptureSettings MediaCaptureSettings Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Contains read-only configuration settings for the MediaCapture object.

public : sealed class MediaCaptureSettings : IMediaCaptureSettings, IMediaCaptureSettings2
struct winrt::Windows::Media::Capture::MediaCaptureSettings : IMediaCaptureSettings, IMediaCaptureSettings2
public sealed class MediaCaptureSettings : IMediaCaptureSettings, IMediaCaptureSettings2
Public NotInheritable Class MediaCaptureSettings Implements IMediaCaptureSettings, IMediaCaptureSettings2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
webcam backgroundMediaRecording microphone

Remarks

To get an instance of this class, retrieve the MediaCapture.MediaCaptureSettings property.

For how-to guidance for using the MediaCapture object to capture audio, photos, and video, see Camera.

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Properties

AudioDeviceId AudioDeviceId AudioDeviceId AudioDeviceId AudioDeviceId

Gets the DeviceInformation.Id of the microphone.

public : Platform::String AudioDeviceId { get; }
winrt::hstring AudioDeviceId();
public string AudioDeviceId { get; }
Public ReadOnly Property AudioDeviceId As string
var string = mediaCaptureSettings.audioDeviceId;
Value
string string string

The DeviceInformation.Id of the microphone.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
webcam backgroundMediaRecording microphone

Remarks

This method may return null if the device doesn't support this functionality. For more information, see the DeviceInformation class.

AudioProcessing AudioProcessing AudioProcessing AudioProcessing AudioProcessing

Gets the audio processing mode.

public : AudioProcessing AudioProcessing { get; }
AudioProcessing AudioProcessing();
public AudioProcessing AudioProcessing { get; }
Public ReadOnly Property AudioProcessing As AudioProcessing
var audioProcessing = mediaCaptureSettings.audioProcessing;
Value
AudioProcessing AudioProcessing AudioProcessing

The audio processing mode.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

CameraSoundRequiredForRegion CameraSoundRequiredForRegion CameraSoundRequiredForRegion CameraSoundRequiredForRegion CameraSoundRequiredForRegion

Gets a value that indicates if the device’s region requires that a sound be played when a photo or video is captured.

public : Platform::Boolean CameraSoundRequiredForRegion { get; }
bool CameraSoundRequiredForRegion();
public bool CameraSoundRequiredForRegion { get; }
Public ReadOnly Property CameraSoundRequiredForRegion As bool
var bool = mediaCaptureSettings.cameraSoundRequiredForRegion;
Value
bool bool bool

true if the device’s region requires that a sound be played when a photo or video is captured; otherwise, false. An app may play a sound during photo or video capture even if it is not required by the device’s region.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

Remarks

App developers can use this information to determine if they should suppress playing a sound when the device takes a picture since the operating system will play a sound if it is required by the device's region.

You can specify that the system should always play a shutter sound when a photo is captured by setting the MediaCaptureInitializationSettings.AlwaysPlaySystemShutterSound property to true when initializing the MediaCapture object.

ConcurrentRecordAndPhotoSequenceSupported ConcurrentRecordAndPhotoSequenceSupported ConcurrentRecordAndPhotoSequenceSupported ConcurrentRecordAndPhotoSequenceSupported ConcurrentRecordAndPhotoSequenceSupported

Gets a value that indicates if the capture device supports recording video and taking a photo sequence at the same time.

public : Platform::Boolean ConcurrentRecordAndPhotoSequenceSupported { get; }
bool ConcurrentRecordAndPhotoSequenceSupported();
public bool ConcurrentRecordAndPhotoSequenceSupported { get; }
Public ReadOnly Property ConcurrentRecordAndPhotoSequenceSupported As bool
var bool = mediaCaptureSettings.concurrentRecordAndPhotoSequenceSupported;
Value
bool bool bool

true if the capture device supports concurrently recording video and capturing a photo sequence; otherwise, false.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

ConcurrentRecordAndPhotoSupported ConcurrentRecordAndPhotoSupported ConcurrentRecordAndPhotoSupported ConcurrentRecordAndPhotoSupported ConcurrentRecordAndPhotoSupported

Gets a value that indicates if the capture device supports recording video and taking a photo at the same time.

public : Platform::Boolean ConcurrentRecordAndPhotoSupported { get; }
bool ConcurrentRecordAndPhotoSupported();
public bool ConcurrentRecordAndPhotoSupported { get; }
Public ReadOnly Property ConcurrentRecordAndPhotoSupported As bool
var bool = mediaCaptureSettings.concurrentRecordAndPhotoSupported;
Value
bool bool bool

true if the capture device supports concurrently recording video and capturing a photo; otherwise, false.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

Direct3D11Device Direct3D11Device Direct3D11Device Direct3D11Device Direct3D11Device

Prerelease. Gets an IDirect3DDevice representing the Direct3D device instance being used by the associated MediaCapture object.

public : IDirect3DDevice Direct3D11Device { get; }
IDirect3DDevice Direct3D11Device();
public IDirect3DDevice Direct3D11Device { get; }
Public ReadOnly Property Direct3D11Device As IDirect3DDevice
var iDirect3DDevice = mediaCaptureSettings.direct3D11Device;
Value
IDirect3DDevice IDirect3DDevice IDirect3DDevice

An IDirect3DDevice representing the Direct3D device instance being used by the associated MediaCapture object.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)
Capabilities
webcam backgroundMediaRecording microphone

Remarks

By default, the MediaCapture object will attempt to use the GPU for its computation and use Direct3D surfaces to image data, although this can be disabled with the MemoryPreference property. This property allows an app to access the instance of the Direct3D device used to allocate the surfaces. This is particularly useful when interoperating with other Direct3D-based APIs, such as Win2D.

Horizontal35mmEquivalentFocalLength Horizontal35mmEquivalentFocalLength Horizontal35mmEquivalentFocalLength Horizontal35mmEquivalentFocalLength Horizontal35mmEquivalentFocalLength

Gets the horizontal 35mm equivalent focal length of the camera lens on the capture device.

public : IReference<unsigned int> Horizontal35mmEquivalentFocalLength { get; }
IReference<uint32_t> Horizontal35mmEquivalentFocalLength();
public Nullable<uint> Horizontal35mmEquivalentFocalLength { get; }
Public ReadOnly Property Horizontal35mmEquivalentFocalLength As Nullable<uint>
var nullable = mediaCaptureSettings.horizontal35mmEquivalentFocalLength;
Value
Nullable<uint> Nullable<uint> Nullable<uint>

The horizontal 35mm equivalent focal length of the camera lens.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

Remarks

The value of Horizontal35mmEquivalentFocalLength is for the current preview resolution and may change each time the resolution is changed using VideoDeviceController.SetMediaStreamPropertiesAsync.

MediaCategory MediaCategory MediaCategory MediaCategory MediaCategory

Gets the media category of the media.

public : MediaCategory MediaCategory { get; }
MediaCategory MediaCategory();
public MediaCategory MediaCategory { get; }
Public ReadOnly Property MediaCategory As MediaCategory
var mediaCategory = mediaCaptureSettings.mediaCategory;
Value
MediaCategory MediaCategory MediaCategory

The media category

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource

Gets the stream that is used for photo capture.

public : PhotoCaptureSource PhotoCaptureSource { get; }
PhotoCaptureSource PhotoCaptureSource();
public PhotoCaptureSource PhotoCaptureSource { get; }
Public ReadOnly Property PhotoCaptureSource As PhotoCaptureSource
var photoCaptureSource = mediaCaptureSettings.photoCaptureSource;
Value
PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource

The stream that is used for photo capture.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
webcam backgroundMediaRecording microphone

PitchOffsetDegrees PitchOffsetDegrees PitchOffsetDegrees PitchOffsetDegrees PitchOffsetDegrees

Gets the pitch offset of the camera in degrees.

public : IReference<int> PitchOffsetDegrees { get; }
IReference<int32_t> PitchOffsetDegrees();
public Nullable<int> PitchOffsetDegrees { get; }
Public ReadOnly Property PitchOffsetDegrees As Nullable<int>
var nullable = mediaCaptureSettings.pitchOffsetDegrees;
Value
Nullable<int> Nullable<int> Nullable<int>

The pitch offset in degrees.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode

Gets the streaming mode.

public : StreamingCaptureMode StreamingCaptureMode { get; }
StreamingCaptureMode StreamingCaptureMode();
public StreamingCaptureMode StreamingCaptureMode { get; }
Public ReadOnly Property StreamingCaptureMode As StreamingCaptureMode
var streamingCaptureMode = mediaCaptureSettings.streamingCaptureMode;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
webcam backgroundMediaRecording microphone

Remarks

This property indicates whether audio capture, video capture, or both are enabled.

Vertical35mmEquivalentFocalLength Vertical35mmEquivalentFocalLength Vertical35mmEquivalentFocalLength Vertical35mmEquivalentFocalLength Vertical35mmEquivalentFocalLength

Gets the vertical 35mm equivalent focal length of the camera lens on the capture device.

public : IReference<unsigned int> Vertical35mmEquivalentFocalLength { get; }
IReference<uint32_t> Vertical35mmEquivalentFocalLength();
public Nullable<uint> Vertical35mmEquivalentFocalLength { get; }
Public ReadOnly Property Vertical35mmEquivalentFocalLength As Nullable<uint>
var nullable = mediaCaptureSettings.vertical35mmEquivalentFocalLength;
Value
Nullable<uint> Nullable<uint> Nullable<uint>

The vertical 35mm equivalent focal length of the camera lens.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

Remarks

The value of Vertical35mmEquivalentFocalLength is for the current preview resolution and may change each time the resolution is changed using VideoDeviceController.SetMediaStreamPropertiesAsync.

VideoDeviceCharacteristic VideoDeviceCharacteristic VideoDeviceCharacteristic VideoDeviceCharacteristic VideoDeviceCharacteristic

Gets a value that indicates which video streams are independent of each other.

public : VideoDeviceCharacteristic VideoDeviceCharacteristic { get; }
VideoDeviceCharacteristic VideoDeviceCharacteristic();
public VideoDeviceCharacteristic VideoDeviceCharacteristic { get; }
Public ReadOnly Property VideoDeviceCharacteristic As VideoDeviceCharacteristic
var videoDeviceCharacteristic = mediaCaptureSettings.videoDeviceCharacteristic;
Value
VideoDeviceCharacteristic VideoDeviceCharacteristic VideoDeviceCharacteristic

A value of VideoDeviceCharacteristic that indicates which video streams are independent pf each other.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
backgroundMediaRecording

VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId

Gets the DeviceInformation.Id of the video camera.

public : Platform::String VideoDeviceId { get; }
winrt::hstring VideoDeviceId();
public string VideoDeviceId { get; }
Public ReadOnly Property VideoDeviceId As string
var string = mediaCaptureSettings.videoDeviceId;
Value
string string string

The DeviceInformation.Id of the video camera.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
webcam backgroundMediaRecording microphone

Remarks

This method may return null if the device doesn't support this functionality. For more information, see the DeviceInformation class.