# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.graphics.directx.direct3d11
import winsdk.windows.graphics.imaging
import winsdk.windows.media.core
import winsdk.windows.media.effects
import winsdk.windows.media.mediaproperties
import winsdk.windows.media.transcoding
import winsdk.windows.storage
import winsdk.windows.ui

class MediaTrimmingPreference(enum.IntEnum):
    FAST = 0
    PRECISE = 1

class VideoFramePrecision(enum.IntEnum):
    NEAREST_FRAME = 0
    NEAREST_KEY_FRAME = 1

Self = typing.TypeVar('Self')

class BackgroundAudioTrack(winsdk.system.Object):
    volume: winsdk.system.Double
    trim_time_from_start: datetime.timedelta
    trim_time_from_end: datetime.timedelta
    delay: datetime.timedelta
    audio_effect_definitions: typing.Optional[winsdk.windows.foundation.collections.IVector[winsdk.windows.media.effects.IAudioEffectDefinition]]
    original_duration: datetime.timedelta
    trimmed_duration: datetime.timedelta
    user_data: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BackgroundAudioTrack: ...
    def clone(self) -> typing.Optional[BackgroundAudioTrack]: ...
    @staticmethod
    def create_from_embedded_audio_track(embedded_audio_track: typing.Optional[EmbeddedAudioTrack]) -> typing.Optional[BackgroundAudioTrack]: ...
    @staticmethod
    def create_from_file_async(file: typing.Optional[winsdk.windows.storage.IStorageFile]) -> winsdk.windows.foundation.IAsyncOperation[BackgroundAudioTrack]: ...
    def get_audio_encoding_properties(self) -> typing.Optional[winsdk.windows.media.mediaproperties.AudioEncodingProperties]: ...

