add_interval


Description:

[ Version ( since = "1.12" ) ]
public TimeCode? add_interval (TimeCodeInterval tc_inter)

This makes a component-wise addition of tc_inter to this.

For example, adding ("01:02:03:04", "00:01:00:00") will return "01:03:03:04". When it comes to drop-frame timecodes, adding ( "00:00:00;00", "00:01:00:00") will return "00:01:00;02" because of drop-frame oddities. However, adding ("00:09:00;02", "00:01:00:00") will return "00:10:00;00" because this time we can have an exact minute.

Parameters:

this

The TimeCode where the diff should be added. This must contain valid timecode values.

tc_inter

The TimeCodeInterval to add to this. The interval must contain valid values, except that for drop-frame timecode, it may also contain timecodes which would normally be dropped. These are then corrected to the next reasonable timecode.

Returns:

A new TimeCode with tc_inter added or null if the interval can't be added.