Open Reality Reference Guide
FBTimeCode Class Reference

TimeCode data structure. More...

#include <fbtime.h>

Public Member Functions

 FBTimeCode (float pRate=FRAMES_30)
 Constructor. More...
 
void SetTimeCode (int pHour, int pMinute=0, int pSecond=0, float pFrame=0)
 Set timecode. More...
 
FBString GetTimeCodeString (FBTime::ETimeFormats pFormat=FBTime::eDefaultFormat)
 Get time as a string. More...
 
void SetTimeCodeString (const char *pTime, FBTime::ETimeFormats pFormat=FBTime::eDefaultFormat)
 Set time from string. More...
 
FBTime GetTime () const
 Return a Time corresponding to the timecode. More...
 
void SetTime (FBTime pTime)
 Set TimeCode according to the given time. More...
 
double GetFrame () const
 Return a frame number corresponding to the timecode. More...
 
void SetFrame (double pFrame)
 Set Frame according to the given time. More...
 
float GetFrameRate () const
 Return the rate of the timecode. More...
 
double GetRawSecond () const
 Get the raw value for the second. More...
 
double GetRawFrame () const
 Get the raw value for the frame. More...
 
double GetRawRate () const
 Get the raw value for the rate. More...
 
bool operator== (const FBTimeCode &pTimeCode) const
 Equality operator. More...
 
bool operator!= (const FBTimeCode &pTimeCode) const
 Inequality operator. More...
 

Static Public Attributes

static const float NTSC_DROP
 Rates. More...
 
static const float NTSC_FULL
 -29.97f More...
 
static const float PAL_25
 -25.0f More...
 
static const float MPAL_30
 -29.971f Currently not supported : "1" is added just to differentiate from NTSC_FULL(-29.97f) More...
 
static const float FILM_24
 -24.0f More...
 
static const float FILM_23976
 -23.976f More...
 
static const float FRAMES_30
 -30.0f More...
 
static const float FRAMES_5994
 -59.94f More...
 
static const float FRAMES_11988
 -119.88f More...
 

Detailed Description

TimeCode data structure.

Definition at line 281 of file fbtime.h.

Constructor & Destructor Documentation

◆ FBTimeCode()

FBTimeCode ( float  pRate = FRAMES_30)

Constructor.

Parameters
pRateFramerate value.

Member Function Documentation

◆ GetFrame()

double GetFrame ( ) const

Return a frame number corresponding to the timecode.

◆ GetFrameRate()

float GetFrameRate ( ) const

Return the rate of the timecode.

◆ GetRawFrame()

double GetRawFrame ( ) const

Get the raw value for the frame.

Returns
raw value for the frame.

◆ GetRawRate()

double GetRawRate ( ) const

Get the raw value for the rate.

Returns
raw value for the rate.

◆ GetRawSecond()

double GetRawSecond ( ) const

Get the raw value for the second.

Returns
raw value for the second.

◆ GetTime()

FBTime GetTime ( ) const

Return a Time corresponding to the timecode.

◆ GetTimeCodeString()

FBString GetTimeCodeString ( FBTime::ETimeFormats  pFormat = FBTime::eDefaultFormat)

Get time as a string.

Parameters
pFormatFormat to use for the returned string(default=FBTime::eDefaultFormat).
Returns
String value of time.

◆ operator!=()

bool operator!= ( const FBTimeCode pTimeCode) const

Inequality operator.

Parameters
pTimeCodetime code to compare with.
Returns
true if time codes are not equal.

◆ operator==()

bool operator== ( const FBTimeCode pTimeCode) const

Equality operator.

Parameters
pTimeCodetime code to compare with.
Returns
true if time codes are equal.

◆ SetFrame()

void SetFrame ( double  pFrame)

Set Frame according to the given time.

Parameters
pFrameFrame value to set.

◆ SetTime()

void SetTime ( FBTime  pTime)

Set TimeCode according to the given time.

Parameters
pTimeTime value to set.

◆ SetTimeCode()

void SetTimeCode ( int  pHour,
int  pMinute = 0,
int  pSecond = 0,
float  pFrame = 0 
)

Set timecode.

Parameters
pHourHour value.
pMinuteMinute value.
pSecondSecond value.
pFrameFrame value.

◆ SetTimeCodeString()

void SetTimeCodeString ( const char *  pTime,
FBTime::ETimeFormats  pFormat = FBTime::eDefaultFormat 
)

Set time from string.

Parameters
pTimeString to set time from.
pFormatFormat to use for the string(default=FBTime::eDefaultFormat).

Member Data Documentation

◆ FILM_23976

const float FILM_23976
static

-23.976f

Definition at line 370 of file fbtime.h.

◆ FILM_24

const float FILM_24
static

-24.0f

Definition at line 369 of file fbtime.h.

◆ FRAMES_11988

const float FRAMES_11988
static

-119.88f

Definition at line 373 of file fbtime.h.

◆ FRAMES_30

const float FRAMES_30
static

-30.0f

Definition at line 371 of file fbtime.h.

◆ FRAMES_5994

const float FRAMES_5994
static

-59.94f

Definition at line 372 of file fbtime.h.

◆ MPAL_30

const float MPAL_30
static

-29.971f Currently not supported : "1" is added just to differentiate from NTSC_FULL(-29.97f)

Definition at line 368 of file fbtime.h.

◆ NTSC_DROP

const float NTSC_DROP
static

Rates.

29.97f

Definition at line 365 of file fbtime.h.

◆ NTSC_FULL

const float NTSC_FULL
static

-29.97f

Definition at line 366 of file fbtime.h.

◆ PAL_25

const float PAL_25
static

-25.0f

Definition at line 367 of file fbtime.h.


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