@danything/arib 2.3.1 → 2.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.
package/dist/bml.d.ts CHANGED
@@ -17,7 +17,7 @@
17
17
  * `.bml.jsonl` がこの形式で残っているので、変えると前に録ったものが読めなくなる。
18
18
  * モジュールの中身 (multipart) は [multipart.ts](multipart.ts) がデコードする。
19
19
  */
20
- import type { AdditionalAribBXMLInfo, ModuleFile, ResponseMessage } from "./bml-protocol.js";
20
+ import type { AdditionalAribBXMLInfo, ComponentPMT, ModuleFile, ResponseMessage } from "./bml-protocol.js";
21
21
  /**
22
22
  * データ符号化方式記述子の後半を読む。
23
23
  *
@@ -26,6 +26,13 @@ import type { AdditionalAribBXMLInfo, ModuleFile, ResponseMessage } from "./bml-
26
26
  * **`data_component_id` は 16 ビット** (aribts は 8 ビットで読んでいる)。
27
27
  */
28
28
  export declare function parseBxmlInfo(data: Uint8Array): AdditionalAribBXMLInfo;
29
+ /**
30
+ * PMT から ES を並べる。**部品タグ (component_tag) を持たない ES は数に入れない。**
31
+ * データ放送は「何番の部品か」でしか物を指せないので、番号の無いものは指しようがない。
32
+ *
33
+ * `BmlDecoder` の外からも使う。denpa のライブは、カルーセルをデコードする前に入口の部品の自動起動の指定をこれで読む
34
+ */
35
+ export declare function parsePmt(section: Uint8Array): ComponentPMT[];
29
36
  /**
30
37
  * 1 局に絞った TS を渡すと、データ放送の通知が出てくる。
31
38
  *
package/dist/bml.js CHANGED
@@ -109,8 +109,10 @@ export function parseBxmlInfo(data) {
109
109
  /**
110
110
  * PMT から ES を並べる。**部品タグ (component_tag) を持たない ES は数に入れない。**
111
111
  * データ放送は「何番の部品か」でしか物を指せないので、番号の無いものは指しようがない。
112
+ *
113
+ * `BmlDecoder` の外からも使う。denpa のライブは、カルーセルをデコードする前に入口の部品の自動起動の指定をこれで読む
112
114
  */
113
- function parsePmt(section) {
115
+ export function parsePmt(section) {
114
116
  const components = [];
115
117
  for (const [streamType, pid, info] of pmtStreams(section)) {
116
118
  let componentId;
package/dist/synth.d.ts CHANGED
@@ -146,12 +146,13 @@ extra?: number[]): Uint8Array;
146
146
  /**
147
147
  * データ符号化方式記述子 (0xFD)。**BML が載っている ES の目印。**
148
148
  *
149
- * 中身は「入口かどうか」と、カルーセルの回 (dataEventId)。
150
- * 既定は地上波 (0x0C) の入口つき・960x540
149
+ * 中身は「入口かどうか」と、自動起動の指定 (`autoStart`。入口のときだけ)、カルーセルの回 (dataEventId)。
150
+ * 既定は地上波 (0x0C) の入口つき・自動起動つき・960x540
151
151
  */
152
152
  export declare function bxmlDescriptor(options?: {
153
153
  dataComponentId?: number;
154
154
  entryPoint?: boolean;
155
+ autoStart?: boolean;
155
156
  }): number[];
156
157
  /**
157
158
  * 字幕の ES (stream_type 0x06) に付ける記述子。**字幕の目印。**
package/dist/synth.js CHANGED
@@ -402,15 +402,15 @@ extra = []) {
402
402
  /**
403
403
  * データ符号化方式記述子 (0xFD)。**BML が載っている ES の目印。**
404
404
  *
405
- * 中身は「入口かどうか」と、カルーセルの回 (dataEventId)。
406
- * 既定は地上波 (0x0C) の入口つき・960x540
405
+ * 中身は「入口かどうか」と、自動起動の指定 (`autoStart`。入口のときだけ)、カルーセルの回 (dataEventId)。
406
+ * 既定は地上波 (0x0C) の入口つき・自動起動つき・960x540
407
407
  */
408
408
  export function bxmlDescriptor(options = {}) {
409
- const { dataComponentId = 0x0c, entryPoint = true } = options;
409
+ const { dataComponentId = 0x0c, entryPoint = true, autoStart = true, } = options;
410
410
  const body = [
411
411
  ...be(dataComponentId),
412
412
  // 伝送方式 00 / 入口 / 自動起動 / 解像度 0011 (960x540)
413
- ...(entryPoint ? [0x33, 0x70] : [0x00]),
413
+ ...(entryPoint ? [autoStart ? 0x33 : 0x23, 0x70] : [0x00]),
414
414
  0xf8, // dataEventId 0xF / event_section_flag
415
415
  0xa0, // 即時取得あり / 蓄積不可 / 起動優先
416
416
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danything/arib",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "日本のデジタル放送 (ARIB) の TS と MMT/TLV を読む: PSI・PES・EIT・ARIB の文字・字幕・データ放送、TLV・MMTP・MMT-SI・MH-EIT",
5
5
  "license": "MIT",
6
6
  "repository": {