Windows Dev Center

MediaTranscoder.PrepareFileTranscodeAsync | prepareFileTranscodeAsync method

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

Syntax


Public Function PrepareFileTranscodeAsync(
  source As IStorageFile,  
  destination As IStorageFile,  
  profile As MediaEncodingProfile 
) As IAsyncOperation(Of PrepareTranscodeResult)

Parameters

source

Type: IStorageFile

The source file.

destination

Type: IStorageFile

The destination file.

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.

Examples

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


var transcoder = new Windows.Media.Transcoding.MediaTranscoder();
return transcoder.prepareFileTranscodeAsync(source, destination, profile);


Requirements (Windows 10 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 (Windows 8.x and Windows Phone 8.x)

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