Ardour  9.0-pre0-582-g084a23a80d
Timecode Namespace Reference

Classes

struct  Time
 

Enumerations

enum  Wrap {
  NONE = 0 , FRAMES , SECONDS , MINUTES ,
  HOURS
}
 
enum  TimecodeFormat {
  timecode_23976 , timecode_24 , timecode_24976 , timecode_25 ,
  timecode_2997 , timecode_2997drop , timecode_2997000 , timecode_2997000drop ,
  timecode_30 , timecode_30drop , timecode_5994 , timecode_60
}
 

Functions

Wrap increment (Time &timecode, uint32_t)
 
Wrap decrement (Time &timecode, uint32_t)
 
Wrap increment_subframes (Time &timecode, uint32_t)
 
Wrap decrement_subframes (Time &timecode, uint32_t)
 
Wrap increment_seconds (Time &timecode, uint32_t)
 
Wrap increment_minutes (Time &timecode, uint32_t)
 
Wrap increment_hours (Time &timecode, uint32_t)
 
void frames_floot (Time &timecode)
 
void seconds_floor (Time &timecode)
 
void minutes_floor (Time &timecode)
 
void hours_floor (Time &timecode)
 
double timecode_to_frames_per_second (TimecodeFormat const t)
 
bool timecode_has_drop_frames (TimecodeFormat const t)
 
std::string timecode_format_name (TimecodeFormat const t)
 
std::string timecode_format_time (Timecode::Time const timecode)
 
bool parse_timecode_format (std::string tc, Timecode::Time &TC)
 
std::string timecode_format_sampletime (int64_t sample, double sample_sample_rate, double timecode_frames_per_second, bool timecode_drop_frames)
 
void timecode_to_sample (Timecode::Time const &timecode, int64_t &sample, bool use_offset, bool use_subframes, double sample_sample_rate, uint32_t subframes_per_frame, bool offset_is_negative, int64_t offset_samples)
 
void sample_to_timecode (int64_t sample, Timecode::Time &timecode, bool use_offset, bool use_subframes, double timecode_frames_per_second, bool timecode_drop_frames, double sample_sample_rate, uint32_t subframes_per_frame, bool offset_is_negative, int64_t offset_samples)
 

Enumeration Type Documentation

◆ TimecodeFormat

Enumerator
timecode_23976 
timecode_24 
timecode_24976 
timecode_25 
timecode_2997 
timecode_2997drop 
timecode_2997000 
timecode_2997000drop 
timecode_30 
timecode_30drop 
timecode_5994 
timecode_60 

Definition at line 38 of file time.h.

◆ Wrap

Enumerator
NONE 
FRAMES 
SECONDS 
MINUTES 
HOURS 

Definition at line 30 of file time.h.

Function Documentation

◆ decrement()

Wrap Timecode::decrement ( Time timecode,
uint32_t   
)

◆ decrement_subframes()

Wrap Timecode::decrement_subframes ( Time timecode,
uint32_t   
)

◆ frames_floot()

void Timecode::frames_floot ( Time timecode)

◆ hours_floor()

void Timecode::hours_floor ( Time timecode)

◆ increment()

Wrap Timecode::increment ( Time timecode,
uint32_t   
)

◆ increment_hours()

Wrap Timecode::increment_hours ( Time timecode,
uint32_t   
)

◆ increment_minutes()

Wrap Timecode::increment_minutes ( Time timecode,
uint32_t   
)

◆ increment_seconds()

Wrap Timecode::increment_seconds ( Time timecode,
uint32_t   
)

◆ increment_subframes()

Wrap Timecode::increment_subframes ( Time timecode,
uint32_t   
)

◆ minutes_floor()

void Timecode::minutes_floor ( Time timecode)

◆ parse_timecode_format()

bool Timecode::parse_timecode_format ( std::string  tc,
Timecode::Time TC 
)

◆ sample_to_timecode()

void Timecode::sample_to_timecode ( int64_t  sample,
Timecode::Time timecode,
bool  use_offset,
bool  use_subframes,
double  timecode_frames_per_second,
bool  timecode_drop_frames,
double  sample_sample_rate,
uint32_t  subframes_per_frame,
bool  offset_is_negative,
int64_t  offset_samples 
)

Convert audio sample time (samples per second) to timecode (frames per second)

Parameters
sampleaudio sample time to convert
timecoderesulting Timecode
use_offsetapply offset as given by offset_is_negative and offset_samples
use_subframesuse subframes_per_frame when converting
timecode_frames_per_secondtarget framerate
timecode_drop_framestrue if fps uses drop-frame-counting. only valid for 29.97 = 30000/1001 fps
sample_sample_ratesource sample-rate, may include pull up/down
subframes_per_framesub-frames per frame – must not be 0 if use_subframes == true
offset_is_negativetrue if offset_samples is to be subtracted
offset_samplessample offset to add or subtract

◆ seconds_floor()

void Timecode::seconds_floor ( Time timecode)

◆ timecode_format_name()

std::string Timecode::timecode_format_name ( TimecodeFormat const  t)

◆ timecode_format_sampletime()

std::string Timecode::timecode_format_sampletime ( int64_t  sample,
double  sample_sample_rate,
double  timecode_frames_per_second,
bool  timecode_drop_frames 
)

◆ timecode_format_time()

std::string Timecode::timecode_format_time ( Timecode::Time const  timecode)

◆ timecode_has_drop_frames()

bool Timecode::timecode_has_drop_frames ( TimecodeFormat const  t)

◆ timecode_to_frames_per_second()

double Timecode::timecode_to_frames_per_second ( TimecodeFormat const  t)

◆ timecode_to_sample()

void Timecode::timecode_to_sample ( Timecode::Time const &  timecode,
int64_t &  sample,
bool  use_offset,
bool  use_subframes,
double  sample_sample_rate,
uint32_t  subframes_per_frame,
bool  offset_is_negative,
int64_t  offset_samples 
)

Convert timecode (frames per second) to audio sample time (samples per second)

Parameters
timecodeTimecode to convert (also includes frame-rate)
samplereturned corresponding audio sample time
use_offsetapply offset as given by offset_is_negative and offset_samples
use_subframesuse subframes_per_frame when converting
sample_sample_ratetarget sample-rate, may include pull up/down
subframes_per_framesub-frames per frame – must not be 0 if use_subframes == true
offset_is_negativetrue if offset_samples is to be subtracted
offset_samplessample offset to add or subtract