Files
voice_bridge/venv/lib/python3.12/site-packages/av/subtitles/stream.py
2026-01-09 10:28:44 +11:00

24 lines
631 B
Python

import cython
from cython.cimports.av.packet import Packet
from cython.cimports.av.stream import Stream
@cython.cclass
class SubtitleStream(Stream):
def __getattr__(self, name):
return getattr(self.codec_context, name)
@cython.ccall
def decode(self, packet: Packet | None = None):
"""
Decode a :class:`.Packet` and returns a subtitle object.
:rtype: list[AssSubtitle] | list[BitmapSubtitle]
.. seealso:: This is a passthrough to :meth:`.CodecContext.decode`.
"""
if not packet:
packet = Packet()
return self.codec_context.decode(packet)