![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Timecode.h>
Public Member Functions | |
| FTimecode () | |
| FTimecode (int32 InHours, int32 InMinutes, int32 InSeconds, int32 InFrames, bool InbDropFrame) | |
| FTimecode (int32 InHours, int32 InMinutes, int32 InSeconds, int32 InFrames, float InSubframe, bool InbDropFrame) | |
| FTimecode (double InSeconds, const FFrameRate &InFrameRate, bool InbDropFrame, bool InbRollover) | |
| FTimecode (double InSeconds, const FFrameRate &InFrameRate, bool InbRollover) | |
| FFrameNumber | ToFrameNumber (const FFrameRate &InFrameRate) const |
| FTimespan | ToTimespan (const FFrameRate &InFrameRate) const |
| CORE_API FString | ToString (bool bForceSignDisplay=false, bool bDisplaySubframe=false) const |
| bool | IsValid () const |
Public Attributes | |
| int32 | Hours |
| int32 | Minutes |
| int32 | Seconds |
| int32 | Frames |
| float | Subframe = 0 |
| bool | bDropFrameFormat |
Friends | |
| bool | operator== (const FFrameRate &A, const FFrameRate &B) |
| bool | operator!= (const FFrameRate &A, const FFrameRate &B) |
| bool | operator== (const FTimecode &A, const FTimecode &B) |
| bool | operator!= (const FTimecode &A, const FTimecode &B) |
A timecode that stores time in HH:MM:SS format with the remainder of time represented by an integer frame count.
|
inline |
Default construction for UObject purposes
|
inlineexplicit |
User construction from a number of hours minutes seconds and frames.
| InbDropFrame | - If true, this Timecode represents a "Drop Frame Timecode" format which skips the first frames of every minute (except those ending in multiples of 10) to account for drift when using a fractional NTSC framerate. |
|
inlineexplicit |
User construction from a number of hours minutes seconds frames, and subframes.
| InbDropFrame | - If true, this Timecode represents a "Drop Frame Timecode" format which skips the first frames of every minute (except those ending in multiples of 10) to account for drift when using a fractional NTSC framerate. |
|
inlineexplicit |
User construction from a time in seconds
| InbDropFrame | - If true, this Timecode represents a "Drop Frame Timecode" format which skips the first frames of every minute (except those ending in multiples of 10) to account for drift when using a fractional NTSC framerate. |
| InbRollover | - If true, the hours will be the modulo of 24. |
|
inlineexplicit |
User construction from a time in seconds
| InbRollover | - If true, the hours will be the modulo of 24. |
|
inlinestatic |
Create a FTimecode from a specific frame number at the given frame rate.
| InFrameNumber | - The frame number to convert into a timecode. This should already be converted to InFrameRate's resolution. |
| InFrameRate | - The framerate that this timecode is based in. This should be the playback framerate as it is used to determine when the Frame value wraps over. |
|
inlinestatic |
Create a FTimecode from a specific frame number at the given frame rate. Optionally supports creating a drop frame timecode, which drops certain timecode display numbers to help account for NTSC frame rates which are fractional.
| InFrameNumber | - The frame number to convert into a timecode. This should already be converted to InFrameRate's resolution. |
| InFrameRate | - The framerate that this timecode is based in. This should be the playback framerate as it is used to determine when the Frame value wraps over. |
| InbDropFrame | - If true, the returned timecode will drop the first two frames on every minute (except when Minute % 10 == 0) This is only valid for NTSC framerates (29.97, 59.94) and will assert if you try to create a drop-frame format from a non-valid framerate. All framerates can be represented when in non-drop frame format. |
|
inlinestatic |
Create a FTimecode from a specific frame time at the given frame rate.
| InFrameTime | - The frame time to convert into a timecode. This should already be converted to InFrameTimes's resolution. |
| InFrameRate | - The framerate that this timecode is based in. This should be the playback framerate as it is used to determine when the Frame value wraps over. |
| bDropFrame | - Optional parameter to indicate if we are in drop frame format. |
|
inlinestatic |
Create a FTimecode from a timespan at the given frame rate. Optionally supports creating a drop frame timecode, which drops certain timecode display numbers to help account for NTSC frame rates which are fractional.
| InTimespan | - The timespan to convert into a timecode. |
| InFrameRate | - The framerate that this timecode is based in. This should be the playback framerate as it is used to determine when the Frame value wraps over. |
| InbDropFrame | - If true, the returned timecode will drop the first two frames on every minute (except when Minute % 10 == 0) This is only valid for NTSC framerates (29.97, 59.94) and will assert if you try to create a drop-frame format from a non-valid framerate. All framerates can be represented when in non-drop frame format. |
| InbRollover | - If true, the hours will be the modulo of 24. |
|
inlinestatic |
Create a FTimecode from a timespan at the given frame rate.
| InTimespan | - The timespan to convert into a timecode. |
| InFrameRate | - The framerate that this timecode is based in. This should be the playback framerate as it is used to determine when the Frame value wraps over. |
| InbRollover | - If true, the hours will be the modulo of 24. |
Drop frame is only support for frame rate of 29.97 or 59.94.
|
inlinestatic |
Drop frame is only support for frame rate of 29.97 or 59.94.
|
inline |
Will return true if the timecode represents a valid timecode value where
Minutes is +/- [0, 59] Seconds is +/- [0, 59] Frames [INT_MIN, INT_MAX] Subframes >= 0
Returns true if the given frame rate string represents a supported drop frame timecode frame rate, or false otherwise.
Drop frame timecode is only supported for NTSC_30 (29.97 FPS) or NTSC_60 (59.94 FPS) frame rates.
|
static |
Parses a string representation of a timecode.
Supported SMPTE drop frame (DF) and non-drop frame (NDF) formats variations:
The 2 digits per number is not enforced. It is possible to parse high frame numbers (above 60), such as for audio timecodes. Full SMPTE compliance is not ensured by the parser (i.e. greater than 24h, negative time and any number of frames per second).
Sub-frame variation: Supports the sub-frame variation where the frame number is a decimal number: HH:MM:SS:FF.ZZ.
Side effect of supporting sub-frame is that this function can't unambiguously parse partial timecodes.
| InTimecodeString | A string representation of a timecode |
|
inline |
Converts this Timecode back into a Frame Number at the given framerate, taking into account if this is a drop-frame format timecode.
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.
| bForceSignDisplay | - Forces the timecode to be prepended with a positive or negative sign. Standard behavior is to only show the sign when the value is negative. |
| bDisplaySubframe | - If subframe decimal digits are desired. |
|
inline |
Converts this Timecode back into a timespan at the given framerate, taking into account if this is a drop-frame format timecode.
|
inlinestatic |
If the frame rate support drop frame format and the app wish to use drop frame format by default.
|
static |
By default, should we generate a timecode in drop frame format when the frame rate does support it.
|
friend |
|
friend |
| bool FTimecode::bDropFrameFormat |
If true, this Timecode represents a Drop Frame timecode used to account for fractional frame rates in NTSC play rates.
| int32 FTimecode::Frames |
How many frames does this timecode represent
| int32 FTimecode::Hours |
IMPORTANT: If you change the struct data, ensure that you also update the version in NoExportTypes.h
How many hours does this timecode represent
| int32 FTimecode::Minutes |
How many minutes does this timecode represent
| int32 FTimecode::Seconds |
How many seconds does this timecode represent
| float FTimecode::Subframe = 0 |
The subframe value provided when converting to FFrameTime