Class (GI Struct)

GstVideo-1.0GstVideoVideoTimeCodeSince 1.10

field_count must be 0 for progressive video and 1 or 2 for interlaced.

A representation of a SMPTE time code.

hours must be positive and less than 24. Will wrap around otherwise. minutes and seconds must be positive and less than 60. frames must be less than or equal to config.fps_n / config.fps_d These values are NOT automatically normalized.

1.10

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<
          {
              config: VideoTimeCodeConfig;
              field_count: number;
              frames: number;
              hours: number;
              minutes: number;
              seconds: number;
          },
      >

    Returns VideoTimeCode

Properties

field_count: number
frames: number
hours: number
minutes: number
seconds: number

Methods

  • Adds or subtracts frames amount of frames to tc. tc needs to contain valid data, as verified by gst_video_time_code_is_valid().

    Parameters

    • frames: number

      How many frames to add or subtract

    Returns void

  • This makes a component-wise addition of tc_inter to tc. For example, adding ("01:02:03:04", "00:01:00:00") will return "01:03:03:04". When it comes to drop-frame timecodes, adding ("00:00:00;00", "00:01:00:00") will return "00:01:00;02" because of drop-frame oddities. However, adding ("00:09:00;02", "00:01:00:00") will return "00:10:00;00" because this time we can have an exact minute.

    Parameters

    • tc_inter: VideoTimeCodeInterval

      The GstVideo.VideoTimeCodeInterval to add to tc. The interval must contain valid values, except that for drop-frame timecode, it may also contain timecodes which would normally be dropped. These are then corrected to the next reasonable timecode.

    Returns VideoTimeCode

    A new GstVideo.VideoTimeCode with tc_inter added or null if the interval can't be added.

  • Compares tc1 and tc2. If both have latest daily jam information, it is taken into account. Otherwise, it is assumed that the daily jam of both tc1 and tc2 was at the same time. Both time codes must be valid.

    Parameters

    Returns number

    1 if tc1 is after tc2, -1 if tc1 is before tc2, 0 otherwise.

  • Returns boolean

    whether tc is a valid timecode (supported frame rate, hours/minutes/seconds/frames not overflowing)

  • Returns string

    the SMPTE ST 2059-1:2015 string representation of tc. That will take the form hh:mm:ss:ff. The last separator (between seconds and frames) may vary: ';' for drop-frame, non-interlaced content and for drop-frame interlaced field 2 ',' for drop-frame interlaced field 1 ':' for non-drop-frame, non-interlaced content and for non-drop-frame interlaced field 2 '.' for non-drop-frame interlaced field 1