
    dj-                        d dl mZ d dlZd dlmc mZ d dlmZ  ej	        e
 e
                      Zej        dej        ej        ej                          dej        ej        ej                          defd            Z G d d	e          Zej         G d
 d                      Zej        defd            Zej        defd            Z e            Ze                     e                        e ej                              ZdS )    )FlagN)wrap_avclassiptroptrreturnc                     | s|st          d          t                              t          t                    }| |_        ||_        |r|j        n| j        |_        |S )Nz#needs input format or output format)
ValueErrorContainerFormat__new___cinit_bypass_sentinelr   r   name)r   r   formats      D/home/agentuser/manim-venv/lib/python3.11/site-packages/av/format.pybuild_container_formatr   
   sh    
  @ @>???-55/ F FKFK#2$))FKM    c                      e Zd ZU ej        Zej        Zded<   ej	        Z
ded<   ej        Zded<   ej        Zded<   ej        Zd	ed
<   ej        Zded<   ej        Zded<   ej        Zded<   ej        Zded<   ej        Zded<   ej        Zded<   ej        Zded<   ej        Z ded<   ej!        Z"ded<   ej#        Z$ded<   dS ) FlagszNeeds '%d' in filename.need_numberzShow format stream IDs numbers.show_idszFormat wants global header.global_headerz+Format does not need / have any timestamps.no_timestampsz Use generic index building code.generic_indexz'Format allows timestamp discontinuities
ts_discontzFormat allows variable fps.variable_fpsz!Format does not need width/heightno_dimensionsz#Format does not require any streams
no_streamszFFormat does not allow to fall back on binary search via read_timestampno_bin_searchz4Format does not allow to fall back on generic searchno_gen_searchz&Format does not allow seeking by bytesno_byte_seekzYFormat does not require strictly increasing timestamps, but they must still be monotonic.ts_nonstrictz)Format allows muxing negative timestamps.ts_negativezSeeking is based on PTSseek_to_ptsN)%__name__
__module____qualname__libAVFMT_NOFILEno_fileAVFMT_NEEDNUMBERr   __annotations__AVFMT_SHOW_IDSr   AVFMT_GLOBALHEADERr   AVFMT_NOTIMESTAMPSr   AVFMT_GENERIC_INDEXr   AVFMT_TS_DISCONTr   AVFMT_VARIABLE_FPSr   AVFMT_NODIMENSIONSr   AVFMT_NOSTREAMSr   AVFMT_NOBINSEARCHr   AVFMT_NOGENSEARCHr   AVFMT_NO_BYTE_SEEKr   AVFMT_TS_NONSTRICTr    AVFMT_TS_NEGATIVEr!   AVFMT_SEEK_TO_PTSr"    r   r   r   r      sU        G-0-AK*AAA252DH/DDD363IM0IIICFCYM@YYY8;8OM5OOO<?<PJ9PPP252HL/HHH9<9OM6OOO8;8KJ5KKK^a^sM[sssLOLaMIaaa=@=SL:SSSps  qGLm  G  G  G?B?TK<TTT .1-BK*BBBBBr   r   c                       e Zd ZdZddZd Zed             Zed             Zed             Z	ed             Z
ed	             Zed
             Zed             Zed             Zed             Zed             ZdS )r
   zDescriptor of a container format.

    :param str name: The name of the format.
    :param str mode: ``'r'`` or ``'w'`` for input and output formats; defaults
        to None which will grab either.

    Nc                    |t           u rd S || _        ||dk    rt          j        |          | _        ||dk    r/t          j        |t          j        t          j                  | _        | j        s| j        st          d|          d S d S )Nrwzno container format )
