MediaCaptureSettings MediaCaptureSettings MediaCaptureSettings MediaCaptureSettings Class

Contains read-only configuration settings for the MediaCapture object.

Syntax

Declaration

public sealed class MediaCaptureSettingspublic sealed class MediaCaptureSettingsPublic NotInheritable Class MediaCaptureSettingspublic sealed class MediaCaptureSettings

Remarks

To get an instance of this class, retrieve the 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 summary

Gets the Id of the microphone.

Gets the audio processing mode.

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

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

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

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

Gets the media category of the media.

Gets the stream that is used for photo capture.

Gets the pitch offset of the camera in degrees.

Gets the streaming mode.

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

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

Gets the Id of the video camera.

Properties

  • AudioDeviceId
    AudioDeviceId
    AudioDeviceId
    AudioDeviceId

    Gets the Id of the microphone.

    public string AudioDeviceId { get; }public string AudioDeviceId { get; }Public ReadOnly Property AudioDeviceId As stringpublic string AudioDeviceId { get; }

    Property Value

    • string
      string
      string
      string

      The Id of the 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

    Gets the audio processing mode.

    public AudioProcessing AudioProcessing { get; }public AudioProcessing AudioProcessing { get; }Public ReadOnly Property AudioProcessing As AudioProcessingpublic AudioProcessing AudioProcessing { get; }

    Property Value

  • 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 bool CameraSoundRequiredForRegion { get; }public bool CameraSoundRequiredForRegion { get; }Public ReadOnly Property CameraSoundRequiredForRegion As boolpublic bool CameraSoundRequiredForRegion { get; }

    Property Value

    • bool
      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.

    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.

  • 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 bool ConcurrentRecordAndPhotoSequenceSupported { get; }public bool ConcurrentRecordAndPhotoSequenceSupported { get; }Public ReadOnly Property ConcurrentRecordAndPhotoSequenceSupported As boolpublic bool ConcurrentRecordAndPhotoSequenceSupported { get; }

    Property Value

    • bool
      bool
      bool
      bool

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

  • 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 bool ConcurrentRecordAndPhotoSupported { get; }public bool ConcurrentRecordAndPhotoSupported { get; }Public ReadOnly Property ConcurrentRecordAndPhotoSupported As boolpublic bool ConcurrentRecordAndPhotoSupported { get; }

    Property Value

    • bool
      bool
      bool
      bool

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

  • Horizontal35mmEquivalentFocalLength
    Horizontal35mmEquivalentFocalLength
    Horizontal35mmEquivalentFocalLength
    Horizontal35mmEquivalentFocalLength

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

    public IReference<uint> Horizontal35mmEquivalentFocalLength { get; }public IReference<uint> Horizontal35mmEquivalentFocalLength { get; }Public ReadOnly Property Horizontal35mmEquivalentFocalLength As IReference<uint>public IReference<uint> Horizontal35mmEquivalentFocalLength { get; }

    Property Value

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

    Remarks

    The value of Horizontal35mmEquivalentFocalLength is for the current preview resolution and may change each time the resolution is changed using SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties).

  • MediaCategory
    MediaCategory
    MediaCategory
    MediaCategory

    Gets the media category of the media.

    public MediaCategory MediaCategory { get; }public MediaCategory MediaCategory { get; }Public ReadOnly Property MediaCategory As MediaCategorypublic MediaCategory MediaCategory { get; }

    Property Value

  • PhotoCaptureSource
    PhotoCaptureSource
    PhotoCaptureSource
    PhotoCaptureSource

    Gets the stream that is used for photo capture.

    public PhotoCaptureSource PhotoCaptureSource { get; }public PhotoCaptureSource PhotoCaptureSource { get; }Public ReadOnly Property PhotoCaptureSource As PhotoCaptureSourcepublic PhotoCaptureSource PhotoCaptureSource { get; }

    Property Value

  • PitchOffsetDegrees
    PitchOffsetDegrees
    PitchOffsetDegrees
    PitchOffsetDegrees

    Gets the pitch offset of the camera in degrees.

    public IReference<int> PitchOffsetDegrees { get; }public IReference<int> PitchOffsetDegrees { get; }Public ReadOnly Property PitchOffsetDegrees As IReference<int>public IReference<int> PitchOffsetDegrees { get; }

    Property Value

    • The pitch offset in degrees.

  • StreamingCaptureMode
    StreamingCaptureMode
    StreamingCaptureMode
    StreamingCaptureMode

    Gets the streaming mode.

    public StreamingCaptureMode StreamingCaptureMode { get; }public StreamingCaptureMode StreamingCaptureMode { get; }Public ReadOnly Property StreamingCaptureMode As StreamingCaptureModepublic StreamingCaptureMode StreamingCaptureMode { get; }

    Property Value

    Remarks

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

  • Vertical35mmEquivalentFocalLength
    Vertical35mmEquivalentFocalLength
    Vertical35mmEquivalentFocalLength
    Vertical35mmEquivalentFocalLength

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

    public IReference<uint> Vertical35mmEquivalentFocalLength { get; }public IReference<uint> Vertical35mmEquivalentFocalLength { get; }Public ReadOnly Property Vertical35mmEquivalentFocalLength As IReference<uint>public IReference<uint> Vertical35mmEquivalentFocalLength { get; }

    Property Value

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

    Remarks

    The value of Vertical35mmEquivalentFocalLength is for the current preview resolution and may change each time the resolution is changed using SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties).

  • VideoDeviceCharacteristic
    VideoDeviceCharacteristic
    VideoDeviceCharacteristic
    VideoDeviceCharacteristic

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

    public VideoDeviceCharacteristic VideoDeviceCharacteristic { get; }public VideoDeviceCharacteristic VideoDeviceCharacteristic { get; }Public ReadOnly Property VideoDeviceCharacteristic As VideoDeviceCharacteristicpublic VideoDeviceCharacteristic VideoDeviceCharacteristic { get; }

    Property Value

  • VideoDeviceId
    VideoDeviceId
    VideoDeviceId
    VideoDeviceId

    Gets the Id of the video camera.

    public string VideoDeviceId { get; }public string VideoDeviceId { get; }Public ReadOnly Property VideoDeviceId As stringpublic string VideoDeviceId { get; }

    Property Value

    • string
      string
      string
      string

      The Id of the video camera.

    Remarks

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Capabilities

microphone
webcam

Attributes

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

Details

Assembly

Windows.Media.Capture.dll