+
    8&ÏjO(  ã                   óB  € ^ RI t ^ RIHt ^ RIt^ RIHu Ht ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt  ! R R]4      t ! R	 R
]4      t]P$                  ! ]]! 4       4      t]P$                  ! ]] P*                  ! 4       4      t]P.                  R R l4       t]P2                  ]P4                   ! R R4      4       4       t]P8                  R 4       t]P2                  ]P4                   ! R R4      4       4       t]P2                  ]P4                   ! R R4      4       4       tR# )é    N)ÚIntEnum)ÚCodec)Ú
Dictionary)Ú	err_check)Úget_video_formatc                   ó~  € ] tR t^t]P
                  t]P                  t]P                  t
]P                  t]P                  t]P                  t]P"                  t]P&                  t]P*                  t]P.                  t]P2                  t]P6                  t]P:                  t]P>                  t ]PB                  t"Rt#R# )ÚHWDeviceType© N)$Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚlibÚAV_HWDEVICE_TYPE_NONEÚnoneÚAV_HWDEVICE_TYPE_VDPAUÚvdpauÚAV_HWDEVICE_TYPE_CUDAÚcudaÚAV_HWDEVICE_TYPE_VAAPIÚvaapiÚAV_HWDEVICE_TYPE_DXVA2Údxva2ÚAV_HWDEVICE_TYPE_QSVÚqsvÚAV_HWDEVICE_TYPE_VIDEOTOOLBOXÚvideotoolboxÚAV_HWDEVICE_TYPE_D3D11VAÚd3d11vaÚAV_HWDEVICE_TYPE_DRMÚdrmÚAV_HWDEVICE_TYPE_OPENCLÚopenclÚAV_HWDEVICE_TYPE_MEDIACODECÚ
mediacodecÚAV_HWDEVICE_TYPE_VULKANÚvulkanÚAV_HWDEVICE_TYPE_D3D12VAÚd3d12vaÚAV_HWDEVICE_TYPE_AMFÚamfÚAV_HWDEVICE_TYPE_OHCODECÚohcodecÚ__static_attributes__r
   ó    ÚJ/opt/data/cache/scratch/pip-target-elquwxdg/lib/python/av/codec/hwaccel.pyr	   r	      s§   † Ø×$Ñ$€DØ×&Ñ&€EØ×$Ñ$€DØ×&Ñ&€EØ×&Ñ&€EØ
×
"Ñ
"€CØ×4Ñ4€LØ×*Ñ*€GØ
×
"Ñ
"€CØ×(Ñ(€FØ×0Ñ0€JØ×(Ñ(€FØ×*Ñ*€GØ
×
"Ñ
"€CØ×*Ñ*„Gr/   r	   c                   óz   € ] tR t^t^ t]P                  t]P                  t	]P                  t]P                  tRtR# )ÚHWConfigMethodr
   N)r   r   r   r   r   r   Ú'AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTXÚhw_device_ctxÚ'AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTXÚhw_frame_ctxÚ"AV_CODEC_HW_CONFIG_METHOD_INTERNALÚinternalÚ AV_CODEC_HW_CONFIG_METHOD_AD_HOCÚad_hocr.   r
   r/   r0   r2   r2      s8   † Ø€Dà×3Ñ3ð ð ×>Ñ>€LØ×5Ñ5€HØ×1Ñ1„Fr/   r2   c                ó˜   € V ^8„  d   QhR\         P                  \         P                  \        P                  ,          ,          R\
        /# ©é   ÚptrÚreturn)ÚcythonÚpointerÚconstr   ÚAVCodecHWConfigÚHWConfig)Úformats   "r0   Ú__annotate__rF   -   s2   € ÷ ñ ”v—~‘~¤f§l¡l´3×3FÑ3FÕ&GÕHð ÌXñ r/   c                 ó"  €  \         \        P                  ! \        P                  V 4      ,          #   \         d     Mi ; i\        \        4      pTP                  T 4       T\         \        P                  ! \        P                  T 4      &   T# ©N)Ú_singletonsr@   ÚcastÚ
