Ë
    P/æjZ  ã                   ór  — d Z ddlmZmZmZ ddlZej                  j                  «       Zdee	ee
   f   fd„Zde
fd„Zde
fd„Zdee	e	f   fd	„Zdee	e	f   fd
„Zdee	e	f   fd„Zdee	e	f   fd„Zdee	e	f   fd„Zdee	e	f   fd„Zdee	e	f   fd„Zdee	e	f   fd„Zdee	   fd„Zdee	   fd„Zde	fd„Zd„ Zy)z�Module to change the configuration of FFmpeg libraries (such as libavformat).

It affects functionalities in :py:mod:`torio.io`.
é    )ÚDictÚListÚTupleNÚreturnc                  ó*   — t         j                  «       S )z¢Get the versions of FFmpeg libraries

    Returns:
        dict: mapping from library names to version string,
            i.e. `"libavutil": (56, 22, 100)`.
    )Ú
ffmpeg_extÚget_versions© ó    ú[/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/torio/utils/ffmpeg_utils.pyr	   r	      s   € ô ×"Ñ"Ó$Ð$r   c                  ó*   — t         j                  «       S )zSGet the log level of FFmpeg.

    See :py:func:`set_log_level` for the detail.
    )r   Úget_log_levelr
   r   r   r   r      s   € ô
 ×#Ñ#Ó%Ð%r   Úlevelc                 ó.   — t         j                  | «       y)a‰  Set the log level of FFmpeg (libavformat etc)

    Arguments:
        level (int): Log level. The larger, the more verbose.

            The following values are common values, the corresponding ``ffmpeg``'s
            ``-loglevel`` option value and desription.

                * ``-8`` (``quiet``):
                  Print no output.
                * ``0`` (``panic``):
                  Something went really wrong and we will crash now.
                * ``8`` (``fatal``):
                  Something went wrong and recovery is not possible.
                  For example, no header was found for a format which depends
                  on headers or an illegal combination of parameters is used.
                * ``16`` (``error``):
                  Something went wrong and cannot losslessly be recovered.
                  However, not all future data is affected.
                * ``24`` (``warning``):
                  Something somehow does not look correct.
                  This may or may not lead to problems.
                * ``32`` (``info``):
                  Standard information.
                * ``40`` (``verbose``):
                  Detailed information.
                * ``48`` (``debug``):
                  Stuff which is only useful for libav* developers.
                * ``56`` (``trace``):
                  Extremely verbose debugging, useful for libav* development.

    N)r   Úset_log_level)r   s    r   r   r      s   € ôB ×Ñ˜UÕ#r   c                  ó*   — t         j                  «       S )an  Get the available demuxers.

    Returns:
        Dict[str, str]: Mapping from demuxer (format) short name to long name.

    Example
        >>> for k, v in get_demuxers().items():
        >>>     print(f"{k}: {v}")
        ... aa: Audible AA format files
        ... aac: raw ADTS AAC (Advanced Audio Coding)
        ... aax: CRI AAX
        ... ac3: raw AC-3
    )r   Úget_demuxersr
   r   r   r   r   B   s   € ô ×"Ñ"Ó$Ð$r   c                  ó*   — t         j                  «       S )a‡  Get the available muxers.

    Returns:
        Dict[str, str]: Mapping from muxer (format) short name to long name.

    Example
        >>> for k, v in get_muxers().items():
        >>>     print(f"{k}: {v}")
        ... a64: a64 - video for Commodore 64
        ... ac3: raw AC-3
        ... adts: ADTS AAC (Advanced Audio Coding)
        ... adx: CRI ADX
        ... aiff: Audio IFF
    )r   Ú
