Matroska-Org / libmatroska

a C++ libary to parse Matroska files (.mkv and .mka)
GNU Lesser General Public License v2.1
320 stars 57 forks source link

allow reading the stored/raw timestamp value of a Block #52

Closed robUx4 closed 3 years ago

robUx4 commented 3 years ago

Given the API to get the GlobalTimecode of a Block doesn't handle the floating point value of the TrackTimestampScale (attaching a parent track is not common and even though the value is not directly available unlike a fractional timestampscale), it allows external code to compute the proper timestamp when TrackTimestampScale is not 1.0.

Ultimately the whole way of computing the GlobalTimecode of a block should change but that's probably for a v2.0

robUx4 commented 3 years ago

The branch using this code in VLC to use the TrackTimestampScale https://code.videolan.org/robUx4/vlc/-/commits/mkv-track-scale