From aab5fd599ec8919450d3d84fa87339b6b056cd2f Mon Sep 17 00:00:00 2001 From: dukesook Date: Wed, 20 Sep 2023 09:48:16 -0600 Subject: [PATCH 1/7] Add 'taic' box - TAIClockInfoBox --- src/parsing/taic.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/parsing/taic.js diff --git a/src/parsing/taic.js b/src/parsing/taic.js new file mode 100644 index 00000000..92d29b72 --- /dev/null +++ b/src/parsing/taic.js @@ -0,0 +1,6 @@ +BoxParser.createFullBoxCtor("taic", function(stream) { + this.time_uncertainty = stream.readUint64(); + this.correction_offset = stream.readInt64(); + this.clock_drift_rate = stream.readFloat32(); + this.reference_source_type = stream.readUint8(); +}); \ No newline at end of file From b80e48961eb7d55e65f3260f5abdb5bfaa4352ee Mon Sep 17 00:00:00 2001 From: dukesook Date: Wed, 20 Sep 2023 15:36:54 -0600 Subject: [PATCH 2/7] Add itai Timestamp box --- src/parsing/itai.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/parsing/itai.js diff --git a/src/parsing/itai.js b/src/parsing/itai.js new file mode 100644 index 00000000..7d23c6bd --- /dev/null +++ b/src/parsing/itai.js @@ -0,0 +1,4 @@ +BoxParser.createFullBoxCtor("itai", function(stream) { + this.TAI_time_stamp = stream.readUint64(); + this.status_bits = stream.readUint8(); +}); \ No newline at end of file From 28dd07909c2af8df47a5d87fe9da60f472fcdf2f Mon Sep 17 00:00:00 2001 From: dukesook Date: Sat, 14 Oct 2023 13:19:15 -0600 Subject: [PATCH 3/7] Updates as per 'Draft text for CD of 23001-17 Amd1 v4' --- src/parsing/itai.js | 2 +- src/parsing/taic.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/parsing/itai.js b/src/parsing/itai.js index 7d23c6bd..dc0cf54c 100644 --- a/src/parsing/itai.js +++ b/src/parsing/itai.js @@ -1,4 +1,4 @@ BoxParser.createFullBoxCtor("itai", function(stream) { - this.TAI_time_stamp = stream.readUint64(); + this.TAI_timestamp = stream.readUint64(); this.status_bits = stream.readUint8(); }); \ No newline at end of file diff --git a/src/parsing/taic.js b/src/parsing/taic.js index 92d29b72..107d70fd 100644 --- a/src/parsing/taic.js +++ b/src/parsing/taic.js @@ -2,5 +2,8 @@ BoxParser.createFullBoxCtor("taic", function(stream) { this.time_uncertainty = stream.readUint64(); this.correction_offset = stream.readInt64(); this.clock_drift_rate = stream.readFloat32(); - this.reference_source_type = stream.readUint8(); + //if (clock_drift_rate == 0x7FC0 0000) + // value is an IEEE 754 quiet NaN. + // Interpret the value as unknown + this.clock_source = stream.readUint8(); }); \ No newline at end of file From e2a35016315dc27d5ba501bfa593fb3f061984b7 Mon Sep 17 00:00:00 2001 From: dukesook Date: Fri, 3 Nov 2023 01:55:07 +0000 Subject: [PATCH 4/7] If the values are unknown, display 'unknown' --- src/parsing/taic.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/parsing/taic.js b/src/parsing/taic.js index 107d70fd..69cacc55 100644 --- a/src/parsing/taic.js +++ b/src/parsing/taic.js @@ -2,8 +2,13 @@ BoxParser.createFullBoxCtor("taic", function(stream) { this.time_uncertainty = stream.readUint64(); this.correction_offset = stream.readInt64(); this.clock_drift_rate = stream.readFloat32(); - //if (clock_drift_rate == 0x7FC0 0000) - // value is an IEEE 754 quiet NaN. - // Interpret the value as unknown this.clock_source = stream.readUint8(); + + if (this.time_uncertainty === 0xffffffffffffffff) { + this.time_uncertainty = "unknown"; + } + + if (this.correction_offset === 0x7fffffffffffffff) { + this.correction_offset = "unknown"; + } }); \ No newline at end of file From 0417dfc800273ad7128ffc579cb8e3079a317479 Mon Sep 17 00:00:00 2001 From: dukesook Date: Sat, 4 Nov 2023 03:26:52 +0000 Subject: [PATCH 5/7] If the timestamp is unknown, print 'unknown' --- src/parsing/itai.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parsing/itai.js b/src/parsing/itai.js index dc0cf54c..06fcc843 100644 --- a/src/parsing/itai.js +++ b/src/parsing/itai.js @@ -1,4 +1,8 @@ BoxParser.createFullBoxCtor("itai", function(stream) { this.TAI_timestamp = stream.readUint64(); this.status_bits = stream.readUint8(); + + if (this.TAI_timestamp === 0xffffffffffffffff) { + this.TAI_timestamp = "unknown"; + } }); \ No newline at end of file From 3e7b2e64f2895a3a1a7fe07cb9aacb257346d4df Mon Sep 17 00:00:00 2001 From: dukesook Date: Tue, 2 Jul 2024 12:12:17 -0600 Subject: [PATCH 6/7] DAM1 update for timestamps --- src/parsing/itai.js | 8 ++++---- src/parsing/taic.js | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/parsing/itai.js b/src/parsing/itai.js index 06fcc843..8665777b 100644 --- a/src/parsing/itai.js +++ b/src/parsing/itai.js @@ -1,8 +1,8 @@ BoxParser.createFullBoxCtor("itai", function(stream) { this.TAI_timestamp = stream.readUint64(); - this.status_bits = stream.readUint8(); - if (this.TAI_timestamp === 0xffffffffffffffff) { - this.TAI_timestamp = "unknown"; - } + status_bits = stream.readUint8(); + this.sychronization_state = (status_bits >> 7) & 0x01; + this.timestamp_generation_failure = (status_bits >> 6) & 0x01; + this.timestamp_is_modified = (status_bits >> 5) & 0x01; }); \ No newline at end of file diff --git a/src/parsing/taic.js b/src/parsing/taic.js index 69cacc55..5acd0241 100644 --- a/src/parsing/taic.js +++ b/src/parsing/taic.js @@ -1,14 +1,12 @@ BoxParser.createFullBoxCtor("taic", function(stream) { this.time_uncertainty = stream.readUint64(); - this.correction_offset = stream.readInt64(); - this.clock_drift_rate = stream.readFloat32(); - this.clock_source = stream.readUint8(); + this.clock_resolution = stream.readUint32(); + this.clock_drift_rate = stream.readInt32(); + this.clock_type = stream.readUint8(); if (this.time_uncertainty === 0xffffffffffffffff) { this.time_uncertainty = "unknown"; } - if (this.correction_offset === 0x7fffffffffffffff) { - this.correction_offset = "unknown"; - } + }); \ No newline at end of file From b854e49297d0a08681ad42b0f9da8137a56e9be7 Mon Sep 17 00:00:00 2001 From: dukesook Date: Mon, 8 Jul 2024 09:58:57 -0600 Subject: [PATCH 7/7] bugfix - clock_type is the first two bits, not last two --- src/parsing/taic.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parsing/taic.js b/src/parsing/taic.js index 5acd0241..b0fd5cec 100644 --- a/src/parsing/taic.js +++ b/src/parsing/taic.js @@ -2,8 +2,9 @@ BoxParser.createFullBoxCtor("taic", function(stream) { this.time_uncertainty = stream.readUint64(); this.clock_resolution = stream.readUint32(); this.clock_drift_rate = stream.readInt32(); - this.clock_type = stream.readUint8(); - + var reserved_byte = stream.readUint8(); + this.clock_type = (reserved_byte & 0xC0) >> 6; + if (this.time_uncertainty === 0xffffffffffffffff) { this.time_uncertainty = "unknown"; }