Describe the bug
In the code example here:
https://github.com/bbc/tams/#flow-and-media-timelines
For the "timerange/ts_offset approach" pseudo-code it says:
object_ts = to_timestamp(ts) # `4:0` for `ts = 4.0sec`
offset_object_ts = object_ts + ts_offset # `4:0 + -0:700000000 = 3:300000000` (in Flow timeline)
if (offset_object_ts < timerange.start or
offset_object_ts >= timerange.end): # `3:300000000 is less than 3:500000000`
discard_grain() # So this grain is discarded
else:
keep_grain() # The first grain to be retained will have `object_ts = 4.2`
# (and `offset_object_ts = 3:500000000 or 3.5sec)`
This doesn't match the diagram above in which object Y05 has a tr_offset of -0.8
Expected behavior
To match the diagram the pseudo-code should say:
`object_ts = to_timestamp(ts) # `4:0` for `ts = 4.0sec`
offset_object_ts = object_ts + ts_offset # `4:0 + -0:800000000 = 3:200000000` (in Flow timeline)
if (offset_object_ts < timerange.start or
offset_object_ts >= timerange.end): # `3:200000000 is less than 3:500000000`
discard_grain() # So this grain is discarded
else:
keep_grain() # The first grain to be retained will have `object_ts = 4.3`
# (and `offset_object_ts = 3:500000000 or 3.5sec)`
Describe the bug
In the code example here:
https://github.com/bbc/tams/#flow-and-media-timelines
For the "timerange/ts_offset approach" pseudo-code it says:
This doesn't match the diagram above in which object Y05 has a tr_offset of -0.8
Expected behavior
To match the diagram the pseudo-code should say: