(self, timecode: FrameTimecode, above_threshold: bool)
| 158 | return self._filter_length <= 0 |
| 159 | |
| 160 | def filter(self, timecode: FrameTimecode, above_threshold: bool) -> list[FrameTimecode]: |
| 161 | if self._is_disabled: |
| 162 | return [timecode] if above_threshold else [] |
| 163 | if self._last_above is None: |
| 164 | self._last_above = timecode |
| 165 | if self._mode == FlashFilter.Mode.MERGE: |
| 166 | return self._filter_merge(timecode=timecode, above_threshold=above_threshold) |
| 167 | elif self._mode == FlashFilter.Mode.SUPPRESS: |
| 168 | return self._filter_suppress(timecode=timecode, above_threshold=above_threshold) |
| 169 | raise RuntimeError("Unhandled FlashFilter mode.") |
| 170 | |
| 171 | def _filter_suppress( |
| 172 | self, timecode: FrameTimecode, above_threshold: bool |
no test coverage detected