Skip to content

RoundingMethod

Bases: Enum

Method used to adjust presentation timestamps (PTS).

Source code in video_timestamps/rounding_method.py
20
21
22
23
24
25
26
27
28
29
30
31
class RoundingMethod(Enum):
    """Method used to adjust presentation timestamps (PTS).
    """
    FLOOR = floor_method
    """Floor"""

    ROUND = round_method
    """Round half up"""

    def __call__(self, number: Fraction) -> int:
        method: RoundingCallType = self.value
        return method(number)

FLOOR = floor_method class-attribute instance-attribute

Floor

ROUND = round_method class-attribute instance-attribute

Round half up