get_muxersr
   r   r   r   r   S   s   € ô × Ñ Ó"Ð"r   c                  ó*   — t         j                  «       S )a�  Get the available audio decoders.

    Returns:
        Dict[str, str]: Mapping from decoder short name to long name.

    Example
        >>> for k, v in get_audio_decoders().items():
        >>>     print(f"{k}: {v}")
        ... a64: a64 - video for Commodore 64
        ... ac3: raw AC-3
        ... adts: ADTS AAC (Advanced Audio Coding)
        ... adx: CRI ADX
        ... aiff: Audio IFF
    )r   Úget_audio_decodersr
   r   r   r   r   e   s   € ô ×(Ñ(Ó*Ð*r   c                  ó*   — t         j                  «       S )aæ  Get the available audio encoders.

    Returns:
        Dict[str, str]: Mapping from encoder short name to long name.

    Example
        >>> for k, v in get_audio_encoders().items():
        >>>     print(f"{k}: {v}")
        ... comfortnoise: RFC 3389 comfort noise generator
        ... s302m: SMPTE 302M
        ... aac: AAC (Advanced Audio Coding)
        ... ac3: ATSC A/52A (AC-3)
        ... ac3_fixed: ATSC A/52A (AC-3)
        ... alac: ALAC (Apple Lossless Audio Codec)
    )r   Úget_audio_encodersr
   r   r   r   r   w   ó   € ô  ×(Ñ(Ó*Ð*r   c                  ó*   — t         j                  «       S )aÃ  Get the available video decoders.

    Returns:
        Dict[str, str]: Mapping from decoder short name to long name.

    Example
        >>> for k, v in get_video_decoders().items():
        >>>     print(f"{k}: {v}")
        ... aasc: Autodesk RLE
        ... aic: Apple Intermediate Codec
        ... alias_pix: Alias/Wavefront PIX image
        ... agm: Amuse Graphics Movie
        ... amv: AMV Video
        ... anm: Deluxe Paint Animation
    )r   Úget_video_decodersr
   r   r   r   r   Š   r   r   c                  ó*   — t         j                  «       S )a9  Get the available video encoders.

    Returns:
        Dict[str, str]: Mapping from encoder short name to long name.

    Example
        >>> for k, v in get_audio_encoders().items():
        >>>     print(f"{k}: {v}")
        ... a64multi: Multicolor charset for Commodore 64
        ... a64multi5: Multicolor charset for Commodore 64, extended with 5th color (colram)
        ... alias_pix: Alias/Wavefront PIX image
        ... amv: AMV Video
        ... apng: APNG (Animated Portable Network Graphics) image
        ... asv1: ASUS V1
        ... asv2: ASUS V2
    )r   Úget_video_encodersr
   r   r   r   r   �   s   € ô" ×(Ñ(Ó*Ð*r   c                  ó*   — t         j                  «       S )aE  Get the available input devices.

    Returns:
        Dict[str, str]: Mapping from device short name to long name.

    Example
        >>> for k, v in get_input_devices().items():
        >>>     print(f"{k}: {v}")
        ... avfoundation: AVFoundation input device
        ... lavfi: Libavfilter virtual input device
    )r   Úget_input_devicesr
   r   r   r    r    ±   s   € ô ×'Ñ'Ó)Ð)r   c                  ó*   — t         j                  «       S )a  Get the available output devices.

    Returns:
        Dict[str, str]: Mapping from device short name to long name.

    Example
        >>> for k, v in get_output_devices().items():
        >>>     print(f"{k}: {v}")
        ... audiotoolbox: AudioToolbox output device
    )r   Úget_output_devicesr
   r   r   r"   r"   À   s   € ô ×(Ñ(Ó*Ð*r   c                  ó*   — t         j                  «       S )a  Get the supported input protocols.

    Returns:
        List[str]: The names of supported input protocols

    Example
        >>> print(get_input_protocols())
        ... ['file', 'ftp', 'hls', 'http','https', 'pipe', 'rtmp', 'tcp', 'tls', 'udp', 'unix']
    )r   Úget_input_protocolsr
   r   r   r$   r$   Î   s   € ô ×)Ñ)Ó+Ð+r   c                  ó*   — t         j                  «       S )a  Get the supported output protocols.

    Returns:
        list of str: The names of supported output protocols

    Example
        >>> print(get_output_protocols())
        ... ['file', 'ftp', 'http', 'https', 'md5', 'pipe', 'prompeg', 'rtmp', 'tee', 'tcp', 'tls', 'udp', 'unix']
    )r   Úget_output_protocolsr
   r   r   r&   r&   Û   s   € ô ×*Ñ*Ó,Ð,r   c                  ó*   — t         j                  «       S )aP  Get the FFmpeg build configuration

    Returns:
        str: Build configuration string.

    Example
        >>> print(get_build_config())
        --prefix=/Users/runner/miniforge3 --cc=arm64-apple-darwin20.0.0-clang --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-neon --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-libvpx --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/pkg-config --enable-cross-compile --arch=arm64 --target-os=darwin --cross-prefix=arm64-apple-darwin20.0.0- --host-cc=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/x86_64-apple-darwin13.4.0-clang  # noqa
    )r   Úget_build_configr
   r   r   r(   r(   è   s   € ô ×&Ñ&Ó(Ð(r   c                  ó,   — t         j                  «        y)zGClear the CUDA context used by CUDA Hardware accelerated video decodingN)r   Úclear_cuda_context_cacher
   r   r   r*   r*   õ   s   € ä×'Ñ'Õ)r   )Ú__doc__Útypingr   r   r   ÚtorioÚ
_extensionÚlazy_import_ffmpeg_extr   ÚstrÚintr	   r   r   r   r   r   r   r   r   r    r"   r$   r&   r(   r*   r
   r   r   ú<module>r2      s,  ðñ÷ %Ñ $ã à×Ñ×4Ñ4Ó6€
ð%�d˜3  c¡
˜?Ñ+ó %ð&�só &ð!$˜ó !$ðH%�d˜3 ˜8‘nó %ð"#�D˜˜c˜‘Nó #ð$+˜D  c ™Nó +ð$+˜D  c ™Nó +ð&+˜D  c ™Nó +ð&+˜D  c ™Nó +ð(*˜4  S ™>ó *ð+˜D  c ™Nó +ð
,˜T #™Yó 
,ð
-˜d 3™ió 
-ð
)˜#ó 
)ó*r   