Py_ssize_tÚKeyErrorrD   Ú_cinit_sentinelÚ_init)r>   Úconfigs   & r0   Úwrap_hwconfigrP   ,   sk   € ðÜœ6Ÿ;š;¤v×'8Ñ'8¸#Ó>Õ?Ð?øÜô Ùðúä¤Ó0€FØ
‡L�L�ÔØ7=„K”—’œF×-Ñ-¨sÓ3Ñ4Ø€Ms   ‚/2 ²A ¿A c                   óœ   a € ] tR t^8t o R t]P                  V 3R lR l4       tR t]	R 4       t
]	R 4       t]	R 4       t]	R 4       tR	tV tR
# )rD   c                ó0   € V\         Jd   \        R 4      hR# )zCannot instantiate CodecContextN)rM   ÚRuntimeError)ÚselfÚsentinels   &&r0   Ú__init__ÚHWConfig.__init__;   s   € Øœ?Ó*ÜÐ@ÓAÐAñ +r/   c                ó–   <€ V ^8„  d   QhRS[ P                  S[ P                  S[P                  ,          ,          RS[ P
                  /# r<   )r@   rA   rB   r   rC   Úvoid)rE   Ú__classdict__s   "€r0   rF   ÚHWConfig.__annotate__@   s9   ø€ ÷ ñ Ù—>‘>¡&§,¡,©s×/BÑ/BÕ"CÕDðá	�‰ñr/   c                ó   € Wn         R # rH   ©r>   )rT   r>   s   &&r0   rN   ÚHWConfig._init?   s	   € ð Žr/   c                óJ  € R V P                   P                   R\        P                  ! V P                  4       RV P
                  '       d   V P
                  P                  MR RV P                   R\        P                  ! \        P                  V P                  4      R R2# )z<av.z device_type=z format=Nz is_supported=z at 0xÚxÚ>)Ú	__class__r   r   Úav_hwdevice_get_type_nameÚdevice_typerE   ÚnameÚis_supportedr@   rJ   rK   r>   ©rT   s   &r0   Ú__repr__ÚHWConfig.__repr__E   s’   € à�4—>‘>×*Ñ*Ð+ð ,Ü×8Ò8¸×9IÑ9IÓJÐKð LØ*.¯+¯+¨+�d—k‘k×&Ò&¸4Ð@ð AØ ×-Ñ-Ð.¨f´V·[²[Ä×ARÑARÐTX×T\ÑT\Ó5]Ð^_Ð4`Ð`aðcð	
r/   c                ó@   € \        V P                  P                  4      # rH   )r	   r>   rd   rg   s   &r0   rd   ÚHWConfig.device_typeM   s   € ä˜DŸH™H×0Ñ0Ó1Ð1r/   c                óD   € \        V P                  P                  ^ ^ 4      # )r   )r   r>   Úpix_fmtrg   s   &r0   rE   ÚHWConfig.formatQ   s   € ä §¡× 0Ñ 0°!°QÓ7Ð7r/   c                ó@   € \        V P                  P                  4      # rH   )r2   r>   Úmethodsrg   s   &r0   rp   ÚHWConfig.methodsU   s   € ä˜dŸh™h×.Ñ.Ó/Ð/r/   c                ój   € \        V P                  P                  \        P                  ,          4      # rH   )Úboolr>   rp   r   r3   rg   s   &r0   rf   ÚHWConfig.is_supportedY   s"   € ä�D—H‘H×$Ñ$¤s×'RÑ'RÕRÓSÐSr/   r]   N)r   r   r   r   rV   r@   ÚcfuncrN   rh   Úpropertyrd   rE   rp   rf   r.   Ú__classdictcell__©rZ   s   @r0   rD   rD   8   sz   ø‡ € òBð ‡\�\÷ó ðò

