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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
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(_winrt.Object):
    volume: _winrt.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: _winrt.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(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> EmbeddedAudioTrack: ...
    def get_audio_encoding_properties(self) -> typing.Optional[winsdk.windows.media.mediaproperties.AudioEncodingProperties]: ...

class MediaClip(_winrt.Object):
    selected_embedded_audio_track_index: _winrt.UInt32
    trim_time_from_end: datetime.timedelta
    volume: _winrt.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: _winrt.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(_winrt.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: _winrt.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: _winrt.Int32, scaled_height: _winrt.Int32) -> typing.Optional[winsdk.windows.media.core.MediaStreamSource]: ...
    def get_thumbnail_async(self, time_from_start: datetime.timedelta, scaled_width: _winrt.Int32, scaled_height: _winrt.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: _winrt.Int32, scaled_height: _winrt.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, _winrt.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, _winrt.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, _winrt.Double]: ...
    def save_async(self, file: typing.Optional[winsdk.windows.storage.IStorageFile]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class MediaOverlay(_winrt.Object):
    position: winsdk.windows.foundation.Rect
    opacity: _winrt.Double
    delay: datetime.timedelta
    audio_enabled: _winrt.Boolean
    clip: typing.Optional[MediaClip]
    @staticmethod
    def _from(obj: _winrt.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: _winrt.Double) -> MediaOverlay:...
    def clone(self) -> typing.Optional[MediaOverlay]: ...

class MediaOverlayLayer(_winrt.Object):
    custom_compositor_definition: typing.Optional[winsdk.windows.media.effects.IVideoCompositorDefinition]
    overlays: typing.Optional[winsdk.windows.foundation.collections.IVector[MediaOverlay]]
    @staticmethod
    def _from(obj: _winrt.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]: ...

