MediaCaptureInitializationSettings MediaCaptureInitializationSettings MediaCaptureInitializationSettings MediaCaptureInitializationSettings MediaCaptureInitializationSettings Class

Definition

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

public : sealed class MediaCaptureInitializationSettings : IMediaCaptureInitializationSettings, IMediaCaptureInitializationSettings2, IMediaCaptureInitializationSettings3, IMediaCaptureInitializationSettings4, IMediaCaptureInitializationSettings5, IMediaCaptureInitializationSettings6
struct winrt::Windows::Media::Capture::MediaCaptureInitializationSettings : IMediaCaptureInitializationSettings, IMediaCaptureInitializationSettings2, IMediaCaptureInitializationSettings3, IMediaCaptureInitializationSettings4, IMediaCaptureInitializationSettings5, IMediaCaptureInitializationSettings6
public sealed class MediaCaptureInitializationSettings : IMediaCaptureInitializationSettings, IMediaCaptureInitializationSettings2, IMediaCaptureInitializationSettings3, IMediaCaptureInitializationSettings4, IMediaCaptureInitializationSettings5, IMediaCaptureInitializationSettings6
Public NotInheritable Class MediaCaptureInitializationSettings Implements IMediaCaptureInitializationSettings, IMediaCaptureInitializationSettings2, IMediaCaptureInitializationSettings3, IMediaCaptureInitializationSettings4, IMediaCaptureInitializationSettings5, IMediaCaptureInitializationSettings6
var mediaCaptureInitializationSettings = new mediaCaptureInitializationSettings();
Attributes

Windows 10 requirements

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

Examples

The following example initializes the MediaCaptureInitializationSettings. Call InitializeAsync 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;
}

Remarks

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

Constructors

MediaCaptureInitializationSettings() MediaCaptureInitializationSettings() MediaCaptureInitializationSettings() MediaCaptureInitializationSettings() MediaCaptureInitializationSettings()

Creates a new instance of the MediaCaptureInitializationSettings object.

Properties

AlwaysPlaySystemShutterSound AlwaysPlaySystemShutterSound AlwaysPlaySystemShutterSound AlwaysPlaySystemShutterSound AlwaysPlaySystemShutterSound

Gets a value indicating whether the system should always play a shutter sound when a photo is captured.

AudioDeviceId AudioDeviceId AudioDeviceId AudioDeviceId AudioDeviceId

Gets the DeviceInformation.Id of the microphone.

AudioProcessing AudioProcessing AudioProcessing AudioProcessing AudioProcessing

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

AudioSource AudioSource AudioSource AudioSource AudioSource

Gets or sets the audio source for the capture operation.

MediaCategory MediaCategory MediaCategory MediaCategory MediaCategory

Gets or set the media category.

MemoryPreference MemoryPreference MemoryPreference MemoryPreference MemoryPreference

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

PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource PhotoCaptureSource

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

PhotoMediaDescription PhotoMediaDescription PhotoMediaDescription PhotoMediaDescription PhotoMediaDescription

Gets or sets the media description for photo capture.

PreviewMediaDescription PreviewMediaDescription PreviewMediaDescription PreviewMediaDescription PreviewMediaDescription

Gets or sets the media description for preview video.

RecordMediaDescription RecordMediaDescription RecordMediaDescription RecordMediaDescription RecordMediaDescription

Gets or sets the media description for video recording.

SharingMode SharingMode SharingMode SharingMode SharingMode

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

SourceGroup SourceGroup SourceGroup SourceGroup SourceGroup

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.

StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode StreamingCaptureMode

Gets or sets the streaming mode.

VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId

Gets the DeviceInformation.Id of the video camera.

VideoProfile VideoProfile VideoProfile VideoProfile VideoProfile

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

VideoSource VideoSource VideoSource VideoSource VideoSource

Gets or sets the video source for the capture operation.

See also