@blockcast/mmt-container 0.4.0-main.d6f2737828fc → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +12 -9
  2. package/dist/browser-runtime.js +14219 -13716
  3. package/dist/browser-runtime.js.map +4 -4
  4. package/dist/carp-catalog.d.ts +1 -12
  5. package/dist/carp-catalog.d.ts.map +1 -1
  6. package/dist/carp-catalog.js +14 -6
  7. package/dist/carp-catalog.js.map +4 -4
  8. package/dist/catalog-fec-params.d.ts +5 -2
  9. package/dist/catalog-fec-params.d.ts.map +1 -1
  10. package/dist/catalog-fec-params.js +101 -42
  11. package/dist/catalog-fec-params.js.map +4 -4
  12. package/dist/catalog-network-source.js +4 -6
  13. package/dist/catalog-network-source.js.map +4 -4
  14. package/dist/cmcd-producer.d.ts.map +1 -1
  15. package/dist/cmcd-producer.js +0 -4
  16. package/dist/cmcd-producer.js.map +2 -2
  17. package/dist/delivery-catalog.d.ts +124 -0
  18. package/dist/delivery-catalog.d.ts.map +1 -0
  19. package/dist/delivery-catalog.js +1867 -0
  20. package/dist/delivery-catalog.js.map +7 -0
  21. package/dist/fec-manager.d.ts +17 -4
  22. package/dist/fec-manager.d.ts.map +1 -1
  23. package/dist/fec-manager.js +41 -20
  24. package/dist/fec-manager.js.map +4 -4
  25. package/dist/fec-state.d.ts +3 -2
  26. package/dist/fec-state.d.ts.map +1 -1
  27. package/dist/fec-state.js +17 -15
  28. package/dist/fec-state.js.map +4 -4
  29. package/dist/fec-worker-setup.d.ts +2 -8
  30. package/dist/fec-worker-setup.d.ts.map +1 -1
  31. package/dist/fec-worker-setup.js +12 -62
  32. package/dist/fec-worker-setup.js.map +4 -4
  33. package/dist/index.d.ts +2 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +10 -0
  36. package/dist/index.js.map +2 -2
  37. package/dist/iso-block-locator.js +4 -6
  38. package/dist/iso-block-locator.js.map +4 -4
  39. package/dist/mfu-reassembler.js +27 -29
  40. package/dist/mfu-reassembler.js.map +4 -4
  41. package/dist/mmtp-container-parser.d.ts +9 -11
  42. package/dist/mmtp-container-parser.d.ts.map +1 -1
  43. package/dist/mmtp-container-parser.js +107 -98
  44. package/dist/mmtp-container-parser.js.map +4 -4
  45. package/dist/mmtp-container-parser.no-modules.js +133 -108
  46. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  47. package/dist/mmtp-decode-pipeline.js +107 -98
  48. package/dist/mmtp-decode-pipeline.js.map +4 -4
  49. package/dist/mmtp-router.d.ts +34 -14
  50. package/dist/mmtp-router.d.ts.map +1 -1
  51. package/dist/mmtp-router.js +143 -113
  52. package/dist/mmtp-router.js.map +4 -4
  53. package/dist/multicast-input.js +4 -6
  54. package/dist/multicast-input.js.map +4 -4
  55. package/dist/multicast-manager.d.ts +39 -3
  56. package/dist/multicast-manager.d.ts.map +1 -1
  57. package/dist/multicast-manager.js +264 -156
  58. package/dist/multicast-manager.js.map +4 -4
  59. package/dist/multicast-transport.js +14 -14
  60. package/dist/multicast-transport.js.map +4 -4
  61. package/dist/multicast-unwrap.js +32 -34
  62. package/dist/multicast-unwrap.js.map +4 -4
  63. package/dist/no-modules.js +130 -107
  64. package/dist/no-modules.js.map +4 -4
  65. package/dist/repair-fetch.d.ts +86 -2
  66. package/dist/repair-fetch.d.ts.map +1 -1
  67. package/dist/repair-fetch.js +86 -17
  68. package/dist/repair-fetch.js.map +4 -4
  69. package/dist/repair-layers.js +4 -6
  70. package/dist/repair-layers.js.map +4 -4
  71. package/dist/signaling.js +5 -7
  72. package/dist/signaling.js.map +4 -4
  73. package/dist/timestamp-codec.js +27 -29
  74. package/dist/timestamp-codec.js.map +4 -4
  75. package/dist/wasm-mfu-reassembler.js +4 -6
  76. package/dist/wasm-mfu-reassembler.js.map +4 -4
  77. package/dist/wasm-mmtp-container-parser.js +107 -98
  78. package/dist/wasm-mmtp-container-parser.js.map +4 -4
  79. package/package.json +5 -6
  80. package/src/carp-catalog.ts +16 -11
  81. package/src/catalog-fec-params.ts +38 -17
  82. package/src/cmcd-producer.ts +0 -6
  83. package/src/delivery-catalog.ts +498 -0
  84. package/src/fec-manager.ts +44 -17
  85. package/src/fec-state.ts +4 -9
  86. package/src/fec-worker-setup.ts +4 -35
  87. package/src/index.ts +27 -0
  88. package/src/mmtp-container-parser.ts +80 -20
  89. package/src/mmtp-router.ts +71 -29
  90. package/src/multicast-manager.ts +93 -26
  91. package/src/repair-fetch.ts +228 -17
  92. package/test-vectors/catalog/README.md +10 -1
  93. package/test-vectors/catalog/negative/multicast-endpoint-relay-address.json +39 -0
  94. package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +1 -0
  95. package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +38 -0
  96. package/test-vectors/catalog/section-codes.json +33 -0
  97. package/test-vectors/delivery-catalog/README.md +11 -0
  98. package/test-vectors/delivery-catalog/negative/missing-block-profile.json +58 -0
  99. package/test-vectors/delivery-catalog/negative/packet-id-signaling.json +59 -0
  100. package/test-vectors/delivery-catalog/negative/retired-k-padded-block-profile.json +59 -0
  101. package/test-vectors/delivery-catalog/positive/dash.json +56 -0
  102. package/test-vectors/delivery-catalog/positive/mmtp-source-only.json +43 -0
