+
    k'Ïj+  ã                   ó´   € ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ] P                   ] P"                   ! R	 R
]	4      4       4       tR# )é    N)Úlibav©ÚPacket)Úfrom_avrational)ÚStream©Ú
VideoFrame)Úint32_t)Úmemcpyc                   óT  a € ] tR t^t o R tR t]P                  RV 3R lR ll4       t]P                  RV 3R lR ll4       t	]P                  V 3R lR	 l4       t]P                  V 3R
 lR l4       tR tRR lt]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tRtV tR# )ÚVideoStreamc                óØ  € V P                  4       '       g(   R V P                  P                   R\        V 4      R R2# V P                  f   RV P
                   R\        V 4      R R2# RV P
                   RV P                   RV P                  '       d   V P                  P                  MR RV P                  P                   RV P                  P                   R	\        V 4      R R2# )
z<av.z (container closed) at 0xÚxÚ>Nz<av.VideoStream #z video/<nocodec> at 0xÚ z, z at 0x)
Ú_is_openÚ	__class__Ú__name__ÚidÚcodec_contextÚindexÚnameÚformatÚwidthÚheight©Úselfs   &ÚI/opt/data/cache/scratch/pip-target-lhm_ju4v/lib/python/av/video/stream.pyÚ__repr__ÚVideoStream.__repr__   sÙ   € Ø�}‰}�Šà�t—~‘~×.Ñ.Ð/Ð/HÌÈDËÐRSÈÐTUÐVðð ×ÑÒ%Ø& t§z¡z lÐ2HÌÈDËÐRSÈÐTUÐVÐVà §
¡
˜|¨1¨T¯Y©Y¨K°rØ#'§;§; ;ˆt�{‰{×Ò°DÐ9¸¸4×;MÑ;M×;SÑ;SÐ:TÐTUØ×!Ñ!×(Ñ(Ð)¨´°4³¸¨|¸1ð>ð	
ó    c                óì   € VR9   d&   \        R\        V 4      P                   RV R24      hV P                  f&   \        R\        V 4      P                   RV R24      h\	        V P                  V4      # )Ú	framerateÚ'z' object has no attribute ')r#   Úrate)ÚAttributeErrorÚtyper   r   Úgetattr)r   r   s   &&r   Ú__getattr__ÚVideoStream.__getattr__   s„   € ØÐ(Ô(Ü Ø”D˜“J×'Ñ'Ð(Ð(CÀDÀ6ÈÐKóð ð ×ÑÒ%Ü Ø”D˜“J×'Ñ'Ð(Ð(CÀDÀ6ÈÐKóð ô �t×)Ñ)¨4Ó0Ð0r!   Nc                ó.   <€ V ^8„  d   QhRS[ R,          /# )é   ÚframeNr   )r   Ú__classdict__s   "€r   Ú__annotate__ÚVideoStream.__annotate__(   s   ø€ ÷ ñ ™J¨Õ-ñ r!   c                óâ   € V P                  \        P                  4       V P                  P	                  V4      pV F.  pWn        V P                  P                  VP                  n        K0  	  V# )z©
Encode an :class:`.VideoFrame` and return a list of :class:`.Packet`.

:rtype: list[Packet]

.. seealso:: This is mostly a passthrough to :meth:`.CodecContext.encode`.
)	Ú_assert_has_codec_contextÚlibÚAVERROR_ENCODER_NOT_FOUNDr   ÚencodeÚ_streamÚptrr   Ústream_index)r   r-   ÚpacketsÚpackets   &&  r   r5   ÚVideoStream.encode'   sX   € ð 	×&Ñ&¤s×'DÑ'DÔEØ×$Ñ$×+Ñ+¨EÓ2ˆãˆFØ!ŒNØ&*§h¡h§n¡nˆF�J‰JÖ#ñ ð ˆr!   c                ó.   <€ V ^8„  d   QhRS[ R,          /# )r,   r:   Nr   )r   r.   s   "€r   r/   r0   9   s   ø€ ÷ 	1ñ 	1™V d�]ñ 	1r!   c                óX   € V P                  4        V P                  P                  V4      # )z¥
Decode a :class:`.Packet` and return a list of :class:`.VideoFrame`.

:rtype: list[VideoFrame]

