@synapse-sdk/core 0.3.8 → 0.3.9
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/annexb.d.ts +4 -4
- package/dist/annexb.js +4 -4
- package/dist/types.d.ts +8 -1
- package/dist/types.js +4 -1
- package/package.json +1 -1
package/dist/annexb.d.ts
CHANGED
|
@@ -44,9 +44,9 @@ export declare function auParamSets(au: Uint8Array): Uint8Array | undefined;
|
|
|
44
44
|
* The sync points an Annex-B access unit offers.
|
|
45
45
|
* - `idr`: an IDR slice (NAL type 5) is present → instantaneous start point (`KEY`).
|
|
46
46
|
* - `recovery`: a recovery point SEI (NAL 6, payload type 6) is present → gradual start point,
|
|
47
|
-
* clean one refresh period later (`RECOVERY`;
|
|
48
|
-
* Decided from the bitstream rather than the encoder's keyframe flag, which
|
|
49
|
-
*
|
|
47
|
+
* clean one refresh period later (`RECOVERY`; NVENC and Quick Sync emit it at each intra-refresh sweep).
|
|
48
|
+
* Decided from the bitstream rather than the encoder's keyframe flag, which encoders set
|
|
49
|
+
* differently (NVENC raises it for IDRs only).
|
|
50
50
|
*/
|
|
51
51
|
export declare function auSyncPoints(au: Uint8Array): {
|
|
52
52
|
idr: boolean;
|
|
@@ -72,7 +72,7 @@ export declare function concatBytes(parts: readonly Uint8Array[]): Uint8Array;
|
|
|
72
72
|
* Splits a continuous Annex-B byte stream (a file, an encoder pipe) into access units. Rule
|
|
73
73
|
* (dylithium's reader loop): an AU ends with its coded slice; the next NAL of any kind starts a
|
|
74
74
|
* new AU, so non-VCL NALs (SPS, PPS, SEI, AUD) are attached to the picture that follows them.
|
|
75
|
-
* Sufficient for one-slice-per-picture streams (
|
|
75
|
+
* Sufficient for one-slice-per-picture streams (`slices=1` on every native backend, WebCodecs), which is what
|
|
76
76
|
* the encoder options enforce.
|
|
77
77
|
*/
|
|
78
78
|
export declare class AuSplitter {
|
package/dist/annexb.js
CHANGED
|
@@ -63,9 +63,9 @@ export function auParamSets(au) {
|
|
|
63
63
|
* The sync points an Annex-B access unit offers.
|
|
64
64
|
* - `idr`: an IDR slice (NAL type 5) is present → instantaneous start point (`KEY`).
|
|
65
65
|
* - `recovery`: a recovery point SEI (NAL 6, payload type 6) is present → gradual start point,
|
|
66
|
-
* clean one refresh period later (`RECOVERY`;
|
|
67
|
-
* Decided from the bitstream rather than the encoder's keyframe flag, which
|
|
68
|
-
*
|
|
66
|
+
* clean one refresh period later (`RECOVERY`; NVENC and Quick Sync emit it at each intra-refresh sweep).
|
|
67
|
+
* Decided from the bitstream rather than the encoder's keyframe flag, which encoders set
|
|
68
|
+
* differently (NVENC raises it for IDRs only).
|
|
69
69
|
*/
|
|
70
70
|
export function auSyncPoints(au) {
|
|
71
71
|
let idr = false, recovery = false;
|
|
@@ -161,7 +161,7 @@ export function concatBytes(parts) {
|
|
|
161
161
|
* Splits a continuous Annex-B byte stream (a file, an encoder pipe) into access units. Rule
|
|
162
162
|
* (dylithium's reader loop): an AU ends with its coded slice; the next NAL of any kind starts a
|
|
163
163
|
* new AU, so non-VCL NALs (SPS, PPS, SEI, AUD) are attached to the picture that follows them.
|
|
164
|
-
* Sufficient for one-slice-per-picture streams (
|
|
164
|
+
* Sufficient for one-slice-per-picture streams (`slices=1` on every native backend, WebCodecs), which is what
|
|
165
165
|
* the encoder options enforce.
|
|
166
166
|
*/
|
|
167
167
|
export class AuSplitter {
|
package/dist/types.d.ts
CHANGED
|
@@ -188,15 +188,22 @@ export interface FecReport {
|
|
|
188
188
|
export interface TopicsSnapshot {
|
|
189
189
|
topics: Record<string, TopicEntry>;
|
|
190
190
|
}
|
|
191
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* One topic: its established descriptor (`fec` is per publisher, never here), its publishers and its typed subscribers
|
|
193
|
+
* (those that read it with a schema), each by session prefix. A topic is listed while it has either.
|
|
194
|
+
*/
|
|
192
195
|
export interface TopicEntry {
|
|
193
196
|
desc?: TrackDesc;
|
|
194
197
|
publishers: Record<string, TopicPublisher>;
|
|
198
|
+
subscribers: Record<string, TopicSubscriber>;
|
|
195
199
|
}
|
|
196
200
|
export interface TopicPublisher {
|
|
197
201
|
name: string;
|
|
198
202
|
bind: string;
|
|
199
203
|
}
|
|
204
|
+
export interface TopicSubscriber {
|
|
205
|
+
name: string;
|
|
206
|
+
}
|
|
200
207
|
/** `runtime/services` track `catalog` (WP §8.1). */
|
|
201
208
|
export interface ServicesSnapshot {
|
|
202
209
|
services: Record<string, ServiceEntry>;
|
package/dist/types.js
CHANGED
|
@@ -64,7 +64,10 @@ export function normalizeTopicsSnapshot(v) {
|
|
|
64
64
|
const publishers = {};
|
|
65
65
|
for (const [prefix, p] of Object.entries((e.publishers ?? {})))
|
|
66
66
|
publishers[prefix] = { name: str(p?.name), bind: str(p?.bind) };
|
|
67
|
-
const
|
|
67
|
+
const subscribers = {};
|
|
68
|
+
for (const [prefix, s] of Object.entries((e.subscribers ?? {})))
|
|
69
|
+
subscribers[prefix] = { name: str(s?.name) };
|
|
70
|
+
const entry = { publishers, subscribers };
|
|
68
71
|
if (e.desc)
|
|
69
72
|
entry.desc = e.desc;
|
|
70
73
|
out.topics[name] = entry;
|