ð ñ2ó ð2ð ñ8ó ð8ð ñ0ó ð0ð ñTó öTr/   rD   c                 óä   € . p \         P                  p \         P                  ! V4      pV\         P                  8X  d    V # V P                  \         P                  ! \        V4      4      4       K_  )zgReturn the names of the hardware device types FFmpeg was built with,
e.g. ``["cuda", "videotoolbox"]``.)r   r   Úav_hwdevice_iterate_typesÚappendrc   r	   )Úresultr`   s     r0   Úhwdevices_availabler}   ^   sZ   € ð €FÜ×5Ñ5€AØ
Ü×)Ò)¨!Ó,ˆØ”×)Ñ)Ô)Øà€Mð 	�‰”c×3Ò3´LÀ³OÓDÖEr/   c                   óJ   a € ] tR t^lt o RtR tRR lt]R 4       tR t	Rt
V tR# )	ÚHWDeviceaÇ  HWDevice(device_type, device=None, options=None, flags=None)

A hardware device context which can be shared by components such as filter
graphs. The underlying FFmpeg buffer is reference counted; consumers take
their own references and this object never exposes the raw pointer.

:param device_type: The kind of device, e.g. ``"cuda"``, ``"vaapi"`` or
    ``"vulkan"``. See :func:`hwdevices_available` for the types supported by
    the loaded FFmpeg.
:type device_type: str or HWDeviceType
:param str device: An optional device identifier. Uses the default device if
    ``None``.
:param dict options: Options passed to ``av_hwdevice_ctx_create``.
:param int flags: Flags passed to ``av_hwdevice_ctx_create``.
c                ó0   € \         P                  V n        R # rH   )r@   ÚNULLr>   rg   s   &r0   Ú	__cinit__ÚHWDevice.__cinit__   s   € Ü—;‘;ˆŽr/   Nc           	     óª  € \        V\        4      '       d   \        V4      V n        M�\        V\        4      '       dS   \        \
        P                  ! V4      4      V n        V P                  \
        P                  8X  d   \        R V 24      hM(\        V\        4      '       d   Wn        M\        R4      hV P                  \
        P                  8X  d   \        R4      hV'       g   / M
\        V4      V n        Vf   ^ MTV n        \        P                  pVf   RMT pV'       d   VP                  4       pTp\!        V P                  4      p\#        \
        P$                  ! \        P&                  ! V P(                  4      \        P*                  ! \
        P,                  V P                  4      VVP(                  V P                  4      4       R# )zUnknown hardware device type: z6device_type must be a string, integer, or HWDeviceTypez%Hardware device type cannot be 'none'N)Ú
isinstancer	   ÚintÚ_device_typeÚstrr   Úav_hwdevice_find_type_by_namer   Ú
ValueErrorÚ	TypeErrorÚdictÚoptionsÚflagsr@   r�   Úencoder   r   Úav_hwdevice_ctx_createÚaddressr>   rJ   ÚAVHWDeviceType)	rT   rd   Údevicer�   rŽ   Úc_deviceÚdevice_nameÚdevice_bytesÚ	c_optionss	   &&&&&    r0   rV   ÚHWDevice.__init__‚   sS  € Ü�k¤<×0Ò0Ü # KÓ 0ˆDÕÜ˜¤S×)Ò)Ü #¤C×$EÒ$EÀkÓ$RÓ SˆDÔØ× Ñ ¤C×$=Ñ$=Ô=Ü Ð#AÀ+ÀÐ!OÓPÐPð >ä˜¤S×)Ò)Ø +ÕäÐTÓUÐUà×Ñ¤× 9Ñ 9Ô9ÜÐDÓEÐEç!(‘r¬d°7«mˆŒØš-‘Q¨UˆŒ
ä"(§+¡+ˆØ$šn‘d°V°HˆßØ&×-Ñ-Ó/ˆLØ#ˆHÜ *¨4¯<©<Ó 8ˆ	äÜ×&Ò&Ü—’˜tŸx™xÓ(Ü—’œC×.Ñ.°×0AÑ0AÓBØØ—‘Ø—
‘
óö	
r/   c                ó,   € \        V P                  4      # rH   )r	   r‡   rg   s   &r0   rd   ÚHWDevice.device_type¥   s   € ä˜D×-Ñ-Ó.Ð.r/   c                ó–   € V P                   '       d7   \        P                  ! \        P                  ! V P                   4      4       R # R # rH   ©r>   r   Úav_buffer_unrefr@   r‘   rg   s   &r0   Ú__dealloc__ÚHWDevice.__dealloc__©   ó+   € Ø�8�8ˆ8Ü×Ò¤§¢¨t¯x©xÓ 8Ö9ñ r/   )r‡   rŽ   r�   r>   )NNN)r   r   r   r   Ú__doc__r‚   rV   rv   rd   rž   r.   rw   rx   s   @r0   r   r   l   s3   ø‡ € ñò ô!
ðF ñ/ó ð/÷:ð :r/   r   c                   ó`   a € ] tR t^®t o RtR
R ltRV 3R lR lltRV 3R lR lltR tR	t	V t
R# )ÚHWAccela›  HWAccel(device_type, device=None, allow_software_fallback=True, options=None, flags=None, is_hw_owned=False)

