Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FTimecode Struct Reference

#include <Timecode.h>

Public Member Functions

 FTimecode ()
 
 FTimecode (int32 InHours, int32 InMinutes, int32 InSeconds, int32 InFrames, 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
 
FString ToString (bool bForceSignDisplay=false) const
 

Static Public Member Functions

static FTimecode FromFrameNumber (const FFrameNumber &InFrameNumber, const FFrameRate &InFrameRate, bool InbDropFrame)
 
static FTimecode FromFrameNumber (const FFrameNumber &InFrameNumber, const FFrameRate &InFrameRate)
 
static FTimecode FromTimespan (const FTimespan &InTimespan, const FFrameRate &InFrameRate, bool InbDropFrame, bool InbRollover)
 
static FTimecode FromTimespan (const FTimespan &InTimespan, const FFrameRate &InFrameRate, bool InbRollover)
 
static bool IsDropFormatTimecodeSupported (const FFrameRate &InFrameRate)
 
static bool UseDropFormatTimecode (const FFrameRate &InFrameRate)
 
static bool UseDropFormatTimecodeByDefaultWhenSupported ()
 
static bool IsValidDropFormatTimecodeRate (const FString &InRateString)
 

Public Attributes

int32 Hours
 
int32 Minutes
 
int32 Seconds
 
int32 Frames
 
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)
 

Detailed Description

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

Definition at line 17 of file Timecode.h.

Constructor & Destructor Documentation

◆ FTimecode() [1/4]

FTimecode::FTimecode ( )
inline

Default construction for UObject purposes

Definition at line 22 of file Timecode.h.

+ Here is the caller graph for this function:

◆ FTimecode() [2/4]

FTimecode::FTimecode ( int32 InHours,
int32 InMinutes,
int32 InSeconds,
int32 InFrames,
bool InbDropFrame )
inlineexplicit

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

Parameters
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.

Definition at line 36 of file Timecode.h.

+ Here is the caller graph for this function:

◆ FTimecode() [3/4]

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

User construction from a time in seconds

Parameters
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.
Note
Be aware that the Cycles may not correspond to the System Time. See FDateTime and "leap seconds".

Definition at line 52 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FTimecode() [4/4]

FTimecode::FTimecode ( double InSeconds,
const FFrameRate & InFrameRate,
bool InbRollover )
inlineexplicit

User construction from a time in seconds

Parameters
InbRollover- If true, the hours will be the modulo of 24.
Note
Be aware that the Cycles may not correspond to the System Time. See FDateTime and "leap seconds".

Definition at line 72 of file Timecode.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ FromFrameNumber() [1/2]

static FTimecode FTimecode::FromFrameNumber ( const FFrameNumber & InFrameNumber,
const FFrameRate & InFrameRate )
inlinestatic

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

Parameters
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.

Definition at line 225 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromFrameNumber() [2/2]

static FTimecode FTimecode::FromFrameNumber ( const FFrameNumber & InFrameNumber,
const FFrameRate & InFrameRate,
bool InbDropFrame )
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.

Parameters
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.

Definition at line 140 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromTimespan() [1/2]

static FTimecode FTimecode::FromTimespan ( const FTimespan & InTimespan,
const FFrameRate & InFrameRate,
bool InbDropFrame,
bool InbRollover )
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.

Parameters
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.

Definition at line 252 of file Timecode.h.

+ Here is the call graph for this function:

◆ FromTimespan() [2/2]

static FTimecode FTimecode::FromTimespan ( const FTimespan & InTimespan,
const FFrameRate & InFrameRate,
bool InbRollover )
inlinestatic

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

Parameters
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.

Definition at line 265 of file Timecode.h.

+ Here is the call graph for this function:

◆ IsDropFormatTimecodeSupported()

static bool FTimecode::IsDropFormatTimecodeSupported ( const FFrameRate & InFrameRate)
inlinestatic

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

Definition at line 271 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValidDropFormatTimecodeRate()

static bool FTimecode::IsValidDropFormatTimecodeRate ( const FString & InRateString)
inlinestatic

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.

Definition at line 293 of file Timecode.h.

+ Here is the call graph for this function:

◆ ToFrameNumber()

FFrameNumber FTimecode::ToFrameNumber ( const FFrameRate & InFrameRate) const
inline

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

Definition at line 87 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToString()

FString FTimecode::ToString ( bool bForceSignDisplay = false) const
inline

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.

Parameters
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.

Definition at line 306 of file Timecode.h.

◆ ToTimespan()

FTimespan FTimecode::ToTimespan ( const FFrameRate & InFrameRate) const
inline

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

Definition at line 233 of file Timecode.h.

+ Here is the call graph for this function:

◆ UseDropFormatTimecode()

static bool FTimecode::UseDropFormatTimecode ( const FFrameRate & InFrameRate)
inlinestatic

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

Definition at line 280 of file Timecode.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UseDropFormatTimecodeByDefaultWhenSupported()

static bool FTimecode::UseDropFormatTimecodeByDefaultWhenSupported ( )
static

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

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!= [1/2]

bool operator!= ( const FFrameRate & A,
const FFrameRate & B )
friend

◆ operator!= [2/2]

bool operator!= ( const FTimecode & A,
const FTimecode & B )
friend

Definition at line 355 of file Timecode.h.

◆ operator== [1/2]

bool operator== ( const FFrameRate & A,
const FFrameRate & B )
friend

◆ operator== [2/2]

bool operator== ( const FTimecode & A,
const FTimecode & B )
friend

Definition at line 350 of file Timecode.h.

Member Data Documentation

◆ bDropFrameFormat

bool FTimecode::bDropFrameFormat

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

Definition at line 347 of file Timecode.h.

◆ Frames

int32 FTimecode::Frames

How many frames does this timecode represent

Definition at line 344 of file Timecode.h.

◆ Hours

int32 FTimecode::Hours

How many hours does this timecode represent

Definition at line 335 of file Timecode.h.

◆ Minutes

int32 FTimecode::Minutes

How many minutes does this timecode represent

Definition at line 338 of file Timecode.h.

◆ Seconds

int32 FTimecode::Seconds

How many seconds does this timecode represent

Definition at line 341 of file Timecode.h.


The documentation for this struct was generated from the following file: