Dela via


MediaDevice Class

Definition

Provides methods used to select devices for capturing and rendering audio, and for capturing video.

public ref class MediaDevice abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class MediaDevice final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public static class MediaDevice
Public Class MediaDevice
Inheritance
Object Platform::Object IInspectable MediaDevice
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Methods

GetAudioCaptureSelector()

Returns the identifier string of a device for capturing audio.

GetAudioRenderSelector()

Returns the identifier string of a device for rendering audio.

GetDefaultAudioCaptureId(AudioDeviceRole)

Returns the identifier string of the default device for capturing audio in the specified role.

GetDefaultAudioRenderId(AudioDeviceRole)

Returns the identifier string of the default device for rendering audio in the specified role.

GetVideoCaptureSelector()

Returns the identifier string of a device for capturing video.

Events

DefaultAudioCaptureDeviceChanged

Raised when the default audio capture device is changed.

DefaultAudioRenderDeviceChanged

Raised when the default audio render device is changed.

Applies to