Settings for hardware-accelerated decoding and encoding. Pass an instance to
:func:`av.open` to decode on the device, or to
:meth:`OutputContainer.add_stream <av.container.OutputContainer.add_stream>`
to encode on it.

:param device_type: The kind of device, e.g. ``"cuda"``, ``"vaapi"``,
    ``"videotoolbox"``. See :func:`hwdevices_available` for the types
    supported by the loaded FFmpeg.
:type device_type: str or HWDeviceType
:param str device: An optional device identifier, e.g. a DRI render node path
    (``"/dev/dri/renderD128"``) for VAAPI or a device index (``"1"``) for CUDA.
    Uses the default device if ``None``.
:param bool allow_software_fallback: Whether decoding falls back to a software
    decoder when the hardware decoder cannot handle the stream.
:param dict options: Options passed to ``av_hwdevice_ctx_create``.
:param int flags: Flags passed to ``av_hwdevice_ctx_create``.
:param bool is_hw_owned: If True, decoded frames stay on the device (for
    consumption via DLPack, for example) instead of being downloaded to
    system memory.
Nc                óÞ  € \        V\        4      '       d   Wn        Mc\        V\        4      '       d&   \	        \
        P                  ! V4      4      V n        M(\        V\        4      '       d   Wn        M\        R 4      hW`n        ^ V n	        V P                  \        P                  8X  d   V'       d   \	        V4      V n	        Vf   RMT V n        W0n        V'       g   / M
\        V4      V n        V P                  \        P                  8X  d/   V P                  '       d   V P                  P                  RR4       V'       g   ^ MTV n        \"        P$                  V n        RV n        R# )zUnknown type for device_typeNÚprimary_ctxÚ1)r…   r	   r‡   rˆ   r†   r   r‰   rŠ   Úis_hw_ownedÚ	device_idr   Ú_deviceÚallow_software_fallbackrŒ   r�   Ú
setdefaultrŽ   r@   r�   r>   rO   )rT   rd   r“   rª   r�   rŽ   r§   s   &&&&&&&r0   rV   ÚHWAccel.__init__È   sý   € ô �k¤<×0Ò0Ø +ÕÜ˜¤S×)Ò)Ü #¤C×$EÒ$EÀkÓ$RÓ SˆDÕÜ˜¤S×)Ò)Ø +ÕäÐ;Ó<Ð<à&ÔØˆŒØ×Ñ¤× 1Ñ 1Ô1·fÜ  ›[ˆDŒNà%š~‘t°f°XˆŒØ'>Ô$ç!(‘r¬d°7«mˆŒØ×Ñ¤× 1Ñ 1Ô1°d×6F×6FÐ6FØ�L‰L×#Ñ# M°3Ô7ß#‘Q¨ˆŒ
Ü—;‘;ˆŒØˆŽr/   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r=   ÚcodecÚfor_encoding)r   rs   )rE   rZ   s   "€r0   rF   ÚHWAccel.__annotate__é   s   ø€ ÷ !
ñ !
©Eð !
Áñ !
r/   c           	     óÒ  € \         P                  pV'       d   V\         P                  ,          pVP                   FW  pVP                  P
                  V,          '       g   K(  V P                  '       d   VP                  V P                  8w  d   KW   M	  \        R V 24      hW@n	        \        P                  pV P                  '       d   V P                  P                  4       pTp\        V P                  4      p\!        \         P"                  ! \        P$                  ! V P                  4      VP                  P                  VVP                  V P&                  4      4       R# )z!No supported hardware config for N)r   r3   r5   Úhardware_configsr>   rp   r‡   rd   ÚNotImplementedErrorrO   r@   r�   r©   r�   r   r�   r   r�   r‘   rŽ   )rT   r®   r¯   Úsupported_methodsrO   r”   r–   r—   s   &&&     r0   Ú_initialize_hw_contextÚHWAccel._initialize_hw_contexté   s	  € ô ),×(SÑ(SÐßØ¤×!LÑ!LÕLÐð ×,Ô,ˆFØ—J‘J×&Ñ&Ð):×:Ô:ÙØ× × Ð  V×%7Ñ%7¸4×;LÑ;LÔ%LÙÙñ -ô &Ð(IÈ%ÈÐ&QÓRÐRàŒÜ"(§+¡+ˆØ�<�<ˆ<ØŸ<™<×.Ñ.Ó0ˆLØ#ˆHÜ *¨4¯<©<Ó 8ˆ	äÜ×&Ò&Ü—’˜tŸx™xÓ(Ø—
