FTimecode

A timecode that stores time in HH:MM:SS format with the remainder of time represented by an integer frame count.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/Timecode.h

Include

#include "Misc/Timecode.h"

Syntax

struct FTimecode

Remarks

A timecode that stores time in HH:MM:SS format with the remainder of time represented by an integer frame count.

Variables

Name Description

Public variable

bool

 

bDropFrameFormat

If true, this Timecode represents a Drop Frame timecode used to account for fractional frame rates in NTSC play rates.

Public variable

int32

 

Frames

How many frames does this timecode represent

Public variable

int32

 

Hours

How many hours does this timecode represent

Public variable

int32

 

Minutes

How many minutes does this timecode represent

Public variable

int32

 

Seconds

How many seconds does this timecode represent

Constructors

Name Description

Public function

FTimecode()

Default construction for UObject purposes

Public function

FTimecode

(
    double InSeconds,
    const FFrameRate& InFrameRate,
    bool InbRollover
)

User construction from a time in seconds

Public function

FTimecode

(
    double InSeconds,
    const FFrameRate& InFrameRate,
    bool InbDropFrame,
    bool InbRollover
)

User construction from a time in seconds

Public function

FTimecode

(
    int32 InHours,
    int32 InMinutes,
    int32 InSeconds,
    int32 InFrames,
    bool InbDropFrame
)

User construction from a number of hours minutes seconds and frames.

Functions

Name Description

Public function Static

FTimecode

 

FromFrameNumber

(
    const FFrameNumber& InFrameNumber,
    const FFrameRate& InFrameRate
)

Create a FTimecode from a specific frame number at the given frame rate.

Public function Static

FTimecode

 

FromFrameNumber

(
    const FFrameNumber& InFrameNumber,
    const FFrameRate& InFrameRate,
    bool InbDropFrame
)

Create a FTimecode from a specific frame number at the given frame rate.

Public function Static

FTimecode

 

FromTimespan

(
    const FTimespan& InTimespan,
    const FFrameRate& InFrameRate,
    bool InbRollover
)

Create a FTimecode from a timespan at the given frame rate.

Public function Static

FTimecode

 

FromTimespan

(
    const FTimespan& InTimespan,
    const FFrameRate& InFrameRate,
    bool InbDropFrame,
    bool InbRollover
)

Create a FTimecode from a timespan at the given frame rate.

Public function Static

bool

 

IsDropFormatTimecodeSupported

(
    const FFrameRate& InFrameRate
)

Drop frame is only support for frame rate of 29.97 or 59.94.

Public function Const

FFrameNumber

 

ToFrameNumber

(
    const FFrameRate& InFrameRate
)

Converts this Timecode back into a Frame Number at the given framerate, taking into account if this is a drop-frame format timecode.

Public function Const

FString

 

ToString

(
    bool bForceSignDisplay
)

Get the Qualified Timecode formatted in HH:MM:SS:FF or HH;MM;SS;FF depending on if this represents drop-frame timecode or not.

Public function Const

FTimespan

 

ToTimespan

(
    const FFrameRate& InFrameRate
)

Converts this Timecode back into a timespan at the given framerate, taking into account if this is a drop-frame format timecode.

Public function Static

bool

 

UseDropFormatTimecode

(
    const FFrameRate& InFrameRate
)

If the frame rate support drop frame format and the app wish to use drop frame format by default.

Public function Static

bool

 

UseDropFormatTimecodeByDefaultWhenSupported()

By default, should we generate a timecode in drop frame format when the frame rate does support it.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss