Share via


MediaComposition Class

Definition

Represents a collection of media clips and background audio tracks.

public ref class MediaComposition sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.GCPressure]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaComposition final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.GCPressure]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class MediaComposition final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.GCPressure]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaComposition
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.GCPressure]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class MediaComposition
function MediaComposition()
Public NotInheritable Class MediaComposition
Inheritance
Object Platform::Object IInspectable MediaComposition
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Constructors

MediaComposition()

Initializes a new instance of the MediaComposition class.

Properties

BackgroundAudioTracks

A collection of background audio tracks for playback in the media composition.

Clips

A collection of media clips for playback in the media composition.

Duration

The total playback time of the media composition.

OverlayLayers

Gets the list of overlay layers for the media composition.

UserData

An associative collection for storing custom properties associated with the media composition.

Methods

Clone()

Creates a MediaComposition object that is identical to this instance.

CreateDefaultEncodingProfile()

Create a new default media encoding profile which can be modified if necessary.

GenerateMediaStreamSource()

Creates a new MediaStreamSource.

GenerateMediaStreamSource(MediaEncodingProfile)

Creates a new MediaStreamSource using the specified MediaEncodingProfile.

GeneratePreviewMediaStreamSource(Int32, Int32)

Creates a new MediaStreamSource used to preview the edited media.

GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision)

Asynchronously gets an image stream that represents a thumbnail of the media composition.

GetThumbnailsAsync(IIterable<TimeSpan>, Int32, Int32, VideoFramePrecision)

Asynchronously gets a vector view of thumbnails of the media composition.

LoadAsync(StorageFile)

Asynchronously loads a MediaComposition from a StorageFile.

RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile)

Asynchronously renders the MediaComposition to a specified file using the indicated media trimming preference and encoding profile.

RenderToFileAsync(IStorageFile, MediaTrimmingPreference)

Asynchronously renders the MediaComposition to a specified file using the indicated media trimming preference.

RenderToFileAsync(IStorageFile)

Asynchronously renders the MediaComposition to the specified file.

SaveAsync(IStorageFile)

Asynchronously serializes the MediaComposition to disk so that it can be loaded and modified in the future.

Applies to