Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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. */

Attributes

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

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 (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 [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

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