MediaComposition MediaComposition MediaComposition MediaComposition MediaComposition Class

Definition

Represents a collection of media clips and background audio tracks.

public : sealed class MediaComposition : IMediaComposition, IMediaComposition2
struct winrt::Windows::Media::Editing::MediaComposition : IMediaComposition, IMediaComposition2
public sealed class MediaComposition : IMediaComposition, IMediaComposition2
Public NotInheritable Class MediaComposition Implements IMediaComposition, IMediaComposition2
var mediaComposition = new mediaComposition();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

MediaComposition() MediaComposition() MediaComposition() MediaComposition() MediaComposition()

Initializes a new instance of the MediaComposition class.

Properties

BackgroundAudioTracks BackgroundAudioTracks BackgroundAudioTracks BackgroundAudioTracks BackgroundAudioTracks

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

Clips Clips Clips Clips Clips

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

Duration Duration Duration Duration Duration

The total playback time of the media composition.

OverlayLayers OverlayLayers OverlayLayers OverlayLayers OverlayLayers

Gets the list of overlay layers for the media composition.

UserData UserData UserData UserData UserData

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

Methods

Clone() Clone() Clone() Clone() Clone()

Creates a MediaComposition object that is identical to this instance.

CreateDefaultEncodingProfile() CreateDefaultEncodingProfile() CreateDefaultEncodingProfile() CreateDefaultEncodingProfile() CreateDefaultEncodingProfile()

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

GenerateMediaStreamSource() GenerateMediaStreamSource() GenerateMediaStreamSource() GenerateMediaStreamSource() GenerateMediaStreamSource()

Creates a new MediaStreamSource.

GenerateMediaStreamSource(MediaEncodingProfile) GenerateMediaStreamSource(MediaEncodingProfile) GenerateMediaStreamSource(MediaEncodingProfile) GenerateMediaStreamSource(MediaEncodingProfile) GenerateMediaStreamSource(MediaEncodingProfile)

Creates a new MediaStreamSource using the specified MediaEncodingProfile.

GeneratePreviewMediaStreamSource(Int32, Int32) GeneratePreviewMediaStreamSource(Int32, Int32) GeneratePreviewMediaStreamSource(Int32, Int32) GeneratePreviewMediaStreamSource(Int32, Int32) GeneratePreviewMediaStreamSource(Int32, Int32)

Creates a new MediaStreamSource used to preview the edited media.

GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision) GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision) GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision) GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision) GetThumbnailAsync(TimeSpan, Int32, Int32, VideoFramePrecision)

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

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

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

LoadAsync(StorageFile) LoadAsync(StorageFile) LoadAsync(StorageFile) LoadAsync(StorageFile) LoadAsync(StorageFile)

Asynchronously loads a MediaComposition from a StorageFile.

RenderToFileAsync(IStorageFile) RenderToFileAsync(IStorageFile) RenderToFileAsync(IStorageFile) RenderToFileAsync(IStorageFile) RenderToFileAsync(IStorageFile)

Asynchronously renders the MediaComposition to the specified file.

RenderToFileAsync(IStorageFile, MediaTrimmingPreference) RenderToFileAsync(IStorageFile, MediaTrimmingPreference) RenderToFileAsync(IStorageFile, MediaTrimmingPreference) RenderToFileAsync(IStorageFile, MediaTrimmingPreference) RenderToFileAsync(IStorageFile, MediaTrimmingPreference)

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

RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile) RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile) RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile) RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile) RenderToFileAsync(IStorageFile, MediaTrimmingPreference, MediaEncodingProfile)

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

SaveAsync(IStorageFile) SaveAsync(IStorageFile) SaveAsync(IStorageFile) SaveAsync(IStorageFile) SaveAsync(IStorageFile)

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