Navigation
API > API/Runtime > API/Runtime/Core
A timecode that stores time in HH:MM:SS format with the remainder of time represented by an integer frame count.
| Name | FTimecode |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/Timecode.h |
| Include Path | #include "Misc/Timecode.h" |
Syntax
struct FTimecode
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTimecode
(
int32 InHours, |
User construction from a number of hours minutes seconds frames, and subframes. | Misc/Timecode.h | |
FTimecode
(
int32 InHours, |
User construction from a number of hours minutes seconds and frames. | Misc/Timecode.h | |
FTimecode
(
double InSeconds, |
User construction from a time in seconds | Misc/Timecode.h | |
FTimecode
(
double InSeconds, |
User construction from a time in seconds | Misc/Timecode.h | |
FTimecode () |
Default construction for UObject purposes | Misc/Timecode.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDropFrameFormat | bool | If true, this Timecode represents a Drop Frame timecode used to account for fractional frame rates in NTSC play rates. | Misc/Timecode.h | |
| Frames | int32 | How many frames does this timecode represent | Misc/Timecode.h | |
| Hours | int32 | IMPORTANT: If you change the struct data, ensure that you also update the version in NoExportTypes.h | Misc/Timecode.h | |
| Minutes | int32 | How many minutes does this timecode represent | Misc/Timecode.h | |
| Seconds | int32 | How many seconds does this timecode represent | Misc/Timecode.h | |
| Subframe | float | The subframe value provided when converting to FFrameTime | Misc/Timecode.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsValid () |
Will return true if the timecode represents a valid timecode value where | Misc/Timecode.h | |
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. | Misc/Timecode.h | |
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. | Misc/Timecode.h | |
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. | Misc/Timecode.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTimecode FromFrameNumber
(
const FFrameNumber& InFrameNumber, |
Create a FTimecode from a specific frame number at the given frame rate. | Misc/Timecode.h | |
static FTimecode FromFrameNumber
(
const FFrameNumber& InFrameNumber, |
Create a FTimecode from a specific frame number at the given frame rate. | Misc/Timecode.h | |
static FTimecode FromFrameTime
(
const FFrameTime& InFrameTime, |
Create a FTimecode from a specific frame time at the given frame rate. | Misc/Timecode.h | |
static FTimecode FromTimespan
(
const FTimespan& InTimespan, |
Create a FTimecode from a timespan at the given frame rate. | Misc/Timecode.h | |
static FTimecode FromTimespan
(
const FTimespan& InTimespan, |
Create a FTimecode from a timespan at the given frame rate. | Misc/Timecode.h | |
static bool IsDropFormatTimecodeSupported
(
const FFrameRate& InFrameRate |
Drop frame is only support for frame rate of 29.97 or 59.94. | Misc/Timecode.h | |
static bool IsDropFormatTimecodeSupported
(
const double InRate |
Drop frame is only support for frame rate of 29.97 or 59.94. | Misc/Timecode.h | |
static bool IsValidDropFormatTimecodeRate
(
const FString& InRateString |
Returns true if the given frame rate string represents a supported drop frame timecode frame rate, or false otherwise. | Misc/Timecode.h | |
static TOptional< FTimecode > ParseTimecode
(
const FStringView InTimecodeString |
Parses a string representation of a timecode. | Misc/Timecode.h | |
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. | Misc/Timecode.h | |
static bool UseDropFormatTimecodeByDefaultWhenSupported() |
By default, should we generate a timecode in drop frame format when the frame rate does support it. | Misc/Timecode.h |