.. seealso:: This is a passthrough to :meth:`.CodecContext.decode`.
)r2   r   Údecode)r   r:   s   &&r   r>   ÚVideoStream.decode8   s'   € ð 	×&Ñ&Ô(Ø×!Ñ!×(Ñ(¨Ó0Ð0r!   c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r,   Úreturn©ÚcythonÚvoid)r   r.   s   "€r   r/   r0   E   s   ø€ ÷ )ñ )¡f§k¡kñ )r!   c                ó  € \         P                  ! V 4       V P                  e0   V P                  P                  P                  V P                  n        V P                  e'   V P                  '       d   V P                  4        R # R # R # ©N)r   Ú_finalize_for_outputr   r7   r#   Úavg_frame_rateÚ_has_display_matrixÚ_apply_display_matrixr   s   &r   rH   Ú VideoStream._finalize_for_outputD   sh   € ä×#Ò# DÔ)Ø×ÑÒ)Ø&*×&8Ñ&8×&<Ñ&<×&FÑ&FˆD�H‰HÔ#ð ×ÑÒ)¨d×.F×.FÐ.FØ×&Ñ&Ö(ñ /GÑ)r!   c                ó4   <€ V ^8„  d   QhRS[ P                  /# rA   rC   )r   r.   s   "€r   r/   r0   O   s   ø€ ÷ 1ñ 1¡v§{¡{ñ 1r!   c                óâ  € ^	\         P                  ! \        4      ,          p\        P                  ! \         P
                  ! V P                  P                  P                  4      \         P
                  ! V P                  P                  P                  4      \        P                  V^ 4      pV\         P                  8X  d   \        R4      h\        VP                  V P                  V4       R# )é	   z+could not allocate display matrix side dataN)rD   Úsizeofr
   r3   Úav_packet_side_data_newÚaddressr7   ÚcodecparÚcoded_side_dataÚnb_coded_side_dataÚAV_PKT_DATA_DISPLAYMATRIXÚNULLÚMemoryErrorr   ÚdataÚ_display_matrix)r   ÚnÚsds   &  r   rK   Ú!VideoStream._apply_display_matrixN   sœ   € àœFŸMšM¬'Ó2Õ2ˆÜ36×3NÒ3NÜ�NŠN˜4Ÿ8™8×,Ñ,×<Ñ<Ó=Ü�NŠN˜4Ÿ8™8×,Ñ,×?Ñ?Ó@Ü×)Ñ)ØØó4
ˆð ”—‘ÔÜÐKÓLÐLäˆr�w‰w˜×,Ñ,¨aÖ0r!   c                óð   € Vf
   RV n         R# V Uu. uF  p\        V4      NK  	  pp\        V4      ^	8w  d   \        R4      h\	        ^	4       F  pW4,          V P
                  V&   K  	  RV n         R# u upi )a"  Set the display matrix written to the container as coded side data.

``matrix`` is a sequence of 9 integers in FFmpeg's ``AV_PKT_DATA_DISPLAYMATRIX``
layout, or ``None`` to clear. Must be called before the first frame is
encoded. See :meth:`set_display_rotation` for a higher-level helper.
NFz+display matrix must have exactly 9 elementsT)rJ   ÚintÚlenÚ
ValueErrorÚrangerZ   )r   ÚmatrixÚvÚvalsÚis   &&   r   Úset_display_matrixÚVideoStream.set_display_matrix]   sp   € ð Š>Ø',ˆDÔ$Ùá &Ó'¡˜1”�A–¡ˆÐ'Üˆt‹9˜Œ>ÜÐJÓKÐKä�q–ˆAØ&*¥gˆD× Ñ  Ó#ñ à#'ˆÖ ùò (s   ’A3c                óÒ   € \         P                  ! V P                  \        V4      ) 4       \         P                  ! V P                  \        V4      \        V4      4       RV n        R# )a@  Set the container display matrix from a rotation and optional flips.

``degrees`` is a counter-clockwise rotation (matching the value read back
from :attr:`VideoFrame.rotation`); ``hflip`` / ``vflip`` mirror after it.
Together these express all eight EXIF orientations. Must be called before
the first frame is encoded.
TN)r3   Úav_display_rotation_setrZ   ÚfloatÚav_display_matrix_flipÚboolrJ   )r   ÚdegreesÚhflipÚvflips   &&&&r   Úset_display_rotationÚ VideoStream.set_display_rotationp   sH   € ô 	×#Ò# D×$8Ñ$8¼5À»>¸/ÔJÜ×"Ò" 4×#7Ñ#7¼¸e»ÄdÈ5ÃkÔRØ#'ˆÖ r!   c                ó`   € V P                  4        \        V P                  P                  4      # )zª
The average frame rate of this video stream.

This is calculated when the file is opened by looking at the first
few frames and averaging their rate.

