Timing information associated with a given frame.
| 162 | |
| 163 | @dataclass(frozen=True) |
| 164 | class Timecode: |
| 165 | """Timing information associated with a given frame.""" |
| 166 | |
| 167 | pts: int |
| 168 | """Presentation timestamp of the frame in units of `time_base`.""" |
| 169 | time_base: Fraction |
| 170 | """The base unit in which `pts` is measured.""" |
| 171 | |
| 172 | @property |
| 173 | def seconds(self) -> float: |
| 174 | return float(self.time_base * self.pts) |
| 175 | |
| 176 | |
| 177 | @dataclass(frozen=True) |
no outgoing calls