MediaCaptureInitializationSettings MediaCaptureInitializationSettings MediaCaptureInitializationSettings MediaCaptureInitializationSettings Class

Contains initialization settings for the MediaCapture object which are passed to the InitializeAsync() method.

Syntax

Declaration

public sealed class MediaCaptureInitializationSettingspublic sealed class MediaCaptureInitializationSettingsPublic NotInheritable Class MediaCaptureInitializationSettings

Remarks

For how-to guidance on initializing and shutting down the MediaCapture object, see Basic photo, video, and audio capture with MediaCapture.

Examples

The following example initializes the MediaCaptureInitializationSettings. Call InitializeAsync(Windows.Media.Capture.MediaCaptureInitializationSettings) with these settings to initialize a MediaCapture object.

private void InitCaptureSettings()
{
    _captureInitSettings = null;
    _captureInitSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
    _captureInitSettings.AudioDeviceId = "";
    _captureInitSettings.VideoDeviceId = "";
    _captureInitSettings.StreamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.AudioAndVideo;
    _captureInitSettings.PhotoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.VideoPreview;
    
    if (_deviceList.Count > 0)
        _captureInitSettings.VideoDeviceId = _deviceList[0].Id;
}
// Initialize the MediaCaptureInitialzationSettings.
function initCaptureSettings() {
    captureInitSettings = null;
    captureInitSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
    captureInitSettings.audioDeviceId = "";
    captureInitSettings.videoDeviceId = "";
    captureInitSettings.streamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.audioAndVideo;
    captureInitSettings.photoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.photo;
    if (deviceList.length > 0)
        captureInitSettings.videoDeviceId = deviceList[0].id;
}

Constructors summary

Creates a new instance of the @Windows.Media.Capture.MediaCaptureInitializationSettings.#ctor object.

Properties summary

Gets the Id of the microphone.

Gets or sets a value that specifies the audio processing mode.

Gets or sets the audio source for the capture operation.

Gets or set the media category.

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

Gets or sets the stream that is used for photo capture.

Gets or sets the media description for photo capture.

Gets or sets the media description for preview video.

Gets or sets the media description for video recording.

Gets or sets an object that specifies the sharing mode for the MediaCapture.

Gets or sets the MediaFrameSourceGroup with which the MediaCapture should be initialized. This property defines a set of media frame sources that can be used simultaneously.

Gets or sets the streaming mode.

Gets the Id of the video camera.

Gets or sets the video profile which provides hints to the driver to allow it to optimize for different capture scenarios.

Gets or sets the video source for the capture operation.

Constructors

  • MediaCaptureInitializationSettings()
    MediaCaptureInitializationSettings()
    MediaCaptureInitializationSettings()
    MediaCaptureInitializationSettings()

    Creates a new instance of the @Windows.Media.Capture.MediaCaptureInitializationSettings.#ctor object.

    public MediaCaptureInitializationSettings()public MediaCaptureInitializationSettings()Public Function MediaCaptureInitializationSettings() As

Properties

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Capabilities

webcam
microphone

Attributes

Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Media.Capture.dll