
    \j                        d dl mZ d dlZd dlmc 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$                  ej&                   G d	 d
                    Zej                  defd       Zej                  defd       Z e       Zej1                   e              y)    )FlagNiptroptrreturnc                     | s|st        d      t        j                  t        t              }| |_        ||_        |r|j                  |_        |S | j                  |_        |S )Nz#needs input format or output format)
ValueErrorContainerFormat__new___cinit_bypass_sentinelr   r   name)r   r   formats      </root/.hermes/venv/lib/python3.12/site-packages/av/format.pybuild_container_formatr   	   s_    
 >??-55/F FKFK#$))FKM *.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j2                  Zded<   ej6                  Zded<   ej:                  Zded<   ej>                  Z ded<   ejB                  Z"ded<   ejF                  Z$ded<   y) 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      s   G-0-A-AK*A252D2DH/D363I3IM0ICFCYCYM@Y8;8O8OM5O<?<P<PJ9P252H2HL/H9<9O9OM6O8;8K8KJ5K^a^s^sM[sLOLaLaMIa=@=S=SL:Sps  qG  qGLm  G?B?T?TK<T .1-B-BK*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y)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                 2   |t         u ry || _        ||dk(  rt        j                  |      | _        ||dk(  r8t        j
                  |t        j                  t        j                        | _        | j                  s| j                  st        d|      y y )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    )) 	 <43;006DI<43;++D&++v{{KDIyy3D8<== "+yr   c                 P    d| j                   j                   d| j                  dS )Nz<av. >)	__class__r"   r   rA   s    r   __repr__zContainerFormat.__repr__M   s&    dnn--.a		}A>>r   c                     | j                   t        j                  k(  ry| j                  t        j                  k(  r| S t	        | j                   t        j                        S )z"An input-only view of this format.N)r   r?   r@   r   r   rH   s    r   inputzContainerFormat.inputP   sA     99#YY&++%K)$))V[[AAr   c                     | j                   t        j                  k(  ry| j                  t        j                  k(  r| S t	        t        j                  | j                         S )z#An output-only view of this format.N)r   r?   r@   r   r   rH   s    r   outputzContainerFormat.outputZ   sA     99#YY&++%K)&++tyyAAr   c                 <    | j                   t        j                  k7  S N)r   r?   r@   rH   s    r   is_inputzContainerFormat.is_inputd       yyFKK''r   c                 <    | j                   t        j                  k7  S rO   )r   r?   r@   rH   s    r   	is_outputzContainerFormat.is_outputh   rQ   r   c                 r    | j                   r| j                   j                  S | j                  j                  S rO   )r   	long_namer   rH   s    r   rU   zContainerFormat.long_namel   s)     '+iityy""HTYY5H5HHr   c                 r   t               }| j                  rJ| j                  j                  r4|j                  | j                  j                  j	                  d             | j
                  rJ| j
                  j                  r4|j                  | j
                  j                  j	                  d             |S )N,)setr   
extensionsupdatesplitr   )rA   extss     r   rY   zContainerFormat.extensionsr   sv    E99--KK		,,2237899--KK		,,22378r   c                     | j                   r| j                   j                  nd| j                  r| j                  j                  z  S dz  S )zL
        Get the flags bitmask for the format.

        :rtype: int
        r   )r   flagsr   rH   s    r   r^   zContainerFormat.flags{   s?     $(99		!#yyDIIOO
 	
./
 	
r   c                 N    t        | j                  t        j                  z        S rO   )boolr^   r%   r&   rH   s    r   r'   zContainerFormat.no_file   s    DJJ!1!1122r   rO   )r"   r#   r$   __doc__rC   rI   propertyrK   rM   rP   rS   rU   rY   r^   r'   r8   r   r   r	   r	   0   s    >$? B B B B ( ( ( ( I I
   
 
 3 3r   r	   c                      t               } t        j                  }	 t        j                  t        j
                  |            }|r| j                  |j                         n	 | S JrO   )rX   r?   r@   r%   av_muxer_iterateaddressaddr   namesopaqueptrs      r   get_output_format_namesrk      sN    E"KKF
""6>>&#9:IIchhL r   c                      t               } t        j                  }	 t        j                  t        j
                  |            }|r| j                  |j                         n	 | S JrO   )rX   r?   r@   r%   av_demuxer_iteratere   rf   r   rg   s      r   get_input_format_namesrn      sN    E"KKF
$$V^^F%;<IIchhL r   )enumr   r?   cython.cimports.libavcimportslibavr%   declareobjectr   cfuncpointerconstAVInputFormatAVOutputFormatr	   r   r   finalcclassrX   rk   rn   formats_availablerZ   r8   r   r   <module>r}      s     # #'9  
..c&7&78
9
..c&8&89
:   CD C, V3 V3  V3r 
 
 
 
 
 
 ,-    /1 2r   