U
    a¨+d]  ã                   @   s6   d dl mZ d dlmZ d dlmZ eddd„ƒZdS )é    )Úrequires_duration)Úconcatenate_videoclips)Ú	ImageClipNc                 C   sz   |dkr| j | }|dkr$|| j  }|dkr:|  d|¡gng }|  |¡ |¡g}|| j krf|  |¡gng }t|| | ƒS )aµ   Momentarily freeze the clip at time t.

    Set `t='end'` to freeze the clip at the end (actually it will freeze on the
    frame at time clip.duration - padding_end seconds).
    With ``duration``you can specify the duration of the freeze.
    With ``total_duration`` you can specify the total duration of
    the clip and the freeze (i.e. the duration of the freeze is
    automatically calculated). One of them must be provided.
    ÚendNr   )ÚdurationZsubclipZto_ImageClipZset_durationr   )ZclipÚtZfreeze_durationZtotal_durationZpadding_endÚbeforeÚfreezeÚafter© r   ú;/tmp/pip-unpacked-wheel-0yp4gafk/moviepy/video/fx/freeze.pyr	      s    

r	   )r   NNr   )Zmoviepy.decoratorsr   Z%moviepy.video.compositing.concatenater   Zmoviepy.video.VideoClipr   r	   r   r   r   r   Ú<module>   s     ÿ