Gjsify LogoGjsify Logo

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.

record

Hierarchy

  • VideoTimeCode

Index

Constructors

  • field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • latest_daily_jam: GLib.DateTime

      The latest daily jam of the #GstVideoTimeCode

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • hours: number

      the hours field of #GstVideoTimeCode

    • minutes: number

      the minutes field of #GstVideoTimeCode

    • seconds: number

      the seconds field of #GstVideoTimeCode

    • frames: number

      the frames field of #GstVideoTimeCode

    • field_count: number

      Interlaced video field count

    Returns VideoTimeCode

Properties

the corresponding #GstVideoTimeCodeConfig

field
field_count: number

Interlaced video field count

field
frames: number

the frames field of #GstVideoTimeCode

field
hours: number

the hours field of #GstVideoTimeCode

field
minutes: number

the minutes field of #GstVideoTimeCode

field
seconds: number

the seconds field of #GstVideoTimeCode

field
name: string

Methods

  • add_frames(frames: number): void
  • 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 #GstVideoTimeCodeInterval 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

  • clear(): void
  • 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

  • frames_since_daily_jam(): number
  • free(): void
  • increment_frame(): void
  • init(fps_n: number, fps_d: number, latest_daily_jam: GLib.DateTime, flags: VideoTimeCodeFlags, hours: number, minutes: number, seconds: number, frames: number, field_count: number): void
  • field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

    Initializes tc with the given values. The values are not checked for being in a valid range. To see if your timecode actually has valid content, use gst_video_time_code_is_valid().

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • latest_daily_jam: GLib.DateTime

      The latest daily jam of the #GstVideoTimeCode

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • hours: number

      the hours field of #GstVideoTimeCode

    • minutes: number

      the minutes field of #GstVideoTimeCode

    • seconds: number

      the seconds field of #GstVideoTimeCode

    • frames: number

      the frames field of #GstVideoTimeCode

    • field_count: number

      Interlaced video field count

    Returns void

  • The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

    Will assert on invalid parameters, use gst_video_time_code_init_from_date_time_full() for being able to handle invalid parameters.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • dt: GLib.DateTime

      #GDateTime to convert

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • field_count: number

      Interlaced video field count

    Returns void

  • The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • dt: GLib.DateTime

      #GDateTime to convert

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • field_count: number

      Interlaced video field count

    Returns boolean

  • is_valid(): boolean
  • nsec_since_daily_jam(): number
  • to_string(): string
  • field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • latest_daily_jam: GLib.DateTime

      The latest daily jam of the #GstVideoTimeCode

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • hours: number

      the hours field of #GstVideoTimeCode

    • minutes: number

      the minutes field of #GstVideoTimeCode

    • seconds: number

      the seconds field of #GstVideoTimeCode

    • frames: number

      the frames field of #GstVideoTimeCode

    • field_count: number

      Interlaced video field count

    Returns VideoTimeCode

  • The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

    This might return a completely invalid timecode, use gst_video_time_code_new_from_date_time_full() to ensure that you would get %NULL instead in that case.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • dt: GLib.DateTime

      #GDateTime to convert

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • field_count: number

      Interlaced video field count

    Returns VideoTimeCode

  • The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

    Parameters

    • fps_n: number

      Numerator of the frame rate

    • fps_d: number

      Denominator of the frame rate

    • dt: GLib.DateTime

      #GDateTime to convert

    • flags: VideoTimeCodeFlags

      #GstVideoTimeCodeFlags

    • field_count: number

      Interlaced video field count

    Returns VideoTimeCode

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method