Skip to main content

parse_smpte_string

Function parse_smpte_string 

Source
pub fn parse_smpte_string(
    s: &str,
    rate: FrameRate,
) -> Result<Timecode, TimecodeError>
Expand description

Parses a SMPTE timecode string like “01:02:03:04” or “01:02:03;04”.

The separator between seconds and frames determines drop-frame vs non-drop:

  • : for non-drop frame
  • ; for drop frame

§Errors

Returns an error if the string format is invalid.