@@ -0,0 +1,38 @@
1
+ {
2
+ "version": 1,
3
+ "streamingFormat": "mmtp",
4
+ "streamingFormatVersion": "draft-ramadan-moq-mmt-00",
5
+ "tracks": [
6
+ {
7
+ "name": "video",
8
+ "packaging": "mmtp",
9
+ "codec": "avc1.640028",
10
+ "mmtpMode": "mfu",
11
+ "timescale": 90000,
12
+ "groupDurationMs": 1000
13
+ }
14
+ ],
15
+ "multicast": {
16
+ "endpoints": [
17
+ {
18
+ "protocol": "amt",
19
+ "sourceAddress": "192.0.2.10",
20
+ "groupAddress": "232.1.1.1",
21
+ "port": 5000,
22
+ "tracks": [
23
+ {
24
+ "name": "video",
25
+ "packetId": 1
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "networkSource": [
31
+ {
32
+ "type": "amt",
33
+ "discovery": "manual",
34
+ "relay": "amt-relay.example.test"
35
+ }
36
+ ]
37
+ }
38
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "description": "What the MMTP/FEC/repair/timing catalog section rejects each negative fixture with. Read by packages/container/src/catalog-schema.test.ts (against validateCmsfMmtpCatalog) and mmt-fec/tests/catalog_section_vectors.rs (against mmt_fec::catalog::validate_tracks): both engines must report the same code at the same JSON path. Every negative fixture is listed exactly once; outOfSection names fields the section does not own, which the embedding catalog validates.",
3
+ "negative": {
4
+ "archive-origin-with-path.json": { "outOfSection": "archive" },
5
+ "archive-unknown-field.json": { "outOfSection": "archive" },
6
+ "fec-block-profile-missing.json": { "code": "track_fec_block_profile", "path": "$.tracks[0].fec.blockProfile" },
7
+ "fec-block-profile-retired.json": { "code": "track_fec_block_profile_unimplemented", "path": "$.tracks[0].fec.blockProfile" },
8
+ "fec-block-profile-unknown.json": { "code": "track_fec_block_profile_unimplemented", "path": "$.tracks[0].fec.blockProfile" },
9
+ "fec-enhancement-repair-removed.json": { "code": "track_fec", "path": "$.tracks[0].fec.enhancementRepair" },
10
+ "fec-repair-layer-geometry.json": { "code": "track_repair_geometry", "path": "$.tracks[2].timescale" },
11
+ "fec-repair-layer-missing-symbols.json": { "code": "track_repair_layer", "path": "$.tracks[2].repairSymbols" },
12
+ "fec-repair-multiple-depends.json": { "code": "track_repair_depends", "path": "$.tracks[2].depends" },
13
+ "fec-repair-overlay-with-layer.json": { "code": "track_repair_overlay", "path": "$.tracks[2].repairLayer" },
14
+ "fec-repair-priority-out-of-band.json": { "code": "track_repair_priority", "path": "$.tracks[1].priority" },
15
+ "fec-repair-source-symbols-without-scope.json": { "code": "track_repair_overlay", "path": "$.tracks[2].sourceSymbols" },
16
+ "legacy-selection-params.json": { "outOfSection": "common track field selectionParams" },
17
+ "media-track-repair-layer.json": { "code": "track_repair_layer", "path": "$.tracks[0].repairLayer" },
18
+ "missing-mmtp-fields.json": { "code": "track_mmtp_mode", "path": "$.tracks[0].mmtpMode" },
19
+ "multicast-auth-padded-key.json": { "outOfSection": "multicast.auth" },
20
+ "multicast-auth-reused-track-format.json": { "outOfSection": "multicast.auth" },
21
+ "multicast-auth-trailing-pad-bits.json": { "outOfSection": "multicast.auth" },
22
+ "multicast-endpoint-missing-protocol-and-source.json": { "outOfSection": "multicast" },
23
+ "multicast-endpoint-relay-address.json": { "outOfSection": "multicast" },
24
+ "multicast-network-source-empty.json": { "outOfSection": "multicast" },
25
+ "multicast-packet-id-signaling.json": { "outOfSection": "multicast" },
26
+ "network-source-object.json": { "outOfSection": "multicast" },
27
+ "raptorq-source-symbols-over-max.json": { "code": "track_fec_bounds", "path": "$.tracks[0].fec.sourceSymbols" },
28
+ "raptorq-unaligned-symbol.json": { "code": "track_fec", "path": "$.tracks[0].fec.symbolSize" },
29
+ "repair-track-legacy-shape.json": { "outOfSection": "the packaging value set (common track field)" },
30
+ "track-role-empty.json": { "outOfSection": "common track field trackRole" },
31
+ "track-role-non-string.json": { "outOfSection": "common track field trackRole" }
32
+ }
33
+ }
@@ -0,0 +1,11 @@
1
+ # Delivery-catalog vectors
2
+
3
+ Hand-authored v2 delivery catalogs for `normalizeDeliveryCatalog`
4
+ (`src/delivery-catalog.ts`). `positive/` must normalize; each `negative/` file
5
+ is `{ "error": <regex>, "catalog": <catalog> }` and must throw a matching error.
6
+ Do not regenerate these from the implementation under test.
7
+
8
+ - `missing-block-profile` / `retired-k-padded-block-profile`: `fec.blockProfile`
9
+ is required, never defaulted, and must be `iso-ssbg1-v1` (BLO-35597, #518).
10
+ - `packet-id-signaling`: `mmtp.packetId` 0 is the MMTP signaling flow, never a
11
+ track (`isMulticastTrackPacketId`).
@@ -0,0 +1,58 @@
1
+ {
2
+ "error": "fec\\.blockProfile is required",
3
+ "catalog": {
4
+ "schemaVersion": 2,
5
+ "channelId": "live-main",
6
+ "multicast": {
7
+ "packaging": "dash",
8
+ "endpoints": {
9
+ "video-a": {
10
+ "source": "2001:db8::10",
11
+ "group": "ff3e::101",
12
+ "port": 5001
13
+ }
14
+ },
15
+ "deliveryPolicy": {
16
+ "bufferWindowSegments": 8,
17
+ "requestTimeoutMs": 1500,
18
+ "missPolicy": "fail"
19
+ },
20
+ "dash": {
21
+ "manifestUrl": "https://origin.example/live/main.mpd",
22
+ "routes": [
23
+ {
24
+ "id": "video-1080",
25
+ "contentType": "video",
26
+ "endpointRef": "video-a",
27
+ "representationId": "v1080",
28
+ "initUri": "https://origin.example/video-1080/init.mp4",
29
+ "mediaUriTemplate": "https://origin.example/video-1080/seg-$Number$.m4s",
30
+ "objects": {
31
+ "namespace": "live/video-1080",
32
+ "initObject": "init",
33
+ "mediaObjectTemplate": "seg-$Number$"
34
+ },
35
+ "fec": {
36
+ "K": 20,
37
+ "P": 4,
38
+ "T": 1200,
39
+ "interleaveDepthMs": 133
40
+ },
41
+ "mmtp": {
42
+ "trackName": "video-1080",
43
+ "packetId": 101,
44
+ "mode": "mfu",
45
+ "codec": "avc1.640028",
46
+ "timescale": 90000,
47
+ "mediaUnitDurationTicks": 3000,
48
+ "mediaUnitsPerObject": 30,
49
+ "firstMpuSequenceNumber": 1,
50
+ "firstObjectNumber": 1,
51
+ "mpuSequencesPerObject": 1
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "error": "mmtp\\.packetId must be an integer from 1 to 65535",
3
+ "catalog": {
4
+ "schemaVersion": 2,
5
+ "channelId": "live-main",
6
+ "multicast": {
7
+ "packaging": "dash",
8
+ "endpoints": {
9
+ "video-a": {
10
+ "source": "2001:db8::10",
11
+ "group": "ff3e::101",
12
+ "port": 5001
13
+ }
14
+ },
15
+ "deliveryPolicy": {
16
+ "bufferWindowSegments": 8,
17
+ "requestTimeoutMs": 1500,
18
+ "missPolicy": "fail"
19
+ },
20
+ "dash": {
21
+ "manifestUrl": "https://origin.example/live/main.mpd",
22
+ "routes": [
23
+ {
24
+ "id": "video-1080",
25
+ "contentType": "video",
26
+ "endpointRef": "video-a",
27
+ "representationId": "v1080",
28
+ "initUri": "https://origin.example/video-1080/init.mp4",
29
+ "mediaUriTemplate": "https://origin.example/video-1080/seg-$Number$.m4s",
30
+ "objects": {
31
+ "namespace": "live/video-1080",
32
+ "initObject": "init",
33
+ "mediaObjectTemplate": "seg-$Number$"
34
+ },
35
+ "fec": {
36
+ "K": 20,
37
+ "P": 4,
38
+ "T": 1200,
39
+ "interleaveDepthMs": 133,
40
+ "blockProfile": "iso-ssbg1-v1"
41
+ },
42
+ "mmtp": {
43
+ "trackName": "video-1080",
44
+ "packetId": 0,
45
+ "mode": "mfu",
46
+ "codec": "avc1.640028",
47
+ "timescale": 90000,
48
+ "mediaUnitDurationTicks": 3000,
49
+ "mediaUnitsPerObject": 30,
50
+ "firstMpuSequenceNumber": 1,
51
+ "firstObjectNumber": 1,
52
+ "mpuSequencesPerObject": 1
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "error": "fec\\.blockProfile must be \"iso-ssbg1-v1\"",
3
+ "catalog": {
4
+ "schemaVersion": 2,
5
+ "channelId": "live-main",
6
+ "multicast": {
7
+ "packaging": "dash",
8
+ "endpoints": {
9
+ "video-a": {
10
+ "source": "2001:db8::10",
11
+ "group": "ff3e::101",
12
+ "port": 5001
13
+ }
14
+ },
15
+ "deliveryPolicy": {
16
+ "bufferWindowSegments": 8,
17
+ "requestTimeoutMs": 1500,
18
+ "missPolicy": "fail"
19
+ },
20
+ "dash": {
21
+ "manifestUrl": "https://origin.example/live/main.mpd",
22
+ "routes": [
23
+ {
24
+ "id": "video-1080",
25
+ "contentType": "video",
26
+ "endpointRef": "video-a",
27
+ "representationId": "v1080",
28
+ "initUri": "https://origin.example/video-1080/init.mp4",
29
+ "mediaUriTemplate": "https://origin.example/video-1080/seg-$Number$.m4s",
30
+ "objects": {
31
+ "namespace": "live/video-1080",
32
+ "initObject": "init",
33
+ "mediaObjectTemplate": "seg-$Number$"
34
+ },
35
+ "fec": {
36
+ "K": 20,
37
+ "P": 4,
38
+ "T": 1200,
39
+ "interleaveDepthMs": 133,
40
+ "blockProfile": "k-padded-v1"
41
+ },
42
+ "mmtp": {
43
+ "trackName": "video-1080",
44
+ "packetId": 101,
45
+ "mode": "mfu",
46
+ "codec": "avc1.640028",
47
+ "timescale": 90000,
48
+ "mediaUnitDurationTicks": 3000,
49
+ "mediaUnitsPerObject": 30,
50
+ "firstMpuSequenceNumber": 1,
51
+ "firstObjectNumber": 1,
52
+ "mpuSequencesPerObject": 1
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "channelId": "live-main",
4
+ "multicast": {
5
+ "packaging": "dash",
6
+ "endpoints": {
7
+ "video-a": {
8
+ "source": "2001:db8::10",
9
+ "group": "ff3e::101",
10
+ "port": 5001
11
+ }
12
+ },
13
+ "deliveryPolicy": {
14
+ "bufferWindowSegments": 8,
15
+ "requestTimeoutMs": 1500,
16
+ "missPolicy": "fail"
17
+ },
18
+ "dash": {
19
+ "manifestUrl": "https://origin.example/live/main.mpd",
20
+ "routes": [
21
+ {
22
+ "id": "video-1080",
23
+ "contentType": "video",
24
+ "endpointRef": "video-a",
25
+ "representationId": "v1080",
26
+ "initUri": "https://origin.example/video-1080/init.mp4",
27
+ "mediaUriTemplate": "https://origin.example/video-1080/seg-$Number$.m4s",
28
+ "objects": {
29
+ "namespace": "live/video-1080",
30
+ "initObject": "init",
31
+ "mediaObjectTemplate": "seg-$Number$"
32
+ },
33
+ "fec": {
34
+ "K": 20,
35
+ "P": 4,
36
+ "T": 1200,
37
+ "interleaveDepthMs": 133,
38
+ "blockProfile": "iso-ssbg1-v1"
39
+ },
40
+ "mmtp": {
41
+ "trackName": "video-1080",
42
+ "packetId": 101,
43
+ "mode": "mfu",
44
+ "codec": "avc1.640028",
45
+ "timescale": 90000,
46
+ "mediaUnitDurationTicks": 3000,
47
+ "mediaUnitsPerObject": 30,
48
+ "firstMpuSequenceNumber": 1,
49
+ "firstObjectNumber": 1,
50
+ "mpuSequencesPerObject": 1
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "channelId": "live-main",
4
+ "multicast": {
5
+ "packaging": "mmtp",
6
+ "endpoints": {
7
+ "video-a": {
8
+ "source": "2001:db8::10",
9
+ "group": "ff3e::101",
10
+ "port": 5001
11
+ }
12
+ },
13
+ "deliveryPolicy": {
14
+ "bufferWindowSegments": 8,
15
+ "requestTimeoutMs": 1500,
16
+ "missPolicy": "fail"
17
+ },
18
+ "mmtp": {
19
+ "routes": [
20
+ {
21
+ "id": "video",
22
+ "contentType": "video",
23
+ "endpointRef": "video-a",
24
+ "trackName": "video",
25
+ "initUri": "https://origin.example/video/init.mp4",
26
+ "mediaUriTemplate": "https://origin.example/video/seg-$Number$.m4s",
27
+ "objects": {
28
+ "namespace": "live/video",
29
+ "initObject": "init",
30
+ "mediaObjectTemplate": "seg-$Number$"
31
+ },
32
+ "fec": {
33
+ "K": 20,
34
+ "P": 0,
35
+ "T": 1200,
36
+ "interleaveDepthMs": 133,
37
+ "blockProfile": "iso-ssbg1-v1"
38
+ }
39
+ }
40
+ ]
41
+ }
42
+ }
43
+ }