r   r   r&   av_find_input_formatr   av_guess_formatcythonNULLr   r	   )selfr   modes      r   	__cinit__zContainerFormat.__cinit__;   s    )))F 	 <43;;066DI<43;;+D&+v{KKDIy 	> 	><D<<===	> 	> 	> 	>r   c                 2    d| j         j         d| j        dS )Nz<av. >)	__class__r#   r   rB   s    r   __repr__zContainerFormat.__repr__M   s"    >dn->>	>>>>r   c                 t    | j         rt          | j         j                  S t          | j        j                  S N)r   r   
priv_classr   rI   s    r   
descriptorzContainerFormat.descriptorP   s2    9 	6	 4555	 4555r   c                     | j         j        S rL   )rN   optionsrI   s    r   rP   zContainerFormat.optionsW   s    &&r   c                     | j         t          j        k    rdS | j        t          j        k    r| S t	          | j         t          j                  S )z"An input-only view of this format.N)r   r@   rA   r   r   rI   s    r   inputzContainerFormat.input[   s@     9##4Y&+%%K)$)V[AAAr   c                     | j         t          j        k    rdS | j        t          j        k    r| S t	          t          j        | j                   S )z#An output-only view of this format.N)r   r@   rA   r   r   rI   s    r   outputzContainerFormat.outpute   s@     9##4Y&+%%K)&+tyAAAr   c                 ,    | j         t          j        k    S rL   )r   r@   rA   rI   s    r   is_inputzContainerFormat.is_inputo       yFK''r   c                 ,    | j         t          j        k    S rL   )r   r@   rA   rI   s    r   	is_outputzContainerFormat.is_outputs   rW   r   c                 @    | j         r| j         j        n| j        j        S rL   )r   	long_namer   rI   s    r   r[   zContainerFormat.long_namew   s      '+iHty""TY5HHr   c                 6   t                      }| j        r>| j        j        r2|                    | j        j                            d                     | j        r>| j        j        r2|                    | j        j                            d                     |S )N,)setr   
extensionsupdatesplitr   )rB   extss     r   r_   zContainerFormat.extensions}   s    EE9 	9- 	9KK	,223778889 	9- 	9KK	,22377888r   c                 X    | j         r| j         j        nd| j        r| j        j        ndz  S )zL
        Get the flags bitmask for the format.

        :rtype: int
        r   )r   flagsr   rI   s    r   rd   zContainerFormat.flags   s2     $(93	!#y/DIOOa
 	
r   c                 D    t          | j        t          j        z            S rL   )boolrd   r&   r'   rI   s    r   r(   zContainerFormat.no_file   s    DJ!11222r   rL   )r#   r$   r%   __doc__rD   rJ   propertyrN   rP   rR   rT   rV   rY   r[   r_   rd   r(   r9   r   r   r
   r
   1   sX        > > > >$? ? ? 6 6 X6 ' ' X' B B XB B B XB ( ( X( ( ( X( I I XI
   X 
 
 X
 3 3 X3 3 3r   r
   c                      t                      } t          j        }	 t          j        t          j        |                    }|r|                     |j                   nnE| S rL   )r^   r@   rA   r&   av_muxer_iterateaddressaddr   namesopaqueptrs      r   get_output_format_namesrq      s_    E"KF"6>&#9#9:: 	IIch Lr   c                      t                      } t          j        }	 t          j        t          j        |                    }|r|                     |j                   nnE| S rL   )r^   r@   rA   r&   av_demuxer_iteraterk   rl   r   rm   s      r   get_input_format_namesrt      s_    E"KF$V^F%;%;<< 	IIch Lr   )enumr   r@   cython.cimports.libavcimportslibavr&   cython.cimports.av.descriptorr   declareobjectr   cfuncpointerconstAVInputFormatAVOutputFormatr
   r   r   cclassr^   rq   rt   formats_availabler`   avformat_get_classformat_descriptorr9   r   r   <module>r      s          # # # # # # # # # 6 6 6 6 6 6'99  
.c&78
9
.c&89
:     C C C C CD C C C, a3 a3 a3 a3 a3 a3 a3 a3H 
 
 
 
 
 
 
 
 
 
 ,+--    //11 2 2 2 L!7!7!9!9::   r   