class EmbeddedAudioTrack(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> EmbeddedAudioTrack: ...
    def get_audio_encoding_properties(self) -> typing.Optional[winsdk.windows.media.mediaproperties.AudioEncodingProperties]: ...

class MediaClip(winsdk.system.Object):
    selected_embedded_audio_track_index: winsdk.system.UInt32
    trim_time_from_end: datetime.timedelta
    volume: winsdk.system.Double
    trim_time_from_start: datetime.timedelta
    embedded_audio_tracks: typing.Optional[winsdk.windows.foundation.collections.IVectorView[EmbeddedAudioTrack]]
    end_time_in_composition: datetime.timedelta
    original_duration: datetime.timedelta
    start_time_in_composition: datetime.timedelta
    trimmed_duration: datetime.timedelta
    user_data: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    video_effect_definitions: typing.Optional[winsdk.windows.foundation.collections.IVector[winsdk.windows.media.effects.IVideoEffectDefinition]]
    audio_effect_definitions: typing.Optional[winsdk.windows.foundation.collections.IVector[winsdk.windows.media.effects.IAudioEffectDefinition]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> MediaClip: ...
    def clone(self) -> typing.Optional[MediaClip]: ...
    @staticmethod
    def create_from_color(color: winsdk.windows.ui.Color, original_duration: datetime.timedelta) -> typing.Optional[MediaClip]: ...
    @staticmethod
    def create_from_file_async(file: typing.Optional[winsdk.windows.storage.IStorageFile]) -> winsdk.windows.foundation.IAsyncOperation[MediaClip]: ...
    @staticmethod
    def create_from_image_file_async(file: typing.Optional[winsdk.windows.storage.IStorageFile], original_duration: datetime.timedelta) -> winsdk.windows.foundation.IAsyncOperation[MediaClip]: ...
    @staticmethod
    def create_from_surface(surface: typing.Optional[winsdk.windows.graphics.directx.direct3d11.IDirect3DSurface], original_duration: datetime.timedelta) -> typing.Optional[MediaClip]: ...
    def get_video_encoding_properties(self) -> typing.Optional[winsdk.windows.media.mediaproperties.VideoEncodingProperties]: ...

class MediaComposition(winsdk.system.Object):
    background_audio_tracks: typing.Optional[winsdk.windows.foundation.collections.IVector[BackgroundAudioTrack]]
    clips: typing.Optional[winsdk.windows.foundation.collections.IVector[MediaClip]]
    duration: datetime.timedelta
    user_data: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    overlay_layers: typing.Optional[winsdk.windows.foundation.collections.IVector[MediaOverlayLayer]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> MediaComposition: ...
    def __new__(cls: typing.Type[MediaComposition]) -> MediaComposition:...
    def clone(self) -> typing.Optional[MediaComposition]: ...
    def create_default_encoding_profile(self) -> typing.Optional[winsdk.windows.media.mediaproperties.MediaEncodingProfile]: ...
    @typing.overload
    def generate_media_stream_source(self) -> typing.Optional[winsdk.windows.media.core.MediaStreamSource]: ...
    @typing.overload
    def generate_media_stream_source(self, encoding_profile: typing.Optional[winsdk.windows.media.mediaproperties.MediaEncodingProfile]) -> typing.Optional[winsdk.windows.media.core.MediaStreamSource]: ...
    def generate_preview_media_stream_source(self, scaled_width: winsdk.system.Int32, scaled_height: winsdk.system.Int32) -> typing.Optional[winsdk.windows.media.core.MediaStreamSource]: ...
    def get_thumbnail_async(self, time_from_start: datetime.timedelta, scaled_width: winsdk.system.Int32, scaled_height: winsdk.system.Int32, frame_precision: VideoFramePrecision) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.graphics.imaging.ImageStream]: ...
    def get_thumbnails_async(self, times_from_start: typing.Iterable[datetime.timedelta], scaled_width: winsdk.system.Int32, scaled_height: winsdk.system.Int32, frame_precision: VideoFramePrecision) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[winsdk.windows.graphics.imaging.ImageStream]]: ...
    @staticmethod
    def load_async(file: typing.Optional[winsdk.windows.storage.StorageFile]) -> winsdk.windows.foundation.IAsyncOperation[MediaComposition]: ...
    @typing.overload
    def render_to_file_async(self, destination: typing.Optional[winsdk.windows.storage.IStorageFile]) -> winsdk.windows.foundation.IAsyncOperationWithProgress[winsdk.windows.media.transcoding.TranscodeFailureReason, winsdk.system.Double]: ...
    @typing.overload
    def render_to_file_async(self, destination: typing.Optional[winsdk.windows.storage.IStorageFile], trimming_preference: MediaTrimmingPreference) -> winsdk.windows.foundation.IAsyncOperationWithProgress[winsdk.windows.media.transcoding.TranscodeFailureReason, winsdk.system.Double]: ...
    @typing.overload
    def render_to_file_async(self, destination: typing.Optional[winsdk.windows.storage.IStorageFile], trimming_preference: MediaTrimmingPreference, encoding_profile: typing.Optional[winsdk.windows.media.mediaproperties.MediaEncodingProfile]) -> winsdk.windows.foundation.IAsyncOperationWithProgress[winsdk.windows.media.transcoding.TranscodeFailureReason, winsdk.system.Double]: ...
    def save_async(self, file: typing.Optional[winsdk.windows.storage.IStorageFile]) -> winsdk.windows.foundation.IAsyncAction: ...

class MediaOverlay(winsdk.system.Object):
    position: winsdk.windows.foundation.Rect
    opacity: winsdk.system.Double
    delay: datetime.timedelta
    audio_enabled: winsdk.system.Boolean
    clip: typing.Optional[MediaClip]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> MediaOverlay: ...
    @typing.overload
    def __new__(cls: typing.Type[MediaOverlay], clip: typing.Optional[MediaClip]) -> MediaOverlay:...
    @typing.overload
    def __new__(cls: typing.Type[MediaOverlay], clip: typing.Optional[MediaClip], position: winsdk.windows.foundation.Rect, opacity: winsdk.system.Double) -> MediaOverlay:...
    def clone(self) -> typing.Optional[MediaOverlay]: ...

class MediaOverlayLayer(winsdk.system.Object):
    custom_compositor_definition: typing.Optional[winsdk.windows.media.effects.IVideoCompositorDefinition]
    overlays: typing.Optional[winsdk.windows.foundation.collections.IVector[MediaOverlay]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> MediaOverlayLayer: ...
    @typing.overload
    def __new__(cls: typing.Type[MediaOverlayLayer], compositor_definition: typing.Optional[winsdk.windows.media.effects.IVideoCompositorDefinition]) -> MediaOverlayLayer:...
    @typing.overload
    def __new__(cls: typing.Type[MediaOverlayLayer]) -> MediaOverlayLayer:...
    def clone(self) -> typing.Optional[MediaOverlayLayer]: ...

