grandi 1.2.0 → 1.3.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/README.md CHANGED
@@ -38,7 +38,7 @@ Grandi publishes per-architecture packages (`@grandi/<os>-<arch>`) that bundle t
38
38
  | Operating system | Architectures | Status | Notes |
39
39
  | --- | --- | --- | --- |
40
40
  | Windows | x86, x64 | ✅ Published as `@grandi/win32-ia32` and `@grandi/win32-x64`. Visual Studio 2013 C runtime only needed when building locally. |
41
- | macOS | Universal (x64 + arm64) | ✅ Published as `@grandi/darwin-universal`, built against the official universal NDI™ runtime. |
41
+ | macOS | Universal (x64 + arm64) | ✅ Published as `@grandi/darwin-x64`, `@grandi/darwin-arm64`, built against the official universal NDI™ runtime. |
42
42
  | Linux | x86, x64, armv7l, arm64 | ✅ Published as `@grandi/linux-x64`, `@grandi/linux-arm64`, `@grandi/linux-armv7l`. Built against the glibc-based NDI™ SDK; requires `libavahi-common.so.3`, `libavahi-client.so.3`, and the `avahi-daemon` service. |
43
43
 
44
44
  ## Installation
package/dist/index.d.mts CHANGED
@@ -385,6 +385,10 @@ interface Grandi {
385
385
  * Alias of `ColorFormat.Fastest`.
386
386
  */
387
387
  COLOR_FORMAT_FASTEST: ColorFormat;
388
+ /**
389
+ * Alias of `ColorFormat.Best`.
390
+ */
391
+ COLOR_FORMAT_BEST: ColorFormat;
388
392
  /**
389
393
  * Alias of `ColorFormat.BGRX_BGRA_FLIPPED` (Windows-only).
390
394
  */
package/dist/index.mjs CHANGED
@@ -77,8 +77,8 @@ function tryRequireArchPackage() {
77
77
  "linux-arm": "@grandi/linux-armv7l",
78
78
  "win32-x64": "@grandi/win32-x64",
79
79
  "win32-ia32": "@grandi/win32-ia32",
80
- "darwin-x64": "@grandi/darwin-universal",
81
- "darwin-arm64": "@grandi/darwin-universal"
80
+ "darwin-x64": "@grandi/darwin-x64",
81
+ "darwin-arm64": "@grandi/darwin-arm64"
82
82
  }[archKey];
83
83
  if (!pkg) throw new Error(`Unsupported platform or architecture: ${archKey}`);
84
84
  try {
@@ -300,6 +300,7 @@ const grandi = {
300
300
  COLOR_FORMAT_RGBX_RGBA: ColorFormat.RGBX_RGBA,
301
301
  COLOR_FORMAT_UYVY_RGBA: ColorFormat.UYVY_RGBA,
302
302
  COLOR_FORMAT_FASTEST: ColorFormat.Fastest,
303
+ COLOR_FORMAT_BEST: ColorFormat.Best,
303
304
  COLOR_FORMAT_BGRX_BGRA_FLIPPED: ColorFormat.BGRX_BGRA_FLIPPED,
304
305
  BANDWIDTH_METADATA_ONLY: Bandwidth.MetadataOnly,
305
306
  BANDWIDTH_AUDIO_ONLY: Bandwidth.AudioOnly,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["loadErrors: Error[]","noopAddon: GrandiAddon","addon: GrandiAddon","grandi: Grandi"],"sources":["../node_modules/tsdown/esm-shims.js","../src/types.ts","../src/index.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","export enum FrameType {\n\tInterlaced = 0,\n\tProgressive = 1,\n\tField0 = 2,\n\tField1 = 3,\n}\n\nexport enum ColorFormat {\n\tBGRX_BGRA = 0,\n\tUYVY_BGRA = 1,\n\tRGBX_RGBA = 2,\n\tUYVY_RGBA = 3,\n\tFastest = 100,\n\tBest = 101,\n\t// Windows-only NDI SDK extension: 1000 + BGRX_BGRA.\n\tBGRX_BGRA_FLIPPED = 1000,\n}\n\nexport enum AudioFormat {\n\tFloat32Separate = 0,\n\tFloat32Interleaved = 1,\n\tInt16Interleaved = 2,\n}\n\nexport enum Bandwidth {\n\tMetadataOnly = -10,\n\tAudioOnly = 10,\n\tLowest = 0,\n\tHighest = 100,\n}\n\nexport enum FourCC {\n\tUYVY = 1498831189,\n\tUYVA = 1096178005,\n\tP216 = 909193808,\n\tPA16 = 909197648,\n\tYV12 = 842094169,\n\tI420 = 808596553,\n\tNV12 = 842094158,\n\tBGRA = 1095911234,\n\tBGRX = 1481787202,\n\tRGBA = 1094862674,\n\tRGBX = 1480738642,\n\tFLTp = 1884572742,\n}\n\nexport type PtpTimestamp = [number, number]; // [seconds, nanoseconds]\nexport type Timecode = bigint | number | PtpTimestamp;\n\nexport interface Source {\n\tname: string;\n\turlAddress?: string;\n}\n\nexport interface VideoFrame {\n\ttype?: \"video\";\n\txres: number;\n\tyres: number;\n\tframeRateN: number;\n\tframeRateD: number;\n\tpictureAspectRatio: number;\n\tfourCC: FourCC;\n\tframeFormatType: FrameType;\n\tlineStrideBytes: number;\n\tdata: Buffer;\n\ttimecode?: Timecode;\n\t/**\n\t * Receive-only timestamp filled by the NDI SDK (UTC time, 100ns units under the hood).\n\t * NDI ignores this field when sending.\n\t */\n\ttimestamp?: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedVideoFrame extends VideoFrame {\n\ttype: \"video\";\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface AudioFrame {\n\ttype?: \"audio\";\n\tsampleRate: number;\n\tnoChannels: number;\n\tnoSamples: number;\n\tchannelStrideBytes: number;\n\tdata: Buffer;\n\tfourCC: FourCC;\n\ttimecode?: Timecode;\n\t/**\n\t * Receive-only timestamp filled by the NDI SDK (UTC time, 100ns units under the hood).\n\t * NDI ignores this field when sending.\n\t */\n\ttimestamp?: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedAudioFrame {\n\ttype: \"audio\";\n\taudioFormat: AudioFormat;\n\treferenceLevel?: number;\n\tsampleRate: number;\n\tchannels: number;\n\tsamples: number;\n\tchannelStrideInBytes: number;\n\tdata: Buffer;\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedMetadataFrame {\n\ttype: \"metadata\";\n\tlength: number;\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tdata: string;\n}\n\nexport interface SourceChangeEvent {\n\ttype: \"sourceChange\";\n}\n\nexport interface StatusChangeEvent {\n\ttype: \"statusChange\";\n}\n\nexport interface TimeoutEvent {\n\ttype: \"timeout\";\n}\n\nexport type ReceiverDataFrame =\n\t| ReceivedVideoFrame\n\t| ReceivedAudioFrame\n\t| ReceivedMetadataFrame\n\t| SourceChangeEvent\n\t| StatusChangeEvent\n\t| TimeoutEvent;\n\nexport interface AudioReceiveOptions {\n\taudioFormat?: AudioFormat;\n\treferenceLevel?: number;\n}\n\nexport interface Receiver {\n\tembedded: unknown;\n\tsource: Source;\n\tcolorFormat: ColorFormat;\n\tbandwidth: Bandwidth;\n\tallowVideoFields: boolean;\n\tname?: string;\n\tvideo(timeoutMs?: number): Promise<ReceivedVideoFrame>;\n\taudio(timeoutMs?: number): Promise<ReceivedAudioFrame>;\n\taudio(\n\t\toptions: AudioReceiveOptions,\n\t\ttimeoutMs?: number,\n\t): Promise<ReceivedAudioFrame>;\n\tmetadata(timeoutMs?: number): Promise<ReceivedMetadataFrame>;\n\tdata(timeoutMs?: number): Promise<ReceiverDataFrame>;\n\tdata(\n\t\toptions: AudioReceiveOptions,\n\t\ttimeoutMs?: number,\n\t): Promise<ReceiverDataFrame>;\n\ttally(state: ReceiverTallyState): boolean;\n\tdestroy(): boolean;\n}\n\nexport interface ReceiverTallyState {\n\tonProgram?: boolean;\n\tonPreview?: boolean;\n}\n\nexport interface SenderTally {\n\tchanged: boolean;\n\ton_program: boolean;\n\ton_preview: boolean;\n}\n\nexport interface Sender {\n\tembedded: unknown;\n\tname: string;\n\tgroups?: string;\n\tclockVideo: boolean;\n\tclockAudio: boolean;\n\tvideo(frame: VideoFrame): Promise<void>;\n\taudio(frame: AudioFrame): Promise<void>;\n\tconnections(): number;\n\tmetadata(data: string): boolean;\n\ttally(): SenderTally;\n\tsourcename(): string;\n\tdestroy(): boolean;\n}\n\nexport interface Routing {\n\tembedded: unknown;\n\tname?: string;\n\tgroups?: string;\n\tdestroy(): boolean;\n\tchange(source: Source): boolean;\n\tclear(): boolean;\n\tconnections(): number;\n\tsourcename(): string;\n}\n\nexport interface FrameSyncAudioOptions {\n\tsampleRate?: number;\n\tnoChannels?: number;\n\tnoSamples?: number;\n}\n\nexport interface FrameSync {\n\tembedded: unknown;\n\t/**\n\t * Captures a video frame using NDI frame-synchronization (time base correction).\n\t * Always returns immediately.\n\t *\n\t * If no video has ever been received, resolves with `{ type: \"timeout\" }`.\n\t */\n\tvideo(fieldType?: FrameType): Promise<ReceivedVideoFrame | TimeoutEvent>;\n\t/**\n\t * Captures audio using NDI frame-synchronization (resampled to match your calls).\n\t * Always returns immediately and may insert silence if no audio is present.\n\t */\n\taudio(options?: FrameSyncAudioOptions): Promise<ReceivedAudioFrame>;\n\t/**\n\t * Returns an approximate depth of the internal audio queue in samples.\n\t */\n\taudioQueueDepth(): number;\n\tdestroy(): boolean;\n}\n\nexport interface Finder {\n\tsources(): Source[];\n\twait(timeoutMs?: number): boolean;\n\tdestroy(): boolean;\n}\n\nexport interface FindOptions {\n\tshowLocalSources?: boolean;\n\tgroups?: string;\n\textraIPs?: string;\n}\n\nexport interface ReceiveOptions {\n\tsource: Source;\n\tcolorFormat?: ColorFormat;\n\tbandwidth?: Bandwidth;\n\t/**\n\t * If `colorFormat` is `ColorFormat.Fastest` or `ColorFormat.Best`, the NDI SDK\n\t * implicitly enables video fields and this option is forced to `true`.\n\t */\n\tallowVideoFields?: boolean;\n\tname?: string;\n}\n\nexport interface SendOptions {\n\tname: string;\n\tgroups?: string;\n\tclockVideo?: boolean;\n\tclockAudio?: boolean;\n}\n\nexport interface Grandi {\n\t/**\n\t * Gets the NDI SDK version string (e.g. `\"NDI SDK 6.0.0.0\"`).\n\t * @returns The NDI SDK version string.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * console.log(grandi.version());\n\t * ```\n\t */\n\tversion(): string;\n\t/**\n\t * Checks if the current CPU architecture is supported by NDI.\n\t * @returns `true` when NDI is supported on this CPU/platform.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * if (!grandi.isSupportedCPU()) throw new Error(\"NDI unsupported here\");\n\t * ```\n\t */\n\tisSupportedCPU(): boolean;\n\t/**\n\t * Initializes the NDI library. Must be called before using any other NDI functions.\n\t * Call this once per process, before creating senders/receivers/finders.\n\t * @returns `true` if initialization was successful.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * if (!grandi.initialize()) throw new Error(\"NDI init failed\");\n\t * ```\n\t */\n\tinitialize(): boolean;\n\t/**\n\t * Destroys the NDI library instance and cleans up resources.\n\t * Should be called when done using NDI to free resources.\n\t * @returns `true` if destruction was successful.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.destroy();\n\t * ```\n\t */\n\tdestroy(): boolean;\n\t/**\n\t * Creates an NDI sender for transmitting video and audio over the network.\n\t * @param params Sender options.\n\t * @returns A promise that resolves to a Sender instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if sender creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const sender = await grandi.send({ name: \"My Source\" });\n\t * ```\n\t */\n\tsend(params: SendOptions): Promise<Sender>;\n\t/**\n\t * Creates an NDI receiver for receiving video and audio from an NDI source.\n\t * @param params Receiver options.\n\t * @returns A promise that resolves to a Receiver instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if receiver creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const finder = await grandi.find({ showLocalSources: true });\n\t * finder.wait(1000);\n\t * const source = finder.sources()[0];\n\t * finder.destroy();\n\t * const receiver = await grandi.receive({ source });\n\t * const frame = await receiver.video(1000);\n\t * receiver.destroy();\n\t * ```\n\t */\n\treceive(params: ReceiveOptions): Promise<Receiver>;\n\t/**\n\t * Creates an NDI frame-synchronizer (time base corrector) backed by an existing receiver.\n\t * Use this when you want smooth playback clocked to your own render/audio loop.\n\t *\n\t * Note: destroy the frame-sync before destroying the receiver.\n\t */\n\tframesync(receiver: Receiver): Promise<FrameSync>;\n\t/**\n\t * Creates an NDI router for switching between different NDI sources.\n\t * @param params Router options.\n\t * @returns A promise that resolves to a Routing instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if routing creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const router = await grandi.routing({ name: \"My Router\" });\n\t * // router.change(source) to route a discovered source\n\t * router.destroy();\n\t * ```\n\t */\n\trouting(params: { name?: string; groups?: string }): Promise<Routing>;\n\t/**\n\t * Creates a finder to discover NDI sources on the network.\n\t * @param params Discovery options.\n\t * @returns A promise that resolves to a Finder instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if the finder cannot be created.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const finder = await grandi.find({ showLocalSources: true });\n\t * finder.wait(1000);\n\t * console.log(finder.sources());\n\t * finder.destroy();\n\t * ```\n\t */\n\tfind(params?: FindOptions): Promise<Finder>;\n\n\t/**\n\t * Enum: receiver video color formats.\n\t */\n\tColorFormat: typeof ColorFormat;\n\t/**\n\t * Enum: supported raw audio formats for helpers/receive conversions.\n\t */\n\tAudioFormat: typeof AudioFormat;\n\t/**\n\t * Enum: receiver bandwidth modes.\n\t */\n\tBandwidth: typeof Bandwidth;\n\t/**\n\t * Enum: video frame format types (progressive/interlaced/fields).\n\t */\n\tFrameType: typeof FrameType;\n\t/**\n\t * Enum: FourCC pixel/audio formats used in frames.\n\t */\n\tFourCC: typeof FourCC;\n\n\t// Constant aliases for backwards compatibility / convenience.\n\t/**\n\t * Alias of `ColorFormat.BGRX_BGRA`.\n\t */\n\tCOLOR_FORMAT_BGRX_BGRA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.UYVY_BGRA`.\n\t */\n\tCOLOR_FORMAT_UYVY_BGRA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.RGBX_RGBA`.\n\t */\n\tCOLOR_FORMAT_RGBX_RGBA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.UYVY_RGBA`.\n\t */\n\tCOLOR_FORMAT_UYVY_RGBA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.Fastest`.\n\t */\n\tCOLOR_FORMAT_FASTEST: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.BGRX_BGRA_FLIPPED` (Windows-only).\n\t */\n\tCOLOR_FORMAT_BGRX_BGRA_FLIPPED: ColorFormat;\n\n\t/**\n\t * Alias of `Bandwidth.MetadataOnly`.\n\t */\n\tBANDWIDTH_METADATA_ONLY: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.AudioOnly`.\n\t */\n\tBANDWIDTH_AUDIO_ONLY: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.Lowest`.\n\t */\n\tBANDWIDTH_LOWEST: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.Highest`.\n\t */\n\tBANDWIDTH_HIGHEST: Bandwidth;\n\n\t/**\n\t * Alias of `FrameType.Progressive`.\n\t */\n\tFORMAT_TYPE_PROGRESSIVE: FrameType;\n\t/**\n\t * Alias of `FrameType.Interlaced`.\n\t */\n\tFORMAT_TYPE_INTERLACED: FrameType;\n\t/**\n\t * Alias of `FrameType.Field0`.\n\t */\n\tFORMAT_TYPE_FIELD_0: FrameType;\n\t/**\n\t * Alias of `FrameType.Field1`.\n\t */\n\tFORMAT_TYPE_FIELD_1: FrameType;\n\n\t/**\n\t * Alias of `AudioFormat.Float32Separate`.\n\t */\n\tAUDIO_FORMAT_FLOAT_32_SEPARATE: AudioFormat;\n\t/**\n\t * Alias of `AudioFormat.Float32Interleaved`.\n\t */\n\tAUDIO_FORMAT_FLOAT_32_INTERLEAVED: AudioFormat;\n\t/**\n\t * Alias of `AudioFormat.Int16Interleaved`.\n\t */\n\tAUDIO_FORMAT_INT_16_INTERLEAVED: AudioFormat;\n\n\t/**\n\t * Alias of `FourCC.UYVY`.\n\t */\n\tFOURCC_UYVY: FourCC;\n\t/**\n\t * Alias of `FourCC.UYVA`.\n\t */\n\tFOURCC_UYVA: FourCC;\n\t/**\n\t * Alias of `FourCC.P216`.\n\t */\n\tFOURCC_P216: FourCC;\n\t/**\n\t * Alias of `FourCC.PA16`.\n\t */\n\tFOURCC_PA16: FourCC;\n\t/**\n\t * Alias of `FourCC.YV12`.\n\t */\n\tFOURCC_YV12: FourCC;\n\t/**\n\t * Alias of `FourCC.I420`.\n\t */\n\tFOURCC_I420: FourCC;\n\t/**\n\t * Alias of `FourCC.NV12`.\n\t */\n\tFOURCC_NV12: FourCC;\n\t/**\n\t * Alias of `FourCC.BGRA`.\n\t */\n\tFOURCC_BGRA: FourCC;\n\t/**\n\t * Alias of `FourCC.BGRX`.\n\t */\n\tFOURCC_BGRX: FourCC;\n\t/**\n\t * Alias of `FourCC.RGBA`.\n\t */\n\tFOURCC_RGBA: FourCC;\n\t/**\n\t * Alias of `FourCC.RGBX`.\n\t */\n\tFOURCC_RGBX: FourCC;\n\t/**\n\t * Alias of `FourCC.FLTp`.\n\t */\n\tFOURCC_FLTp: FourCC;\n}\n","import path from \"node:path\";\nimport nodeGypBuild from \"node-gyp-build\";\n\nimport type {\n\tFinder,\n\tFindOptions,\n\tFrameSync,\n\tGrandi,\n\tReceiveOptions,\n\tReceiver,\n\tRouting,\n\tSender,\n\tSendOptions,\n} from \"./types\";\nimport {\n\tAudioFormat,\n\tBandwidth,\n\tColorFormat,\n\tFourCC,\n\tFrameType,\n} from \"./types\";\n\n/**\n * Checks if the current platform and architecture are supported by NDI.\n * @returns {boolean} True if the platform is supported (darwin, linux, or win32 with ia32/x64), false otherwise.\n */\nfunction isSupportedPlatform(): boolean {\n\treturn (\n\t\tprocess.platform === \"darwin\" ||\n\t\tprocess.platform === \"linux\" ||\n\t\t(process.platform === \"win32\" && [\"ia32\", \"x64\"].includes(process.arch))\n\t);\n}\n\nfunction tryRequireArchPackage(): GrandiAddon | null {\n\tconst archKey = `${process.platform}-${process.arch}`;\n\tconst map: Record<string, string> = {\n\t\t\"linux-x64\": \"@grandi/linux-x64\",\n\t\t\"linux-arm64\": \"@grandi/linux-arm64\",\n\t\t\"linux-arm\": \"@grandi/linux-armv7l\",\n\t\t\"win32-x64\": \"@grandi/win32-x64\",\n\t\t\"win32-ia32\": \"@grandi/win32-ia32\",\n\t\t\"darwin-x64\": \"@grandi/darwin-universal\",\n\t\t\"darwin-arm64\": \"@grandi/darwin-universal\",\n\t};\n\tconst pkg = map[archKey];\n\tif (!pkg) throw new Error(`Unsupported platform or architecture: ${archKey}`);\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-var-requires\n\t\treturn require(pkg) as GrandiAddon;\n\t} catch {\n\t\tthrow new Error(\n\t\t\t`Failed to find prebuilt package for ${archKey}. Please ensure that the package \"${pkg}\" is installed`,\n\t\t);\n\t}\n}\n\nfunction loadAddon(): GrandiAddon {\n\tconst loadErrors: Error[] = [];\n\tif (!isSupportedPlatform()) {\n\t\tconsole.error(\n\t\t\t`Unsupported platform or architecture: ${process.platform}-${process.arch}`,\n\t\t);\n\t\treturn noopAddon;\n\t}\n\ttry {\n\t\tconst localBinding = nodeGypBuild(\n\t\t\tpath.join(__dirname, \"..\"),\n\t\t) as GrandiAddon;\n\t\tif (localBinding) return localBinding;\n\t} catch (err) {\n\t\tloadErrors.push(err as Error);\n\t}\n\ttry {\n\t\tconst archAddon = tryRequireArchPackage();\n\t\tif (archAddon) return archAddon;\n\t} catch (err) {\n\t\tloadErrors.push(err as Error);\n\t}\n\n\tif (loadErrors.length > 0) {\n\t\tconst aggregateError = new Error(\n\t\t\t\"Failed to load native addon:\\n\" +\n\t\t\t\tloadErrors.map((e, i) => ` [${i + 1}] ${e.message}`).join(\"\\n\"),\n\t\t);\n\t\tconsole.error(aggregateError);\n\t}\n\treturn noopAddon;\n}\n\nexport interface GrandiAddon {\n\tversion(): string;\n\tisSupportedCPU(): boolean;\n\tinitialize(): boolean;\n\tdestroy(): boolean;\n\tfind(params?: FindOptions): Promise<Finder>;\n\treceive(params: ReceiveOptions): Promise<Receiver>;\n\tframesync(receiver: Receiver): Promise<FrameSync>;\n\tsend(params: SendOptions): Promise<Sender>;\n\trouting(params: { name?: string; groups?: string }): Promise<Routing>;\n}\n\nconst noopAddon: GrandiAddon = {\n\tversion() {\n\t\treturn \"\";\n\t},\n\tisSupportedCPU() {\n\t\treturn false;\n\t},\n\tinitialize() {\n\t\treturn false;\n\t},\n\tdestroy() {\n\t\treturn false;\n\t},\n\tsend(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\treceive(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\tframesync(_receiver) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\trouting() {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\tfind(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n};\n\nconst addon: GrandiAddon = loadAddon();\n/**\n * Creates a finder to discover NDI sources on the network.\n * @param {FindOptions} [params={}] - Options for finding sources.\n * @param {boolean} [params.showLocalSources] - Whether to show local sources.\n * @param {string} [params.groups] - Multicast groups to search in.\n * @param {string} [params.extraIPs] - Additional IP addresses to search.\n * @returns {Promise<Finder>} A promise that resolves to a Finder instance for discovering sources.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if the finder cannot be created.\n *\n * @example\n * ```js\n * import { find, initialize } from \"grandi\";\n * initialize();\n * const finder = await find({ showLocalSources: true });\n * finder.wait(1000);\n * console.log(finder.sources());\n * finder.destroy();\n * ```\n */\nexport function find(params: FindOptions = {}): Promise<Finder> {\n\treturn addon.find(params);\n}\n// Named runtime exports\n/**\n * Gets the version of the NDI SDK.\n * @returns {string} The NDI SDK version string.\n */\nexport const version = addon.version;\n/**\n * Checks if the current CPU architecture is supported by NDI.\n * @returns {boolean} True if the CPU is supported, false otherwise.\n */\nexport const isSupportedCPU = addon.isSupportedCPU;\n/**\n * Initializes the NDI library. Must be called before using any other NDI functions.\n * @returns {boolean} True if initialization was successful, false otherwise.\n *\n * @example\n * ```js\n * import { initialize } from \"grandi\";\n * if (!initialize()) throw new Error(\"NDI init failed\");\n * ```\n */\nexport const initialize = addon.initialize;\n/**\n * Destroys the NDI library instance and cleans up resources.\n * Should be called when done using NDI to free resources.\n * @returns {boolean} True if destruction was successful, false otherwise.\n *\n * @example\n * ```js\n * import { destroy } from \"grandi\";\n * destroy();\n * ```\n */\nexport const destroy = addon.destroy;\n/**\n * Creates an NDI sender for transmitting video and audio over the network.\n * @param {SendOptions} params - Options for creating the sender.\n * @param {string} params.name - The name of the NDI source.\n * @param {string} [params.groups] - Multicast groups to send to.\n * @param {boolean} [params.clockVideo] - Whether to clock video frames.\n * @param {boolean} [params.clockAudio] - Whether to clock audio frames.\n * @returns {Promise<Sender>} A promise that resolves to a Sender instance for transmitting data.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if sender creation fails.\n *\n * @example\n * ```js\n * import { initialize, send } from \"grandi\";\n * initialize();\n * const sender = await send({ name: \"My Source\" });\n * // sender.video(...) / sender.audio(...)\n * sender.destroy();\n * ```\n */\nexport const send = addon.send;\n/**\n * Creates an NDI receiver for receiving video and audio from an NDI source.\n * @param {ReceiveOptions} params - Options for creating the receiver.\n * @param {ReceiveOptions[\"source\"]} params.source - The NDI source to connect to.\n * @param {ReceiveOptions[\"colorFormat\"]} [params.colorFormat] - The color format for received video.\n * @param {ReceiveOptions[\"bandwidth\"]} [params.bandwidth] - The bandwidth limitation for the connection.\n * @param {boolean} [params.allowVideoFields] - Whether to allow video fields.\n * @param {string} [params.name] - The name for the receiver.\n * @returns {Promise<Receiver>} A promise that resolves to a Receiver instance for receiving data.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if receiver creation fails.\n *\n * @example\n * ```js\n * import { find, initialize, receive } from \"grandi\";\n * initialize();\n * const finder = await find({ showLocalSources: true });\n * finder.wait(1000);\n * const source = finder.sources()[0];\n * finder.destroy();\n * const receiver = await receive({ source });\n * const frame = await receiver.video(1000);\n * receiver.destroy();\n * ```\n */\nexport const receive = addon.receive;\n/**\n * Creates an NDI frame-synchronizer (time base corrector) backed by an existing receiver.\n * Use this when you want smooth playback clocked to your own render/audio loop.\n *\n * Note: destroy the frame-sync before destroying the receiver.\n * @param {Receiver} receiver - The receiver instance to frame-sync.\n * @returns {Promise<FrameSync>} A promise that resolves to a FrameSync instance.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if framesync creation fails.\n *\n * @example\n * ```js\n * import grandi from \"grandi\";\n * grandi.initialize();\n * const receiver = await grandi.receive({ source });\n * const fs = await grandi.framesync(receiver);\n * const frame = await fs.video(grandi.FrameType.Progressive);\n * fs.destroy();\n * receiver.destroy();\n * ```\n */\nexport const framesync = addon.framesync;\n/**\n * Creates an NDI router for switching between different NDI sources.\n * @param {Object} params - Options for creating the router.\n * @param {string} [params.name] - The name for the router.\n * @param {string} [params.groups] - Multicast groups for the router.\n * @returns {Promise<Routing>} A promise that resolves to a Routing instance for source switching.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if routing creation fails.\n *\n * @example\n * ```js\n * import { initialize, routing } from \"grandi\";\n * initialize();\n * const router = await routing({ name: \"My Router\" });\n * // router.change(source)\n * router.destroy();\n * ```\n */\nexport const routing = addon.routing;\n\n// Re-export enums and types for convenient named imports\nexport { ColorFormat, AudioFormat, Bandwidth, FrameType, FourCC };\nexport type {\n\tAudioFrame,\n\tAudioReceiveOptions,\n\tFinder,\n\tFindOptions,\n\tFrameSync,\n\tFrameSyncAudioOptions,\n\tGrandi,\n\tPtpTimestamp,\n\tReceivedAudioFrame,\n\tReceivedMetadataFrame,\n\tReceivedVideoFrame,\n\tReceiveOptions,\n\tReceiverDataFrame,\n\tReceiverTallyState,\n\tRouting,\n\tSender,\n\tSenderTally,\n\tSource,\n\tSourceChangeEvent,\n\tStatusChangeEvent,\n\tTimecode,\n\tTimeoutEvent,\n\tVideoFrame,\n} from \"./types\";\n\nconst grandi: Grandi = {\n\tversion,\n\tisSupportedCPU,\n\tinitialize,\n\tdestroy,\n\tsend,\n\treceive,\n\tframesync,\n\trouting,\n\tfind,\n\tColorFormat,\n\tAudioFormat,\n\tBandwidth,\n\tFrameType,\n\tFourCC,\n\n\t// Constants mapped to enum values\n\tCOLOR_FORMAT_BGRX_BGRA: ColorFormat.BGRX_BGRA,\n\tCOLOR_FORMAT_UYVY_BGRA: ColorFormat.UYVY_BGRA,\n\tCOLOR_FORMAT_RGBX_RGBA: ColorFormat.RGBX_RGBA,\n\tCOLOR_FORMAT_UYVY_RGBA: ColorFormat.UYVY_RGBA,\n\tCOLOR_FORMAT_FASTEST: ColorFormat.Fastest,\n\tCOLOR_FORMAT_BGRX_BGRA_FLIPPED: ColorFormat.BGRX_BGRA_FLIPPED,\n\n\tBANDWIDTH_METADATA_ONLY: Bandwidth.MetadataOnly,\n\tBANDWIDTH_AUDIO_ONLY: Bandwidth.AudioOnly,\n\tBANDWIDTH_LOWEST: Bandwidth.Lowest,\n\tBANDWIDTH_HIGHEST: Bandwidth.Highest,\n\n\tFORMAT_TYPE_PROGRESSIVE: FrameType.Progressive,\n\tFORMAT_TYPE_INTERLACED: FrameType.Interlaced,\n\tFORMAT_TYPE_FIELD_0: FrameType.Field0,\n\tFORMAT_TYPE_FIELD_1: FrameType.Field1,\n\n\tAUDIO_FORMAT_FLOAT_32_SEPARATE: AudioFormat.Float32Separate,\n\tAUDIO_FORMAT_FLOAT_32_INTERLEAVED: AudioFormat.Float32Interleaved,\n\tAUDIO_FORMAT_INT_16_INTERLEAVED: AudioFormat.Int16Interleaved,\n\n\t// FourCC helpers/constants\n\tFOURCC_UYVY: FourCC.UYVY,\n\tFOURCC_UYVA: FourCC.UYVA,\n\tFOURCC_P216: FourCC.P216,\n\tFOURCC_PA16: FourCC.PA16,\n\tFOURCC_YV12: FourCC.YV12,\n\tFOURCC_I420: FourCC.I420,\n\tFOURCC_NV12: FourCC.NV12,\n\tFOURCC_BGRA: FourCC.BGRA,\n\tFOURCC_BGRX: FourCC.BGRX,\n\tFOURCC_RGBA: FourCC.RGBA,\n\tFOURCC_RGBX: FourCC.RGBX,\n\tFOURCC_FLTp: FourCC.FLTp,\n};\n\nexport default grandi;\n"],"x_google_ignoreList":[0],"mappings":"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"}
1
+ {"version":3,"file":"index.mjs","names":["loadErrors: Error[]","noopAddon: GrandiAddon","addon: GrandiAddon","grandi: Grandi"],"sources":["../node_modules/tsdown/esm-shims.js","../src/types.ts","../src/index.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","export enum FrameType {\n\tInterlaced = 0,\n\tProgressive = 1,\n\tField0 = 2,\n\tField1 = 3,\n}\n\nexport enum ColorFormat {\n\tBGRX_BGRA = 0,\n\tUYVY_BGRA = 1,\n\tRGBX_RGBA = 2,\n\tUYVY_RGBA = 3,\n\tFastest = 100,\n\tBest = 101,\n\t// Windows-only NDI SDK extension: 1000 + BGRX_BGRA.\n\tBGRX_BGRA_FLIPPED = 1000,\n}\n\nexport enum AudioFormat {\n\tFloat32Separate = 0,\n\tFloat32Interleaved = 1,\n\tInt16Interleaved = 2,\n}\n\nexport enum Bandwidth {\n\tMetadataOnly = -10,\n\tAudioOnly = 10,\n\tLowest = 0,\n\tHighest = 100,\n}\n\nexport enum FourCC {\n\tUYVY = 1498831189,\n\tUYVA = 1096178005,\n\tP216 = 909193808,\n\tPA16 = 909197648,\n\tYV12 = 842094169,\n\tI420 = 808596553,\n\tNV12 = 842094158,\n\tBGRA = 1095911234,\n\tBGRX = 1481787202,\n\tRGBA = 1094862674,\n\tRGBX = 1480738642,\n\tFLTp = 1884572742,\n}\n\nexport type PtpTimestamp = [number, number]; // [seconds, nanoseconds]\nexport type Timecode = bigint | number | PtpTimestamp;\n\nexport interface Source {\n\tname: string;\n\turlAddress?: string;\n}\n\nexport interface VideoFrame {\n\ttype?: \"video\";\n\txres: number;\n\tyres: number;\n\tframeRateN: number;\n\tframeRateD: number;\n\tpictureAspectRatio: number;\n\tfourCC: FourCC;\n\tframeFormatType: FrameType;\n\tlineStrideBytes: number;\n\tdata: Buffer;\n\ttimecode?: Timecode;\n\t/**\n\t * Receive-only timestamp filled by the NDI SDK (UTC time, 100ns units under the hood).\n\t * NDI ignores this field when sending.\n\t */\n\ttimestamp?: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedVideoFrame extends VideoFrame {\n\ttype: \"video\";\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface AudioFrame {\n\ttype?: \"audio\";\n\tsampleRate: number;\n\tnoChannels: number;\n\tnoSamples: number;\n\tchannelStrideBytes: number;\n\tdata: Buffer;\n\tfourCC: FourCC;\n\ttimecode?: Timecode;\n\t/**\n\t * Receive-only timestamp filled by the NDI SDK (UTC time, 100ns units under the hood).\n\t * NDI ignores this field when sending.\n\t */\n\ttimestamp?: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedAudioFrame {\n\ttype: \"audio\";\n\taudioFormat: AudioFormat;\n\treferenceLevel?: number;\n\tsampleRate: number;\n\tchannels: number;\n\tsamples: number;\n\tchannelStrideInBytes: number;\n\tdata: Buffer;\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tmetadata?: string;\n}\n\nexport interface ReceivedMetadataFrame {\n\ttype: \"metadata\";\n\tlength: number;\n\ttimecode: PtpTimestamp;\n\ttimestamp: PtpTimestamp;\n\tdata: string;\n}\n\nexport interface SourceChangeEvent {\n\ttype: \"sourceChange\";\n}\n\nexport interface StatusChangeEvent {\n\ttype: \"statusChange\";\n}\n\nexport interface TimeoutEvent {\n\ttype: \"timeout\";\n}\n\nexport type ReceiverDataFrame =\n\t| ReceivedVideoFrame\n\t| ReceivedAudioFrame\n\t| ReceivedMetadataFrame\n\t| SourceChangeEvent\n\t| StatusChangeEvent\n\t| TimeoutEvent;\n\nexport interface AudioReceiveOptions {\n\taudioFormat?: AudioFormat;\n\treferenceLevel?: number;\n}\n\nexport interface Receiver {\n\tembedded: unknown;\n\tsource: Source;\n\tcolorFormat: ColorFormat;\n\tbandwidth: Bandwidth;\n\tallowVideoFields: boolean;\n\tname?: string;\n\tvideo(timeoutMs?: number): Promise<ReceivedVideoFrame>;\n\taudio(timeoutMs?: number): Promise<ReceivedAudioFrame>;\n\taudio(\n\t\toptions: AudioReceiveOptions,\n\t\ttimeoutMs?: number,\n\t): Promise<ReceivedAudioFrame>;\n\tmetadata(timeoutMs?: number): Promise<ReceivedMetadataFrame>;\n\tdata(timeoutMs?: number): Promise<ReceiverDataFrame>;\n\tdata(\n\t\toptions: AudioReceiveOptions,\n\t\ttimeoutMs?: number,\n\t): Promise<ReceiverDataFrame>;\n\ttally(state: ReceiverTallyState): boolean;\n\tdestroy(): boolean;\n}\n\nexport interface ReceiverTallyState {\n\tonProgram?: boolean;\n\tonPreview?: boolean;\n}\n\nexport interface SenderTally {\n\tchanged: boolean;\n\ton_program: boolean;\n\ton_preview: boolean;\n}\n\nexport interface Sender {\n\tembedded: unknown;\n\tname: string;\n\tgroups?: string;\n\tclockVideo: boolean;\n\tclockAudio: boolean;\n\tvideo(frame: VideoFrame): Promise<void>;\n\taudio(frame: AudioFrame): Promise<void>;\n\tconnections(): number;\n\tmetadata(data: string): boolean;\n\ttally(): SenderTally;\n\tsourcename(): string;\n\tdestroy(): boolean;\n}\n\nexport interface Routing {\n\tembedded: unknown;\n\tname?: string;\n\tgroups?: string;\n\tdestroy(): boolean;\n\tchange(source: Source): boolean;\n\tclear(): boolean;\n\tconnections(): number;\n\tsourcename(): string;\n}\n\nexport interface FrameSyncAudioOptions {\n\tsampleRate?: number;\n\tnoChannels?: number;\n\tnoSamples?: number;\n}\n\nexport interface FrameSync {\n\tembedded: unknown;\n\t/**\n\t * Captures a video frame using NDI frame-synchronization (time base correction).\n\t * Always returns immediately.\n\t *\n\t * If no video has ever been received, resolves with `{ type: \"timeout\" }`.\n\t */\n\tvideo(fieldType?: FrameType): Promise<ReceivedVideoFrame | TimeoutEvent>;\n\t/**\n\t * Captures audio using NDI frame-synchronization (resampled to match your calls).\n\t * Always returns immediately and may insert silence if no audio is present.\n\t */\n\taudio(options?: FrameSyncAudioOptions): Promise<ReceivedAudioFrame>;\n\t/**\n\t * Returns an approximate depth of the internal audio queue in samples.\n\t */\n\taudioQueueDepth(): number;\n\tdestroy(): boolean;\n}\n\nexport interface Finder {\n\tsources(): Source[];\n\twait(timeoutMs?: number): boolean;\n\tdestroy(): boolean;\n}\n\nexport interface FindOptions {\n\tshowLocalSources?: boolean;\n\tgroups?: string;\n\textraIPs?: string;\n}\n\nexport interface ReceiveOptions {\n\tsource: Source;\n\tcolorFormat?: ColorFormat;\n\tbandwidth?: Bandwidth;\n\t/**\n\t * If `colorFormat` is `ColorFormat.Fastest` or `ColorFormat.Best`, the NDI SDK\n\t * implicitly enables video fields and this option is forced to `true`.\n\t */\n\tallowVideoFields?: boolean;\n\tname?: string;\n}\n\nexport interface SendOptions {\n\tname: string;\n\tgroups?: string;\n\tclockVideo?: boolean;\n\tclockAudio?: boolean;\n}\n\nexport interface Grandi {\n\t/**\n\t * Gets the NDI SDK version string (e.g. `\"NDI SDK 6.0.0.0\"`).\n\t * @returns The NDI SDK version string.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * console.log(grandi.version());\n\t * ```\n\t */\n\tversion(): string;\n\t/**\n\t * Checks if the current CPU architecture is supported by NDI.\n\t * @returns `true` when NDI is supported on this CPU/platform.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * if (!grandi.isSupportedCPU()) throw new Error(\"NDI unsupported here\");\n\t * ```\n\t */\n\tisSupportedCPU(): boolean;\n\t/**\n\t * Initializes the NDI library. Must be called before using any other NDI functions.\n\t * Call this once per process, before creating senders/receivers/finders.\n\t * @returns `true` if initialization was successful.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * if (!grandi.initialize()) throw new Error(\"NDI init failed\");\n\t * ```\n\t */\n\tinitialize(): boolean;\n\t/**\n\t * Destroys the NDI library instance and cleans up resources.\n\t * Should be called when done using NDI to free resources.\n\t * @returns `true` if destruction was successful.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.destroy();\n\t * ```\n\t */\n\tdestroy(): boolean;\n\t/**\n\t * Creates an NDI sender for transmitting video and audio over the network.\n\t * @param params Sender options.\n\t * @returns A promise that resolves to a Sender instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if sender creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const sender = await grandi.send({ name: \"My Source\" });\n\t * ```\n\t */\n\tsend(params: SendOptions): Promise<Sender>;\n\t/**\n\t * Creates an NDI receiver for receiving video and audio from an NDI source.\n\t * @param params Receiver options.\n\t * @returns A promise that resolves to a Receiver instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if receiver creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const finder = await grandi.find({ showLocalSources: true });\n\t * finder.wait(1000);\n\t * const source = finder.sources()[0];\n\t * finder.destroy();\n\t * const receiver = await grandi.receive({ source });\n\t * const frame = await receiver.video(1000);\n\t * receiver.destroy();\n\t * ```\n\t */\n\treceive(params: ReceiveOptions): Promise<Receiver>;\n\t/**\n\t * Creates an NDI frame-synchronizer (time base corrector) backed by an existing receiver.\n\t * Use this when you want smooth playback clocked to your own render/audio loop.\n\t *\n\t * Note: destroy the frame-sync before destroying the receiver.\n\t */\n\tframesync(receiver: Receiver): Promise<FrameSync>;\n\t/**\n\t * Creates an NDI router for switching between different NDI sources.\n\t * @param params Router options.\n\t * @returns A promise that resolves to a Routing instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if routing creation fails.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const router = await grandi.routing({ name: \"My Router\" });\n\t * // router.change(source) to route a discovered source\n\t * router.destroy();\n\t * ```\n\t */\n\trouting(params: { name?: string; groups?: string }): Promise<Routing>;\n\t/**\n\t * Creates a finder to discover NDI sources on the network.\n\t * @param params Discovery options.\n\t * @returns A promise that resolves to a Finder instance.\n\t * @throws {Error} Promise rejects on unsupported platform/CPU or if the finder cannot be created.\n\t *\n\t * @example\n\t * ```js\n\t * import grandi from \"grandi\";\n\t * grandi.initialize();\n\t * const finder = await grandi.find({ showLocalSources: true });\n\t * finder.wait(1000);\n\t * console.log(finder.sources());\n\t * finder.destroy();\n\t * ```\n\t */\n\tfind(params?: FindOptions): Promise<Finder>;\n\n\t/**\n\t * Enum: receiver video color formats.\n\t */\n\tColorFormat: typeof ColorFormat;\n\t/**\n\t * Enum: supported raw audio formats for helpers/receive conversions.\n\t */\n\tAudioFormat: typeof AudioFormat;\n\t/**\n\t * Enum: receiver bandwidth modes.\n\t */\n\tBandwidth: typeof Bandwidth;\n\t/**\n\t * Enum: video frame format types (progressive/interlaced/fields).\n\t */\n\tFrameType: typeof FrameType;\n\t/**\n\t * Enum: FourCC pixel/audio formats used in frames.\n\t */\n\tFourCC: typeof FourCC;\n\n\t// Constant aliases for backwards compatibility / convenience.\n\t/**\n\t * Alias of `ColorFormat.BGRX_BGRA`.\n\t */\n\tCOLOR_FORMAT_BGRX_BGRA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.UYVY_BGRA`.\n\t */\n\tCOLOR_FORMAT_UYVY_BGRA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.RGBX_RGBA`.\n\t */\n\tCOLOR_FORMAT_RGBX_RGBA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.UYVY_RGBA`.\n\t */\n\tCOLOR_FORMAT_UYVY_RGBA: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.Fastest`.\n\t */\n\tCOLOR_FORMAT_FASTEST: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.Best`.\n\t */\n\tCOLOR_FORMAT_BEST: ColorFormat;\n\t/**\n\t * Alias of `ColorFormat.BGRX_BGRA_FLIPPED` (Windows-only).\n\t */\n\tCOLOR_FORMAT_BGRX_BGRA_FLIPPED: ColorFormat;\n\n\t/**\n\t * Alias of `Bandwidth.MetadataOnly`.\n\t */\n\tBANDWIDTH_METADATA_ONLY: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.AudioOnly`.\n\t */\n\tBANDWIDTH_AUDIO_ONLY: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.Lowest`.\n\t */\n\tBANDWIDTH_LOWEST: Bandwidth;\n\t/**\n\t * Alias of `Bandwidth.Highest`.\n\t */\n\tBANDWIDTH_HIGHEST: Bandwidth;\n\n\t/**\n\t * Alias of `FrameType.Progressive`.\n\t */\n\tFORMAT_TYPE_PROGRESSIVE: FrameType;\n\t/**\n\t * Alias of `FrameType.Interlaced`.\n\t */\n\tFORMAT_TYPE_INTERLACED: FrameType;\n\t/**\n\t * Alias of `FrameType.Field0`.\n\t */\n\tFORMAT_TYPE_FIELD_0: FrameType;\n\t/**\n\t * Alias of `FrameType.Field1`.\n\t */\n\tFORMAT_TYPE_FIELD_1: FrameType;\n\n\t/**\n\t * Alias of `AudioFormat.Float32Separate`.\n\t */\n\tAUDIO_FORMAT_FLOAT_32_SEPARATE: AudioFormat;\n\t/**\n\t * Alias of `AudioFormat.Float32Interleaved`.\n\t */\n\tAUDIO_FORMAT_FLOAT_32_INTERLEAVED: AudioFormat;\n\t/**\n\t * Alias of `AudioFormat.Int16Interleaved`.\n\t */\n\tAUDIO_FORMAT_INT_16_INTERLEAVED: AudioFormat;\n\n\t/**\n\t * Alias of `FourCC.UYVY`.\n\t */\n\tFOURCC_UYVY: FourCC;\n\t/**\n\t * Alias of `FourCC.UYVA`.\n\t */\n\tFOURCC_UYVA: FourCC;\n\t/**\n\t * Alias of `FourCC.P216`.\n\t */\n\tFOURCC_P216: FourCC;\n\t/**\n\t * Alias of `FourCC.PA16`.\n\t */\n\tFOURCC_PA16: FourCC;\n\t/**\n\t * Alias of `FourCC.YV12`.\n\t */\n\tFOURCC_YV12: FourCC;\n\t/**\n\t * Alias of `FourCC.I420`.\n\t */\n\tFOURCC_I420: FourCC;\n\t/**\n\t * Alias of `FourCC.NV12`.\n\t */\n\tFOURCC_NV12: FourCC;\n\t/**\n\t * Alias of `FourCC.BGRA`.\n\t */\n\tFOURCC_BGRA: FourCC;\n\t/**\n\t * Alias of `FourCC.BGRX`.\n\t */\n\tFOURCC_BGRX: FourCC;\n\t/**\n\t * Alias of `FourCC.RGBA`.\n\t */\n\tFOURCC_RGBA: FourCC;\n\t/**\n\t * Alias of `FourCC.RGBX`.\n\t */\n\tFOURCC_RGBX: FourCC;\n\t/**\n\t * Alias of `FourCC.FLTp`.\n\t */\n\tFOURCC_FLTp: FourCC;\n}\n","import path from \"node:path\";\nimport nodeGypBuild from \"node-gyp-build\";\n\nimport type {\n\tFinder,\n\tFindOptions,\n\tFrameSync,\n\tGrandi,\n\tReceiveOptions,\n\tReceiver,\n\tRouting,\n\tSender,\n\tSendOptions,\n} from \"./types\";\nimport {\n\tAudioFormat,\n\tBandwidth,\n\tColorFormat,\n\tFourCC,\n\tFrameType,\n} from \"./types\";\n\n/**\n * Checks if the current platform and architecture are supported by NDI.\n * @returns {boolean} True if the platform is supported (darwin, linux, or win32 with ia32/x64), false otherwise.\n */\nfunction isSupportedPlatform(): boolean {\n\treturn (\n\t\tprocess.platform === \"darwin\" ||\n\t\tprocess.platform === \"linux\" ||\n\t\t(process.platform === \"win32\" && [\"ia32\", \"x64\"].includes(process.arch))\n\t);\n}\n\nfunction tryRequireArchPackage(): GrandiAddon | null {\n\tconst archKey = `${process.platform}-${process.arch}`;\n\tconst map: Record<string, string> = {\n\t\t\"linux-x64\": \"@grandi/linux-x64\",\n\t\t\"linux-arm64\": \"@grandi/linux-arm64\",\n\t\t\"linux-arm\": \"@grandi/linux-armv7l\",\n\t\t\"win32-x64\": \"@grandi/win32-x64\",\n\t\t\"win32-ia32\": \"@grandi/win32-ia32\",\n\t\t\"darwin-x64\": \"@grandi/darwin-x64\",\n\t\t\"darwin-arm64\": \"@grandi/darwin-arm64\",\n\t};\n\tconst pkg = map[archKey];\n\tif (!pkg) throw new Error(`Unsupported platform or architecture: ${archKey}`);\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-var-requires\n\t\treturn require(pkg) as GrandiAddon;\n\t} catch {\n\t\tthrow new Error(\n\t\t\t`Failed to find prebuilt package for ${archKey}. Please ensure that the package \"${pkg}\" is installed`,\n\t\t);\n\t}\n}\n\nfunction loadAddon(): GrandiAddon {\n\tconst loadErrors: Error[] = [];\n\tif (!isSupportedPlatform()) {\n\t\tconsole.error(\n\t\t\t`Unsupported platform or architecture: ${process.platform}-${process.arch}`,\n\t\t);\n\t\treturn noopAddon;\n\t}\n\n\ttry {\n\t\tconst localBinding = nodeGypBuild(\n\t\t\tpath.join(__dirname, \"..\"),\n\t\t) as GrandiAddon;\n\t\tif (localBinding) return localBinding;\n\t} catch (err) {\n\t\tloadErrors.push(err as Error);\n\t}\n\n\ttry {\n\t\tconst archAddon = tryRequireArchPackage();\n\t\tif (archAddon) return archAddon;\n\t} catch (err) {\n\t\tloadErrors.push(err as Error);\n\t}\n\n\tif (loadErrors.length > 0) {\n\t\tconst aggregateError = new Error(\n\t\t\t\"Failed to load native addon:\\n\" +\n\t\t\t\tloadErrors.map((e, i) => ` [${i + 1}] ${e.message}`).join(\"\\n\"),\n\t\t);\n\t\tconsole.error(aggregateError);\n\t}\n\treturn noopAddon;\n}\n\nexport interface GrandiAddon {\n\tversion(): string;\n\tisSupportedCPU(): boolean;\n\tinitialize(): boolean;\n\tdestroy(): boolean;\n\tfind(params?: FindOptions): Promise<Finder>;\n\treceive(params: ReceiveOptions): Promise<Receiver>;\n\tframesync(receiver: Receiver): Promise<FrameSync>;\n\tsend(params: SendOptions): Promise<Sender>;\n\trouting(params: { name?: string; groups?: string }): Promise<Routing>;\n}\n\nconst noopAddon: GrandiAddon = {\n\tversion() {\n\t\treturn \"\";\n\t},\n\tisSupportedCPU() {\n\t\treturn false;\n\t},\n\tinitialize() {\n\t\treturn false;\n\t},\n\tdestroy() {\n\t\treturn false;\n\t},\n\tsend(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\treceive(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\tframesync(_receiver) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\trouting() {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n\tfind(_params) {\n\t\treturn Promise.reject(new Error(\"Unsupported platform or CPU\"));\n\t},\n};\n\nconst addon: GrandiAddon = loadAddon();\n/**\n * Creates a finder to discover NDI sources on the network.\n * @param {FindOptions} [params={}] - Options for finding sources.\n * @param {boolean} [params.showLocalSources] - Whether to show local sources.\n * @param {string} [params.groups] - Multicast groups to search in.\n * @param {string} [params.extraIPs] - Additional IP addresses to search.\n * @returns {Promise<Finder>} A promise that resolves to a Finder instance for discovering sources.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if the finder cannot be created.\n *\n * @example\n * ```js\n * import { find, initialize } from \"grandi\";\n * initialize();\n * const finder = await find({ showLocalSources: true });\n * finder.wait(1000);\n * console.log(finder.sources());\n * finder.destroy();\n * ```\n */\nexport function find(params: FindOptions = {}): Promise<Finder> {\n\treturn addon.find(params);\n}\n// Named runtime exports\n/**\n * Gets the version of the NDI SDK.\n * @returns {string} The NDI SDK version string.\n */\nexport const version = addon.version;\n/**\n * Checks if the current CPU architecture is supported by NDI.\n * @returns {boolean} True if the CPU is supported, false otherwise.\n */\nexport const isSupportedCPU = addon.isSupportedCPU;\n/**\n * Initializes the NDI library. Must be called before using any other NDI functions.\n * @returns {boolean} True if initialization was successful, false otherwise.\n *\n * @example\n * ```js\n * import { initialize } from \"grandi\";\n * if (!initialize()) throw new Error(\"NDI init failed\");\n * ```\n */\nexport const initialize = addon.initialize;\n/**\n * Destroys the NDI library instance and cleans up resources.\n * Should be called when done using NDI to free resources.\n * @returns {boolean} True if destruction was successful, false otherwise.\n *\n * @example\n * ```js\n * import { destroy } from \"grandi\";\n * destroy();\n * ```\n */\nexport const destroy = addon.destroy;\n/**\n * Creates an NDI sender for transmitting video and audio over the network.\n * @param {SendOptions} params - Options for creating the sender.\n * @param {string} params.name - The name of the NDI source.\n * @param {string} [params.groups] - Multicast groups to send to.\n * @param {boolean} [params.clockVideo] - Whether to clock video frames.\n * @param {boolean} [params.clockAudio] - Whether to clock audio frames.\n * @returns {Promise<Sender>} A promise that resolves to a Sender instance for transmitting data.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if sender creation fails.\n *\n * @example\n * ```js\n * import { initialize, send } from \"grandi\";\n * initialize();\n * const sender = await send({ name: \"My Source\" });\n * // sender.video(...) / sender.audio(...)\n * sender.destroy();\n * ```\n */\nexport const send = addon.send;\n/**\n * Creates an NDI receiver for receiving video and audio from an NDI source.\n * @param {ReceiveOptions} params - Options for creating the receiver.\n * @param {ReceiveOptions[\"source\"]} params.source - The NDI source to connect to.\n * @param {ReceiveOptions[\"colorFormat\"]} [params.colorFormat] - The color format for received video.\n * @param {ReceiveOptions[\"bandwidth\"]} [params.bandwidth] - The bandwidth limitation for the connection.\n * @param {boolean} [params.allowVideoFields] - Whether to allow video fields.\n * @param {string} [params.name] - The name for the receiver.\n * @returns {Promise<Receiver>} A promise that resolves to a Receiver instance for receiving data.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if receiver creation fails.\n *\n * @example\n * ```js\n * import { find, initialize, receive } from \"grandi\";\n * initialize();\n * const finder = await find({ showLocalSources: true });\n * finder.wait(1000);\n * const source = finder.sources()[0];\n * finder.destroy();\n * const receiver = await receive({ source });\n * const frame = await receiver.video(1000);\n * receiver.destroy();\n * ```\n */\nexport const receive = addon.receive;\n/**\n * Creates an NDI frame-synchronizer (time base corrector) backed by an existing receiver.\n * Use this when you want smooth playback clocked to your own render/audio loop.\n *\n * Note: destroy the frame-sync before destroying the receiver.\n * @param {Receiver} receiver - The receiver instance to frame-sync.\n * @returns {Promise<FrameSync>} A promise that resolves to a FrameSync instance.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if framesync creation fails.\n *\n * @example\n * ```js\n * import grandi from \"grandi\";\n * grandi.initialize();\n * const receiver = await grandi.receive({ source });\n * const fs = await grandi.framesync(receiver);\n * const frame = await fs.video(grandi.FrameType.Progressive);\n * fs.destroy();\n * receiver.destroy();\n * ```\n */\nexport const framesync = addon.framesync;\n/**\n * Creates an NDI router for switching between different NDI sources.\n * @param {Object} params - Options for creating the router.\n * @param {string} [params.name] - The name for the router.\n * @param {string} [params.groups] - Multicast groups for the router.\n * @returns {Promise<Routing>} A promise that resolves to a Routing instance for source switching.\n * @throws {Error} Promise rejects on unsupported platform/CPU or if routing creation fails.\n *\n * @example\n * ```js\n * import { initialize, routing } from \"grandi\";\n * initialize();\n * const router = await routing({ name: \"My Router\" });\n * // router.change(source)\n * router.destroy();\n * ```\n */\nexport const routing = addon.routing;\n\n// Re-export enums and types for convenient named imports\nexport { ColorFormat, AudioFormat, Bandwidth, FrameType, FourCC };\nexport type {\n\tAudioFrame,\n\tAudioReceiveOptions,\n\tFinder,\n\tFindOptions,\n\tFrameSync,\n\tFrameSyncAudioOptions,\n\tGrandi,\n\tPtpTimestamp,\n\tReceivedAudioFrame,\n\tReceivedMetadataFrame,\n\tReceivedVideoFrame,\n\tReceiveOptions,\n\tReceiverDataFrame,\n\tReceiverTallyState,\n\tRouting,\n\tSender,\n\tSenderTally,\n\tSource,\n\tSourceChangeEvent,\n\tStatusChangeEvent,\n\tTimecode,\n\tTimeoutEvent,\n\tVideoFrame,\n} from \"./types\";\n\nconst grandi: Grandi = {\n\tversion,\n\tisSupportedCPU,\n\tinitialize,\n\tdestroy,\n\tsend,\n\treceive,\n\tframesync,\n\trouting,\n\tfind,\n\tColorFormat,\n\tAudioFormat,\n\tBandwidth,\n\tFrameType,\n\tFourCC,\n\n\t// Constants mapped to enum values\n\tCOLOR_FORMAT_BGRX_BGRA: ColorFormat.BGRX_BGRA,\n\tCOLOR_FORMAT_UYVY_BGRA: ColorFormat.UYVY_BGRA,\n\tCOLOR_FORMAT_RGBX_RGBA: ColorFormat.RGBX_RGBA,\n\tCOLOR_FORMAT_UYVY_RGBA: ColorFormat.UYVY_RGBA,\n\tCOLOR_FORMAT_FASTEST: ColorFormat.Fastest,\n\tCOLOR_FORMAT_BEST: ColorFormat.Best,\n\tCOLOR_FORMAT_BGRX_BGRA_FLIPPED: ColorFormat.BGRX_BGRA_FLIPPED,\n\n\tBANDWIDTH_METADATA_ONLY: Bandwidth.MetadataOnly,\n\tBANDWIDTH_AUDIO_ONLY: Bandwidth.AudioOnly,\n\tBANDWIDTH_LOWEST: Bandwidth.Lowest,\n\tBANDWIDTH_HIGHEST: Bandwidth.Highest,\n\n\tFORMAT_TYPE_PROGRESSIVE: FrameType.Progressive,\n\tFORMAT_TYPE_INTERLACED: FrameType.Interlaced,\n\tFORMAT_TYPE_FIELD_0: FrameType.Field0,\n\tFORMAT_TYPE_FIELD_1: FrameType.Field1,\n\n\tAUDIO_FORMAT_FLOAT_32_SEPARATE: AudioFormat.Float32Separate,\n\tAUDIO_FORMAT_FLOAT_32_INTERLEAVED: AudioFormat.Float32Interleaved,\n\tAUDIO_FORMAT_INT_16_INTERLEAVED: AudioFormat.Int16Interleaved,\n\n\t// FourCC helpers/constants\n\tFOURCC_UYVY: FourCC.UYVY,\n\tFOURCC_UYVA: FourCC.UYVA,\n\tFOURCC_P216: FourCC.P216,\n\tFOURCC_PA16: FourCC.PA16,\n\tFOURCC_YV12: FourCC.YV12,\n\tFOURCC_I420: FourCC.I420,\n\tFOURCC_NV12: FourCC.NV12,\n\tFOURCC_BGRA: FourCC.BGRA,\n\tFOURCC_BGRX: FourCC.BGRX,\n\tFOURCC_RGBA: FourCC.RGBA,\n\tFOURCC_RGBX: FourCC.RGBX,\n\tFOURCC_FLTp: FourCC.FLTp,\n};\n\nexport default grandi;\n"],"x_google_ignoreList":[0],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grandi",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Node.JS native bindings to the Newtek NDI SDK.",
5
5
  "homepage": "https://github.com/tux-tn/grandi#readme",
6
6
  "keywords": [
@@ -33,12 +33,13 @@
33
33
  "url": "https://github.com/tux-tn/grandi/issues"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@grandi/darwin-universal": "1.2.0",
37
- "@grandi/linux-arm64": "1.2.0",
38
- "@grandi/linux-armv7l": "1.2.0",
39
- "@grandi/linux-x64": "1.2.0",
40
- "@grandi/win32-ia32": "1.2.0",
41
- "@grandi/win32-x64": "1.2.0"
36
+ "@grandi/darwin-x64": "1.3.0",
37
+ "@grandi/darwin-arm64": "1.3.0",
38
+ "@grandi/linux-arm64": "1.3.0",
39
+ "@grandi/linux-armv7l": "1.3.0",
40
+ "@grandi/linux-x64": "1.3.0",
41
+ "@grandi/win32-ia32": "1.3.0",
42
+ "@grandi/win32-x64": "1.3.0"
42
43
  },
43
44
  "dependencies": {
44
45
  "node-gyp-build": "^4.8.4"