Lumiera  0.pre.03
»edit your freedom«
SmpteTC Class Reference

#include "lib/time/timecode.hpp"

Description

Classical Timecode value reminiscent to SMPTE format.

After quantisation, the resulting (materialised) time value is decimated into a hours, a minutes, a seconds part and the remainder is cast into a frame number relative to the seconds. Consequently, a SmpteTC representation is always linked implicitly to a specific framerate.

range extensions
Historically, SMPTE timecode format was focused mainly on how to encode a unique timestamp in a way allowing to 'piggyback' these timestamps into an existing (analogue) media data format. As a side effect, quite tight limits had to be imposed on the possible component values in such a fixed-length format. This whole concern is completely beyond the scope of a typical computer based video implementation; thus we can consider ways to extend the value range to be represented in this SMPTE-like timecode format:
  • we can allow time values below the zero point
  • we can allow time values beyond 24 hours. Several different schemes how to do this extensions could be devised (and in addition, we could also wrap around the hours field, jumping from 23:59:59:## to 0:0:0:0). Currently, we implement an extension, where the timecode representation is symmetrical to the zero point and the hours field is just extended beyond 23 hours. To give an example: 0:0:0:0 minus 1 frame yields -0:0:0:1
Todo:
the range extension scheme could be a configurable strategy

Definition at line 150 of file timecode.hpp.

Public Types

typedef format::Smpte Format
 

Public Member Functions

 SmpteTC (QuTime const &quantisedTime)
 
 SmpteTC (SmpteTC const &)
 
void clear ()
 
uint getFps () const
 
void invertOrientation ()
 flip the orientation of min, sec, and frames. More...
 
SmpteTCoperator++ ()
 
SmpteTCoperator-- ()
 
SmpteTCoperator= (SmpteTC const &)
 
void rebuild ()
 
- Public Member Functions inherited from TCode
string describe () const
 
Time getTime () const
 
 operator string () const
 

Public Attributes

SexaDigit frames
 
HourDigit hours
 
SexaDigit mins
 
SexaDigit secs
 
Signum sgn
 

Private Member Functions

virtual string show () const
 
virtual Literal tcID () const
 
virtual TimeValue value () const
 

Private Attributes

uint effectiveFramerate_
 

Additional Inherited Members

- Protected Member Functions inherited from TCode
 TCode (PQuant const &quant)
 
- Protected Attributes inherited from TCode
PQuant quantiser_
 

Member Function Documentation

◆ invertOrientation()

void invertOrientation ( )

flip the orientation of min, sec, and frames.

Besides changing the sign, this will flip the meaning of the component fields, which by definition are always oriented towards zero.

Normalised value fields are defined positive, with automatic overflow to next higher field. This might cause the hours to become negative. When invoked in this case, the meaning changes from -h + (m+s+f) to -(h+m+s+f)

Definition at line 398 of file timecode.cpp.

Referenced by Smpte::applyRangeLimitStrategy().

+ Here is the caller graph for this function:
+ Inheritance diagram for SmpteTC:
+ Collaboration diagram for SmpteTC:

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