MediaCapture.StartPreviewToCustomSinkAsync MediaCapture.StartPreviewToCustomSinkAsync MediaCapture.StartPreviewToCustomSinkAsync MediaCapture.StartPreviewToCustomSinkAsync MediaCapture.StartPreviewToCustomSinkAsync Method

Definition

Overloads

StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension)

Starts sending a preview stream to a custom media sink using the specified encoding profile.

StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet)

Starts sending a preview stream to a custom media sink using the specified encoding profile and sink settings.

StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension) StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension)

Starts sending a preview stream to a custom media sink using the specified encoding profile.

public : IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, IMediaExtension customMediaSink)
IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, IMediaExtension customMediaSink) const;
public IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, IMediaExtension customMediaSink)
Public Function StartPreviewToCustomSinkAsync(encodingProfile As MediaEncodingProfile, customMediaSink As IMediaExtension) As IAsyncAction
Windows.Media.Capture.MediaCapture.startPreviewToCustomSinkAsync(encodingProfile, customMediaSink).done( /* Your success and error handlers */ );

Parameters

encodingProfile
MediaEncodingProfile MediaEncodingProfile MediaEncodingProfile

The encoding profile to use for the recording.

customMediaSink
IMediaExtension IMediaExtension IMediaExtension

The media extension for the custom media sink.

Returns

An object that is used to control the asynchronous operation.

Additional features and requirements

Capabilities
backgroundMediaRecording

Remarks

When you call StartPreviewToCustomSinkAsync, the system will call the custom sink’s IMFMediaTypeHandler.IsMediaTypeSupported method, passing in the native media type of the capture device. This check is performed in an effort to avoid unnecessary video conversion. If the custom sink returns S_OK from IsMediaTypeSupported when this check is made, then the preview stream will use the native media type instead of the type specified by the encodingProfile parameter.

See also

StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet) StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet)

Starts sending a preview stream to a custom media sink using the specified encoding profile and sink settings.

public : IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, Platform::String customSinkActivationId, IPropertySet customSinkSettings)
IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, winrt::hstring customSinkActivationId, IPropertySet customSinkSettings) const;
public IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, String customSinkActivationId, IPropertySet customSinkSettings)
Public Function StartPreviewToCustomSinkAsync(encodingProfile As MediaEncodingProfile, customSinkActivationId As String, customSinkSettings As IPropertySet) As IAsyncAction
Windows.Media.Capture.MediaCapture.startPreviewToCustomSinkAsync(encodingProfile, customSinkActivationId, customSinkSettings).done( /* Your success and error handlers */ );

Parameters

encodingProfile
MediaEncodingProfile MediaEncodingProfile MediaEncodingProfile

The encoding profile to use for the recording.

customSinkActivationId
String String String

The activatable class ID of the media extension for the custom media sink.

customSinkSettings
IPropertySet IPropertySet IPropertySet

Contains properties of the media extension.

Returns

An object that is used to control the asynchronous operation.

Additional features and requirements

Capabilities
backgroundMediaRecording

Remarks

When you call StartPreviewToCustomSinkAsync, the system will call the custom sink’s IMFMediaTypeHandler.IsMediaTypeSupported method, passing in the native media type of the capture device. This check is performed in an effort to avoid unnecessary video conversion. If the custom sink returns S_OK from IsMediaTypeSupported when this check is made, then the preview stream will use the native media type instead of the type specified by the encodingProfile parameter.

See also