‘
×&Ñ&ØØ—‘Ø—
‘
óö	
r/   c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# )r=   r®   r¯   r?   )r   rs   r£   )rE   rZ   s   "€r0   rF   r°     s"   ø€ ÷ ñ ™Eð ±ð Á'ñ r/   c           	     óþ   € V P                   '       d   \        R4      h\        V P                  V P                  V P
                  V P                  V P                  V P                  R7      pVP                  WR7       V# )z>Create a new hardware accelerator context with the given codecz$Hardware context already initialized)rd   r“   rª   r�   rŽ   r§   )r¯   )
r>   rS   r£   r‡   r©   rª   r�   rŽ   r§   rµ   )rT   r®   r¯   Úrets   &&& r0   ÚcreateÚHWAccel.create  si   € à�8�8ˆ8ÜÐEÓFÐFäØ×)Ñ)Ø—<‘<Ø$(×$@Ñ$@Ø—L‘LØ—*‘*Ø×(Ñ(ô
ˆð 	×"Ñ" 5Ð"ÔDØˆ
r/   c                ó–   € V P                   '       d7   \        P                  ! \        P                  ! V P                   4      4       R # R # rH   rœ   rg   s   &r0   rž   ÚHWAccel.__dealloc__  r    r/   )	r©   r‡   rª   rO   r¨   rŽ   r§   r�   r>   )NTNNF)F)r   r   r   r   r¡   rV   rµ   rº   rž   r.   rw   rx   s   @r0   r£   r£   ®   s/   ø‡ € ñô.÷B!
ò !
÷Fò ÷ :ð :r/   r£   ) ÚweakrefÚenumr   r@   Úcython.cimports.libavÚcimportsÚlibavr   Úcython.cimports.av.codec.codecr   Úcython.cimports.av.dictionaryr   Úcython.cimports.av.errorr   Úcython.cimports.av.video.formatr   r	   r2   ÚdeclareÚobjectrM   ÚWeakValueDictionaryrI   ru   rP   ÚfinalÚcclassrD   Úccallr}   r   r£   r
   r/   r0   Ú<module>rÍ      s  ðÛ Ý ã ß #Ð #Ý 0Ý 4Ý .Ý <ô+�7ô +ô$2�Wô 2ð —.’. ©«Ó2€Ø�nŠn˜V W×%@Ò%@Ó%BÓC€ð ‡�ôó ðð ‡�Ø‡�÷!Tð !Tó ó ð!TðH ‡�ñ
ó ð
ð ‡�Ø‡�÷=:ð =:ó ó ð=:ð@ ‡�Ø‡�÷n:ð n:ó ó òn:r/   