mp.Timestamp

A class which represents a timestamp in the MediaPipe framework.

MediaPipe timestamps are in units of microseconds. There are several special values (All these values must be constructed using the static methods provided): UNSET: The default initialization value, not generally valid when a timestamp is required. UNSTARTED: The timestamp before any valid timestamps. This is the input timestamp during Calcultor::Open(). PRESTREAM: A value for specifying that a packet contains "header" data that should be processed before any other timestamp. Like poststream, if this value is sent then it must be the only value that is sent on the stream. MIN: The minimum range timestamp to see in Calcultor::Process(). Any number of "range" timestamp can be sent over a stream, provided that they are sent in monotonically increasing order. MAX: The maximum range timestamp to see in Process(). POSTSTREAM: A value for specifying that a packet pertains to the entire stream. This "summary" timestamp occurs after all the "range" timestamps. If this timestamp is sent on a stream, it must be the only packet sent. DONE: The timestamp after all valid timestamps. This is the input timestamp during Calcultor::Close().

value

Methods

from_seconds

from_seconds(arg0: float) -> mediapipe.python._framework_bindings.timestamp.Timestamp

Create a timestamp from a seconds value

Args: seconds: A seconds value in float.

Returns: A MediaPipe Timestamp object.

Examples: timestamp_now = mp.Timestamp.from_seconds(time.time())

is_allowed_in_stream