@@ -2,7 +2,7 @@ from enum import Flag, IntEnum
22from fractions import Fraction
33from pathlib import Path
44from types import TracebackType
5- from typing import Any , Callable , ClassVar , Literal , Type , cast , overload
5+ from typing import Any , Callable , ClassVar , Literal , Type , TypedDict , cast , overload
66
77from av .codec .hwaccel import HWAccel
88from av .format import ContainerFormat
@@ -67,6 +67,13 @@ class AudioCodec(IntEnum):
6767 pcm_u8 = cast (int , ...)
6868 pcm_vidc = cast (int , ...)
6969
70+ class _Chapter (TypedDict ):
71+ id : int
72+ start : int
73+ end : int
74+ time_base : Fraction | None
75+ metadata : dict [str , str ]
76+
7077class Container :
7178 writeable : bool
7279 name : str
@@ -86,7 +93,6 @@ class Container:
8693 open_timeout : Real | None
8794 read_timeout : Real | None
8895 flags : int
89-
9096 def __enter__ (self ) -> Container : ...
9197 def __exit__ (
9298 self ,
@@ -96,6 +102,7 @@ class Container:
96102 ) -> bool : ...
97103 def set_timeout (self , timeout : Real | None ) -> None : ...
98104 def start_timeout (self ) -> None : ...
105+ def chapters (self ) -> list [_Chapter ]: ...
99106
100107@overload
101108def open (
0 commit comments