MediaCaptureInitializationSettings.VideoProfile Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the video profile which provides hints to the driver to allow it to optimize for different capture scenarios.
public:
property MediaCaptureVideoProfile ^ VideoProfile { MediaCaptureVideoProfile ^ get(); void set(MediaCaptureVideoProfile ^ value); };
MediaCaptureVideoProfile VideoProfile();
void VideoProfile(MediaCaptureVideoProfile value);
public MediaCaptureVideoProfile VideoProfile { get; set; }
var mediaCaptureVideoProfile = mediaCaptureInitializationSettings.videoProfile;
mediaCaptureInitializationSettings.videoProfile = mediaCaptureVideoProfile;
Public Property VideoProfile As MediaCaptureVideoProfile
Property Value
The video profile.
Windows requirements
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 during video capture 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. For more information on video profiles, see MediaCaptureVideoProfile.
The value you use for this property determines how the system handles the values for other properties of the MediaCaptureInitializationSettings.
- If you set VideoProfile to a valid MediaCaptureVideoProfile object, the system will use the driver hints associated with the profile and will use the media description values you specify for the PhotoMediaDescription, PreviewMediaDescription, and RecordMediaDescription properties.
- If you set VideoProfile to a valid MediaCaptureVideoProfile object and you don't set either the PhotoMediaDescription, PreviewMediaDescription, or RecordMediaDescription properties, the system will use the driver hints associated with the profile and use the first (0 index) entry in the profile's SupportedPhotoMediaDescription, SupportedPreviewMediaDescription, and SupportedRecordMediaDescription lists as the media description for the respective properties.
- If the value of VideoProfile is not set at all then the system ignores the value of PhotoMediaDescription, PreviewMediaDescription, and RecordMediaDescription and reverts to the legacy behavior before the video profile APIs were introduced.
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 on using video profiles, see Discover and select camera capabilities with camera profiles