PrepareTranscodeResult.TranscodeAsync | transcodeAsync method

Applies to Windows and Windows Phone

Creates an object to perform an asynchronous media transcode operation on media data.

Syntax

Public Function TranscodeAsync() As IAsyncActionWithProgress(Of Double)

Parameters

This method has no parameters.

Return value

Type: IAsyncActionWithProgress<Double>

An object that is used to control the asynchronous operation.

Examples

The following example uses this method to complete a transcode operation.


function setDeferral() {
        
        transcoder = new Windows.Media.Transcoding.MediaTranscoder();
        var deferral = transcoder.prepareFileTranscodeAsync(inputFile, outputFile, profile);
            deferral.then(completeTranscode, transcodeError);
        };
       
    }

    function completeTranscode {
        if (!result.canTranscode) {
            // Display error
            
        } else {
            result.transcodeAsync();
            
        }
    }


Requirements

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

PrepareTranscodeResult

 

 

Show:
© 2014 Microsoft