Return the requested statistics/metrics for a given timecode. Returns: A list containing the requested frame metrics for the given frame number, ordered as they are in `metric_keys`.
(
self, timecode: int | FrameTimecode, metric_keys: ty.Iterable[str]
)
| 124 | # TODO(https://scenedetect.com/issues/507): We should support the dictionary protocol instead |
| 125 | # of using this bespoke interface. It would be useful for Pandas compatibility as well. |
| 126 | def get_metrics( |
| 127 | self, timecode: int | FrameTimecode, metric_keys: ty.Iterable[str] |
| 128 | ) -> list[ty.Any]: |
| 129 | """Return the requested statistics/metrics for a given timecode. |
| 130 | |
| 131 | Returns: |
| 132 | A list containing the requested frame metrics for the given frame number, ordered as |
| 133 | they are in `metric_keys`. |
| 134 | """ |
| 135 | return [self._get_metric(timecode, metric_key) for metric_key in metric_keys] |
| 136 | |
| 137 | def set_metrics(self, timecode: int | FrameTimecode, metric_kv_dict: dict[str, ty.Any]) -> None: |
| 138 | """Set Metrics: Sets the provided statistics/metrics for a given frame. |