§
    ÜóÉjV  ã                   ó²   — d dl Z d dlmZ d dlmZmZ d dlmZm	Z	 d dl
mZmZ d dlmZ d dlmZ e j        e j         G d„ d	e¦  «        ¦   «         ¦   «         ZdS )
é    N)Úlibav)ÚAudioFormatÚget_audio_format)Ú
AudioFrameÚalloc_audio_frame)ÚAudioLayoutÚget_audio_layout)ÚFrame)ÚPacketc                   ó¢  — e Zd Zej        dedz  defd„¦   «         Zej        defd„¦   «         Zej        dede	fd„¦   «         Z
ed	„ ¦   «         Zed
„ ¦   «         Zej        dej        fd„¦   «         Zed„ ¦   «         Zej        d„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zej        d„ ¦   «         Zed„ ¦   «         Zej        d„ ¦   «         ZdS )ÚAudioCodecContextÚinput_frameNÚreturnc                 ó*  — |}| j         j        j        t          j        z  }| j        s:t          | j        | j        | j         j	        |rd n| j         j
        ¬¦  «        | _        | j                             |¦  «        }|€|                     d ¦  «         |S )N)ÚformatÚlayoutÚrateÚ
frame_size)ÚptrÚcodecÚcapabilitiesÚlibÚ AV_CODEC_CAP_VARIABLE_FRAME_SIZEÚ	resamplerÚAudioResamplerr   r   Úsample_rater   ÚresampleÚappend)Úselfr   ÚframeÚallow_var_frame_sizeÚframess        úz/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib64/python3.11/site-packages/av/audio/codeccontext.pyÚ_prepare_frames_for_encodez,AudioCodecContext._prepare_frames_for_encode   s—   € à#.ˆàŒHŒNÔ'­#Ô*NÑNð 	ð Œ~ð 	Ý+Ø”{Ø”{Ø”XÔ)Ø#7ÐP˜4˜4¸T¼XÔ=Pð	ñ ô ˆDŒNð ”×(Ò(¨Ñ/Ô/ˆØÐØ�MŠM˜$ÑÔÐàˆó    c                 ó   — t          ¦   «         S ©N)r   ©r   s    r#   Ú_alloc_next_framez#AudioCodecContext._alloc_next_frame#   s   € å Ñ"Ô"Ð"r%   r    Úpacketc                 ój   — t                                | ||¦  «         |}|                     ¦   «          d S r'   )ÚCodecContextÚ_setup_decoded_frameÚ_init_user_attributes)r   r    r*   Úaframes       r#   r-   z&AudioCodecContext._setup_decoded_frame'   s7   € å×)Ò)¨$°°vÑ>Ô>Ð>Ø"ˆØ×$Ò$Ñ&Ô&Ð&Ð&Ð&r%   c                 ó   — | j         j        S )zV
        Number of samples per channel in an audio frame.

        :type: int
        )r   r   r(   s    r#   r   zAudioCodecContext.frame_size-   s   € ð ŒxÔ"Ð"r%   c                 ó   — | j         j        S )z[
        Sample rate of the audio data, in samples per second.

        :type: int
        )r   r   r(   s    r#   r   zAudioCodecContext.sample_rate6   s   € ð ŒxÔ#Ð#r%   Úvaluec                 óH   — |                       d¦  «         || j        _        d S )Nr   )Ú_assert_not_openr   r   ©r   r2   s     r#   r   zAudioCodecContext.sample_rate?   s&   € à×Ò˜mÑ,Ô,Ð,Ø$ˆŒÔÐÐr%   c                 ó   — | j         S )z%Another name for :attr:`sample_rate`.©r   r(   s    r#   r   zAudioCodecContext.rateD   s   € ð ÔÐr%   c                 ó   — || _         d S r'   r7   r5   s     r#   r   zAudioCodecContext.rateI   s   € à ˆÔÐÐr%   c                 ó   — | j         j        S r'   )r   Únb_channelsr(   s    r#   ÚchannelszAudioCodecContext.channelsM   s   € àŒ{Ô&Ð&r%   c                 ó4   — t          | j        j        ¦  «        S )zG
        The audio channel layout.

        :type: AudioLayout
        )r	   r   Ú	ch_layoutr(   s    r#   r   zAudioCodecContext.layoutQ   s   € õ   ¤Ô 2Ñ3Ô3Ð3r%   c                 óp   — |                       d¦  «         t          |¦  «        }|j        | j        _        d S )Nr   )r4   r   r   r   r=   )r   r2   r   s      r#   r   zAudioCodecContext.layoutZ   s5   € à×Ò˜hÑ'Ô'Ð'Ý)¨%Ñ0Ô0ˆØ#œ]ˆŒÔÐÐr%   c                 ó4   — t          | j        j        ¦  «        S )zF
        The audio sample format.

        :type: AudioFormat
        )r   r   Ú
sample_fmtr(   s    r#   r   zAudioCodecContext.format`   s   € õ   ¤Ô 3Ñ4Ô4Ð4r%   c                 óp   — |                       d¦  «         t          |¦  «        }|j        | j        _        d S )Nr   )r4   r   r@   r   )r   r2   r   s      r#   r   zAudioCodecContext.formati   s6   € à×Ò˜hÑ'Ô'Ð'Ý)¨%Ñ0Ô0ˆØ$Ô/ˆŒÔÐÐr%   )Ú__name__Ú
__module__Ú__qualname__ÚcythonÚcfuncr
   Úlistr$   r)   r   r-   Úpropertyr   r   ÚsetterÚintr   r;   r   r   © r%   r#   r   r   
   sÇ  € € € € € ð „\ð°e¸d±lð Àtð ð ð ñ „\ðð* „\ð# 5ð #ð #ð #ñ „\ð#ð „\ð'¨%ð '¸ð 'ð 'ð 'ñ „\ð'ð
 ð#ð #ñ „Xð#ð ð$ð $ñ „Xð$ð Ôð% ¤ð %ð %ð %ñ Ôð%ð ð ð  ñ „Xð ð 
„[ð!ð !ñ „[ð!ð ð'ð 'ñ „Xð'ð ð4ð 4ñ „Xð4ð „]ð+ð +ñ „]ð+ð
 ð5ð 5ñ „Xð5ð „]ð0ð 0ñ „]ð0ð 0ð 0r%   r   )rE   Úcython.cimportsr   r   Úcython.cimports.av.audio.formatr   r   Úcython.cimports.av.audio.framer   r   Úcython.cimports.av.audio.layoutr   r	   Úcython.cimports.av.framer
   Úcython.cimports.av.packetr   ÚfinalÚcclassr,   r   rK   r%   r#   ú<module>rT      sä   ðØ €€€Ø (Ð (Ð (Ð (Ð (Ð (Ø IÐ IÐ IÐ IÐ IÐ IÐ IÐ IØ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HØ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IØ *Ð *Ð *Ð *Ð *Ð *Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,ð „Ø„ða0ð a0ð a0ð a0ð a0˜ñ a0ô a0ñ „ñ „ða0ð a0ð a0r%   