Debian Codegraph @

av/subtitles/subtitle.pyi

raw
1 from typing import Iterator, Literal
2
3 class SubtitleSet:
4 format: int
5 start_display_time: int
6 end_display_time: int
7 pts: int
8 rects: tuple[Subtitle, ...]
9
10 @staticmethod
11 def create(
12 text: bytes,
13 start: int,
14 end: int,
15 pts: int = 0,
16 subtitle_format: int = 1,
17 ) -> SubtitleSet: ...
18 def __len__(self) -> int: ...
19 def __iter__(self) -> Iterator[Subtitle]: ...
20 def __getitem__(self, i: int) -> Subtitle: ...
21
22 class Subtitle: ...
23
24 class BitmapSubtitle(Subtitle):
25 type: Literal[b"bitmap"]
26 x: int
27 y: int
28 width: int
29 height: int
30 nb_colors: int
31 planes: tuple[BitmapSubtitlePlane, ...]
32
33 class BitmapSubtitlePlane:
34 subtitle: BitmapSubtitle
35 index: int
36 buffer_size: int
37
38 class AssSubtitle(Subtitle):
39 type: Literal[b"ass", b"text"]
40 @property
41 def ass(self) -> bytes: ...
42 @property
43 def dialogue(self) -> bytes: ...
44 @property
45 def text(self) -> bytes: ...