:type: AVRational
)Ú_assert_openr   r7   rI   r   s   &r   Úaverage_rateÚVideoStream.average_rate~   s%   € ð 	×ÑÔÜ˜tŸx™x×6Ñ6Ó7Ð7r!   c                ó`   € V P                  4        \        V P                  P                  4      # )zÓ
The base frame rate of this stream.

This is calculated as the lowest framerate at which the timestamps of
frames can be represented accurately. See :ffmpeg:`AVStream.r_frame_rate`
for more.

:type: AVRational
)rt   r   r7   Úr_frame_rater   s   &r   Ú	base_rateÚVideoStream.base_rate‹   s%   € ð 	×ÑÔÜ˜tŸx™x×4Ñ4Ó5Ð5r!   c                ó´   € V P                  4        \        P                  ! \        P                  V P
                  \        P                  4      p\        V4      # )z´The guessed frame rate of this stream.

This is a wrapper around :ffmpeg:`av_guess_frame_rate`, and uses multiple
heuristics to decide what is "the" frame rate.

:type: AVRational
)rt   r3   Úav_guess_frame_raterD   rW   r7   r   )r   Úvals   & r   Úguessed_rateÚVideoStream.guessed_rate™   s@   € ð 	×ÑÔÜ!×5Ò5Ü�K‰K˜Ÿ™¤6§;¡;ó
ˆô ˜sÓ#Ð#r!   c                óÀ   € V P                  4        \        P                  ! V P                  P                  V P                  \
        P                  4      p\        V4      # )zÕThe guessed sample aspect ratio (SAR) of this stream.

This is a wrapper around :ffmpeg:`av_guess_sample_aspect_ratio`, and uses multiple
heuristics to decide what is "the" sample aspect ratio.

:type: AVRational
)rt   r3   Úav_guess_sample_aspect_ratioÚ	containerr7   rD   rW   r   )r   Úsars   & r   Úsample_aspect_ratioÚVideoStream.sample_aspect_ratio¨   sF   € ð 	×ÑÔÜ!×>Ò>Ø�N‰N×Ñ §¡¬&¯+©+ó
ˆô ˜sÓ#Ð#r!   c                óÈ  € \         P                  ! \        P                  4      p\        P                  ! \         P
                  ! VP                  4      \         P
                  ! VP                  4      V P                  P                  V P                  P                  ,          V P                  P                  V P                  P                  ,          R4       \        V4      # )z•The guessed display aspect ratio (DAR) of this stream.

This is calculated from :meth:`.VideoStream.guessed_sample_aspect_ratio`.

:type: AVRational
i   )rD   Údeclarer3   Ú
AVRationalÚ	av_reducerR   ÚnumÚdenr   r   r„   r   r   )r   Údars   & r   Údisplay_aspect_ratioÚ VideoStream.display_aspect_ratio·   sŽ   € ô �nŠnœSŸ^™^Ó,ˆÜ�ŠÜ�NŠN˜3Ÿ7™7Ó#Ü�NŠN˜3Ÿ7™7Ó#Ø�K‰K×Ñ × 8Ñ 8× <Ñ <Õ<Ø�K‰K×Ñ ×!9Ñ!9×!=Ñ!=Õ=Øô	
ô ˜sÓ#Ð#r!   )rJ   rG   )FF)r   Ú
__module__Ú__qualname__Ú__firstlineno__r   r)   rD   Úccallr5   r>   ÚcfuncrH   rK   rg   rq   Úpropertyru   ry   r~   r„   r�   Ú__static_attributes__Ú__classdictcell__)r.   s   @r   r   r      sç   ø‡ € ò
ò	1ð ‡\�\÷ñ ó ðð  ‡\�\÷	1ñ 	1ó ð	1ð ‡\�\÷)ó ð)ð ‡\�\÷1ó ð1ò(ô&(ð ñ
8ó ð
8ð ñ6ó ð6ð ñ$ó ð$ð ñ$ó ð$ð ñ$ó ö$r!   r   )rD   Úcython.cimportsr   r3   Úcython.cimports.av.packetr   Úcython.cimports.av.rationalr   Úcython.cimports.av.streamr   Úcython.cimports.av.video.framer	   Úcython.cimports.libc.stdintr
   Úcython.cimports.libc.stringr   ÚfinalÚcclassr   © r!   r   Ú<module>r¡      sK   ðÛ Ý (Ý ,Ý 7Ý ,Ý 5Ý /Ý .ð ‡�Ø‡�ô{$�&ó {$ó ó ò{$r!   