Windows Dev Center

PrepareTranscodeResult class

Represents an asynchronous media transcode deferral operation which can be used to start the transcode operation.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Members

The PrepareTranscodeResult class has these types of members:

Methods

The PrepareTranscodeResult class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

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

 

Properties

The PrepareTranscodeResult class has these properties.

PropertyAccess typeDescription

CanTranscode

Read-onlyIndicates whether the trancode operation can be performed successfully.

FailureReason

Read-onlySpecifies the reason for the transcode failure.

 

Remarks

This object is not instantiated directly. It is returned in a call to prepareFileTranscodeAsync, prepareStreamTranscodeAsync, and PrepareMediaStreamSourceTranscodeAsync.

Examples

The following example uses the TranscodeAsync 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 (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 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

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

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

See also

Object
Roadmaps
Adding multimedia to Windows Store apps using C++, C#, or Visual Basic
Adding multimedia to Windows Store apps using JavaScript
Samples
Transcoding media sample
Media extension sample
Real-Time communication sample

 

 

Show:
© 2015 Microsoft