Dela via


MediaCaptureVideoProfile Class

Definition

Represents a video profile that indicates a configuration supported by the video capture device.

public ref class MediaCaptureVideoProfile 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.Both)]
class MediaCaptureVideoProfile 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.Both)]
public sealed class MediaCaptureVideoProfile
Public NotInheritable Class MediaCaptureVideoProfile
Inheritance
Object Platform::Object IInspectable MediaCaptureVideoProfile
Attributes

Windows requirements

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

Remarks

Video profiles provide a simple way to configure the video capture device with a group of settings that are guaranteed to work with a particular capture device and are optimized for your desired capture scenario. There is a set of known video profiles that the system provides for common scenarios, such as capturing high-quality photos or video, capturing a photo sequence, or video conferencing. To get a list of the known video profiles for a given video device, use MediaCapture.FindKnownVideoProfiles. Some hardware vendors may expose other video profiles that you can get by calling MediaCapture.FindAllVideoProfiles.

A video profile exposes three lists of MediaCaptureVideoProfileMediaDescription objects, SupportedPhotoMediaDescription, SupportedPreviewMediaDescription, and SupportedRecordMediaDescription. Each item in these lists is a group of settings that are supported for the corresponding operation. For example, a single video profile may support recording 720p video at 30 fps with HDR video support and also support recording 1080p video at 30 fps without HDR video support. In this case, each of these would be represented by a MediaCaptureVideoProfileMediaDescription object in the SupportedRecordMediaDescription list of the video profile.

You configure the capture device to use a particular video profile by using the MediaCaptureInitializationSettings object. It is important that the video profile you use when configuring the device is compatible with the other initialization settings. For more information on how to correctly use media profile descriptions in the MediaCaptureInitializationSettings, see MediaCaptureInitializationSettings.VideoProfile.

Before using video profiles, you should check the value returned by MediaCapture.IsVideoProfileSupported to make sure that video profiles are supported by the capture device.

For how-to guidance for working with video profiles, see Discover and select camera capabilities with camera profiles.

Version history

Windows version SDK version Value added
1803 17134 FrameSourceInfos
1803 17134 Properties

Properties

FrameSourceInfos

Gets a read-only list of MediaFrameSourceInfo objects which provide details about the capabilities of a MediaFrameSource.

Id

Gets the unique identifier of the video profile.

Properties

Gets a read-only map of custom attributes provided by the capture device manufacturer.

SupportedPhotoMediaDescription

Gets a list of MediaCaptureVideoProfileMediaDescription objects that represent supported video device settings for photo capture.

SupportedPreviewMediaDescription

Gets a list of MediaCaptureVideoProfileMediaDescription objects that represent supported video device settings for video preview.

SupportedRecordMediaDescription

Gets a list of MediaCaptureVideoProfileMediaDescription objects that represent supported video device settings for video recording.

VideoDeviceId

Gets the device ID of the video device associated with the video profile.

Methods

GetConcurrency()

Gets the list of MediaCaptureVideoProfile objects that can be used concurrently with this video profile.

Applies to

See also