MediaTranscoder.PrepareStreamTranscodeAsync | prepareStreamTranscodeAsync method

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

Syntax


mediaTranscoder.prepareStreamTranscodeAsync(source, destination, profile).done( /* Your success and error handlers */ );

Parameters

source

Type: IRandomAccessStream

The source stream.

source cannot be a InMemoryRandomAccessStream or other writeable stream.

destination

Type: IRandomAccessStream

The destination stream.

profile

Type: MediaEncodingProfile

The profile to use for the operation.

Return value

Type: IAsyncOperation<PrepareTranscodeResult>

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

Remarks

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

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);


Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Transcoding
Windows::Media::Transcoding [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Transcoding
Windows::Media::Transcoding [C++]

Metadata

Windows.winmd

See also

MediaTranscoder

 

 

Show:
© 2015 Microsoft