MediaTranscoder.PrepareStreamTranscodeAsync(IRandomAccessStream, IRandomAccessStream, MediaEncodingProfile) MediaTranscoder.PrepareStreamTranscodeAsync(IRandomAccessStream, IRandomAccessStream, MediaEncodingProfile) MediaTranscoder.PrepareStreamTranscodeAsync(IRandomAccessStream, IRandomAccessStream, MediaEncodingProfile) MediaTranscoder.PrepareStreamTranscodeAsync(IRandomAccessStream, IRandomAccessStream, MediaEncodingProfile) MediaTranscoder.PrepareStreamTranscodeAsync(IRandomAccessStream, IRandomAccessStream, MediaEncodingProfile) Method

Definition

Asynchronously initializes the trancode operation on the specified stream and returns a PrepareTranscodeResult object which can be used to start the transcode operation.

public : IAsyncOperation<PrepareTranscodeResult> PrepareStreamTranscodeAsync(IRandomAccessStream source, IRandomAccessStream destination, MediaEncodingProfile profile)
IAsyncOperation<PrepareTranscodeResult> PrepareStreamTranscodeAsync(IRandomAccessStream source, IRandomAccessStream destination, MediaEncodingProfile profile) const;
public IAsyncOperation<PrepareTranscodeResult> PrepareStreamTranscodeAsync(IRandomAccessStream source, IRandomAccessStream destination, MediaEncodingProfile profile)
Public Function PrepareStreamTranscodeAsync(source As IRandomAccessStream, destination As IRandomAccessStream, profile As MediaEncodingProfile) As IAsyncOperation(Of PrepareTranscodeResult)
Windows.Media.Transcoding.MediaTranscoder.prepareStreamTranscodeAsync(source, destination, profile).done( /* Your success and error handlers */ );

Parameters

source
IRandomAccessStream IRandomAccessStream IRandomAccessStream

The source stream.

source cannot be a InMemoryRandomAccessStream or other writeable stream.

destination
IRandomAccessStream IRandomAccessStream IRandomAccessStream

The destination stream.

profile
MediaEncodingProfile MediaEncodingProfile MediaEncodingProfile

The profile to use for the operation.

Returns

When this method completes, a PrepareTranscodeResult object is returned which can be used to start the transcode.

Examples

The following example shows how to use this method to transcode a stream.

var transcoder = new Windows.Media.Transcoding.MediaTranscoder();
return transcoder.prepareStreamTranscodeAsync(sourceStream, destinationStream, profile);

Remarks

The source parameter cannot be a InMemoryRandomAccessStream or other writeable stream.