
    ^jd                     
   d dl Z d dlZd dlmZmZmZ ddlT d dlZej        d         Z	 e
e d          oe j        Z e            Zej        Zej        Zej        Zej        Z G d de          Z G d	 d
e          Zd Zd ZdS )    N)CodecRegistryDecoderEncoder   )*debug_mediais_pyglet_doc_runc                       e Zd Zd ZdS )MediaDecoderc                     t                      )zRead the given file object and return an instance of `Source`
        or `StreamingSource`. 
        Throws DecodeException if there is an error.  `filename`
        can be a file type hint.
        NotImplementedError)selffilenamefile	streamings       W/home/agentuser/manim-venv/lib/python3.11/site-packages/pyglet/media/codecs/__init__.pydecodezMediaDecoder.decode        "###    N)__name__
__module____qualname__r    r   r   r   r      #        $ $ $ $ $r   r   c                       e Zd Zd ZdS )MediaEncoderc                     t                      )zEncode the given source to the given file.  `filename`
        provides a hint to the file format desired.  options are
        encoder-specific, and unknown options should be ignored or
        issue warnings.
        r   )r   sourcer   r   s       r   encodezMediaEncoder.encode"   r   r   N)r   r   r   r    r   r   r   r   r       r   r   r   c                  Z   	 ddl m}  t                              |            t                              |            n# t
          $ r Y nw xY wt          j                            d          r2	 ddl m	} t                              |           n# t
          $ r Y nw xY w	 t          j        dv r(ddl
m} |r ddl m} t                              |           n# t
          $ r Y nw xY w	 t                      r dd	l m} t                              |           n# t
          $ r Y nw xY w	 dd
l m} t                              |           n# t
          $ r Y nw xY wt          j                            d          r4	 ddl m} t                              |           d S # t
          $ r Y d S w xY wd S )Nr   )wavelinux)	gstreamer)win32cygwinr   )WINDOWS_VISTA_OR_GREATER)wmf)ffmpeg)pyoggdarwin)	coreaudio) r"   registryadd_decodersadd_encodersImportErrorpygletcompat_platform
startswithr$   pyglet.libs.win32.constantsr'   r(   have_ffmpegr)   r*   r,   )r"   r$   r'   r(   r)   r*   r,   s          r   add_default_codecsr7   +   s`   d###d####    ((11 	######!!),,,, 	 	 	D	!%888LLLLLL' +!!!!!!%%c***   == 	*      !!&)))   e$$$$    ((22 	######!!),,,,, 	 	 	DD		 si   := 
A
	A
- B 
BB6C 
C#"C#'.D 
D#"D#' E 
EE8 F 
F('F(c                     	 ddl m}  t          rt          d           d}| j                                        D ]?\  }}| j        j        |k    r*t          rt          d| d| j        j                    d} n@|s(t          s!t          j
        d| j        j                    dS # t          t          t          f$ r$}t          rt          d	|            Y d
}~dS d
}~ww xY w)zzCheck if FFmpeg library is available.

    Returns:
        bool: True if FFmpeg is found.

    .. versionadded:: 1.4
    r   )
ffmpeg_libz,FFmpeg available, using to load media files.FzFFMpeg Release Version: z. Versions Loaded: TzvFFmpeg release version not found. This may be a new or untested release. Unknown behavior may occur. Versions Loaded: zFFmpeg not available: N)r-   r9   _debugprintrelease_versionsitemscompatversions_is_pyglet_doc_runwarningswarnr1   FileNotFoundErrorAttributeError)r9   foundr<   build_versionserrs        r   r6   r6   [   sT          	B@AAA0:0K0Q0Q0S0S 	 	,n )^;; xv5EvvZdZkZtvvwww	 <  	q/ 	qM  p  T^  Te  Tn  p  p  q  q  qt*N;    	20300111uuuuus   B!B% %C <CC )sysrA   pyglet.utilr   r   r   baser2   optionsr:   hasattrr	   r@   r.   r/   r0   get_decodersget_encodersr   r   r7   r6   r   r   r   <module>rO      s   



  7 7 7 7 7 7 7 7 7 7      
	&WS"566P3;P =??$$$$$ $ $ $ $7 $ $ $$ $ $ $ $7 $ $ $- - -`    r   