Sdílet prostřednictvím


MediaCapture.StartPreviewToCustomSinkAsync Method

Definition

Overloads

StartPreviewToCustomSinkAsync(MediaEncodingProfile, IMediaExtension)

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

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)

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

public:
 virtual IAsyncAction ^ StartPreviewToCustomSinkAsync(MediaEncodingProfile ^ encodingProfile, IMediaExtension ^ customMediaSink) = StartPreviewToCustomSinkAsync;
/// [Windows.Foundation.Metadata.Overload("StartPreviewToCustomSinkAsync")]
IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile const& encodingProfile, IMediaExtension const& customMediaSink);
[Windows.Foundation.Metadata.Overload("StartPreviewToCustomSinkAsync")]
public IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, IMediaExtension customMediaSink);
function startPreviewToCustomSinkAsync(encodingProfile, customMediaSink)
Public Function StartPreviewToCustomSinkAsync (encodingProfile As MediaEncodingProfile, customMediaSink As IMediaExtension) As IAsyncAction

Parameters

encodingProfile
MediaEncodingProfile

The encoding profile to use for the recording.

customMediaSink
IMediaExtension

The media extension for the custom media sink.

Returns

An object that is used to control the asynchronous operation.

Attributes

Windows requirements

App 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

Applies to

StartPreviewToCustomSinkAsync(MediaEncodingProfile, String, IPropertySet)

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

public:
 virtual IAsyncAction ^ StartPreviewToCustomSinkAsync(MediaEncodingProfile ^ encodingProfile, Platform::String ^ customSinkActivationId, IPropertySet ^ customSinkSettings) = StartPreviewToCustomSinkAsync;
/// [Windows.Foundation.Metadata.Overload("StartPreviewToCustomSinkIdAsync")]
IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile const& encodingProfile, winrt::hstring const& customSinkActivationId, IPropertySet const& customSinkSettings);
[Windows.Foundation.Metadata.Overload("StartPreviewToCustomSinkIdAsync")]
public IAsyncAction StartPreviewToCustomSinkAsync(MediaEncodingProfile encodingProfile, string customSinkActivationId, IPropertySet customSinkSettings);
function startPreviewToCustomSinkAsync(encodingProfile, customSinkActivationId, customSinkSettings)
Public Function StartPreviewToCustomSinkAsync (encodingProfile As MediaEncodingProfile, customSinkActivationId As String, customSinkSettings As IPropertySet) As IAsyncAction

Parameters

encodingProfile
MediaEncodingProfile

The encoding profile to use for the recording.

customSinkActivationId
String

Platform::String

winrt::hstring

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

customSinkSettings
IPropertySet

Contains properties of the media extension.

Returns

An object that is used to control the asynchronous operation.

Attributes

Windows requirements

App 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

Applies to