@vestra-player/sdk 1.11.0-rc.5 → 1.11.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.11.1
4
+
5
+ **NVIDIA motion smoothing** (T8; needs player 0.11.1, which ships the NVIDIA engine). Additions only; nobody must change anything.
6
+
7
+ - `plugin.video.motion("nvidia")` is no longer reserved. The player's NVIDIA engine is FFmpeg's `fruc_vulkan` on the optical flow hardware of GeForce RTX 30 and newer GPUs (Windows, driver 573.38 or newer); an older player still answers `engine` for every mode. Docs: `MotionEngine`, `plugin.video.motion`, `VideoMotion`, `MotionState.searchMode` and the `MotionReasonCode` table (`engine`, `no-gpu` and `runtime` name NVIDIA's cases). **`other-engine`** (new reason code, user ruling T8): the other engine's converter is on for another plugin; one converter runs at a time, so the mode waits (not run-long; the message names the engine). It ships together with the player that reports it. **`TestHost.nvidiaMotion`** (new): NVIDIA's engine with the same model as `TestHost.motion`, its own state (defaults: both modes work, converting on an RTX 4070 Laptop GPU); one converter at a time as the player (the first engine set to a mode holds it, the other's modes report `other-engine`); `motionChanged()` sends each engine's state. `MotionReasonCode` gains `other-engine` (an addition); no other type changes; the reserved engine's model (`engine` for every mode) is gone from `TestHost`: **`TestHost`'s `nvidia` engine no longer answers `engine` by default** (both modes work, as `TestHost.motion`); a test that relied on `engine` sets `host.nvidiaMotion.double` / `.display` to an `engine` reason. Like the player, `TestHost` puts `other-engine` after the system, filter, renderer, AI upscaling and frame doubling reasons and before `failed`, `overload`, `rate`, `format` and `size`. The API surface snapshot gains `TestHost.nvidiaMotion`. Docs: the `overload` row of the `MotionReasonCode` table says that with software rendering the player's message names the CPU drawing the doubled frames (no type change).
8
+
3
9
  ## 1.11.0
4
10
 
5
11
  **The second batch of events, no capability disclosure, and the built-in-only refusal renamed** (user rulings 2026-11-16 and 2026-11-21). Plugins have no capabilities, neither as declarations (gone since 1.9.0) nor as a disclosure: the name-based scan and its table are removed, and the plugin store no longer shows what a plugin's code uses. The player's real API boundaries stay (request validation and the built-in-only requests); their refusal now has the code `builtin-only`. Breaking, released as a minor without an alias, since every plugin is the project's own (ruling 2026-11-21). Who must change: a plugin that calls `player.subscribe()` or `player.onChange()`, a tool that runs `vestra-plugin scan` or reads `@vestra-player/sdk/capability-scan.json`, and a plugin that compares `error.code` for a built-in-only call (below).
@@ -28,7 +34,11 @@
28
34
  - **New guide, [Learn what happens in the player without staying up](docs/guides/events-and-triggers.md)**: the four ways to learn the state (a read, an event, a trigger, a stream) and when each fits, with four examples (on top while playing fullscreen; a named sleep timer; acting at position ranges; a window that shows the time left), the patterns for state that has no event, and tests with `keepsRunning`, `park`, `advance` and `upgrade`.
29
35
  - **[Command state](docs/guides/command-state.md) covers the whole `when` language**: a function field is evaluated in the plugin with the plugin's own copy of the state, a condition by the player, also in standby. How a plugin works, Control playback, Troubleshooting (an old playback state in a menu, a plugin that never parks, a trigger declared after an `await`), the tutorial, Filters, Sliders, Subtitles, Design rules, the README and the `@example`s of `Commands.add`, `Command.set`, `Bindable`, `Player.read`, `Player.previous`, `Player.audioDevices`, `View.bind`, `Panels.mount` and `OsdPanel` follow the same rules: commands follow the player with `when`, handlers read the state with `refresh()`, a stream is open only while something shows the state, and a filter is made when it is first needed (a filter follows the source from the moment it is made, which keeps the plugin running).
30
36
  - **Examples**: `adjust-panel` follows the speed with a stream only while its tab is on screen (`layout.changed`) and enables Normal Speed with `when.can("rate")`; `bookmark` streams only while its window is open and keeps its mark in session storage; `menus` checks the speeds with `when.rate` and enables them with `when.can("rate")`; `three-ways` follows the speed only while the bar shows and learns a new source from `source.opening`/`ready`/`ended` in every style; `blur` makes its filter on first use; `panel-menu` keeps its list in session storage. Every example's test checks with `keepsRunning` that nothing keeps it running while idle. `minPlayerVersion`: `adjust-panel` 0.11.0, `menus` 0.10.0. The golden traces of `adjust-panel`, `blur`, `bookmark`, `menus` and `panel-menu` are recorded again (fewer subscriptions and passes; the session storage reads), and `docs-tree.test.ts` looks for style B's new listener line in the tutorial.
31
- - `TestHost.listening`, `listeningWhy` and `keepsRunning` say what they list now: listeners and streams, not bindings.
37
+ - `TestHost.listening`, `listeningWhy` and `keepsRunning` say what they list now: the listeners and streams that keep a plugin running. A binding's or a command field's read is never one; while a listener or stream holds the same event, the read is listed beside it (with "— use plugin.when" where a condition exists), as the player's log shows it.
38
+
39
+ **Product data:**
40
+
41
+ - **`@vestra/icons.slint`** follows the player (main 6182f3d1, #459): the palette button's `search-ai` icon is a magnifier with the AI icon's sparkle, no longer a speech bubble.
32
42
 
33
43
  ## 1.10.1
34
44
 
@@ -138,7 +138,7 @@ export declare const MENU_IDS: readonly ["open", "playback", "subtitles", "video
138
138
  * icon of the player's V-Line set, `@vestra/icons.slint` (draw one in your own
139
139
  * Slint with `Icon { name: "store"; }`). The player's tests check that this
140
140
  * list is its icon set. `"sliders"` (three sliders, the player's Adjustments
141
- * and Effects button); `"search-ai"` (a speech bubble with the AI icon's
141
+ * and Effects button); `"search-ai"` (a magnifier with the AI icon's
142
142
  * sparkle, the palette's button while a plugin holds its lead row).
143
143
  *
144
144
  * @example Check in a test that the button's icon exists
package/dist/commands.js CHANGED
@@ -143,7 +143,7 @@ export const MENU_IDS = [
143
143
  * icon of the player's V-Line set, `@vestra/icons.slint` (draw one in your own
144
144
  * Slint with `Icon { name: "store"; }`). The player's tests check that this
145
145
  * list is its icon set. `"sliders"` (three sliders, the player's Adjustments
146
- * and Effects button); `"search-ai"` (a speech bubble with the AI icon's
146
+ * and Effects button); `"search-ai"` (a magnifier with the AI icon's
147
147
  * sparkle, the palette's button while a plugin holds its lead row).
148
148
  *
149
149
  * @example Check in a test that the button's icon exists
Binary file
@@ -601,7 +601,9 @@ export declare class TestHost implements Transport {
601
601
  * Why the plugin listens to each event of {@link TestHost.listening}:
602
602
  * every listener and stream, as the player's log says them (`a listener
603
603
  * added at main.ts:12`, `a stream opened at main.ts:20`), in the order
604
- * they came.
604
+ * they came. A binding's or command field's read of the event's state is
605
+ * listed beside them (with "— use plugin.when" where a condition exists);
606
+ * it is never a reason on its own.
605
607
  *
606
608
  * @since 1.5.40
607
609
  */
@@ -2291,11 +2293,39 @@ export declare class TestHost implements Transport {
2291
2293
  /** The converting GPU's name; `null`: none. */
2292
2294
  gpu: string | null;
2293
2295
  };
2296
+ /**
2297
+ * NVIDIA's engine behind `plugin.video.motion("nvidia")`: the same model
2298
+ * as {@link TestHost.motion} (AMD's), its own state, answered the same
2299
+ * way. The defaults are a player where both modes work on a 24 fps video
2300
+ * and a 60 Hz display, converting on an RTX 4070 Laptop GPU. One
2301
+ * converter at a time, as the player: the first engine set to a mode (or
2302
+ * preset to one, `amd` first) holds it while its mode is not `off`, and
2303
+ * the other engine's modes report `other-engine`, in the player's order:
2304
+ * a model's own run-long, renderer, `upscaling` or `doubling` reason
2305
+ * comes first, its `failed`, `overload`, `rate`, `format` or `size` after.
2306
+ * A test of "another plugin holds AMD's converter" sets
2307
+ * `host.motion.mode`.
2308
+ *
2309
+ * @example Test an NVIDIA plugin without an RTX 30 or newer GPU
2310
+ * The same reason on both modes is what the player answers there: the
2311
+ * plugin shows it and keeps the mode off, since `no-gpu` holds for the run.
2312
+ * ```ts
2313
+ * declare const host: TestHost;
2314
+ * // ---cut---
2315
+ * const reason = { code: "no-gpu", message: "no NVIDIA GPU" };
2316
+ * host.nvidiaMotion.double = reason;
2317
+ * host.nvidiaMotion.display = reason;
2318
+ * ```
2319
+ *
2320
+ * @since 1.11.1
2321
+ */
2322
+ readonly nvidiaMotion: TestHost["motion"];
2294
2323
  /**
2295
2324
  * Send `video.motion.changed` with the state {@link TestHost.motion}
2296
- * describes now (without `mode`), as the player does when it changes; a
2297
- * plugin listening with `plugin.video.motion("amd").onChange` receives it.
2298
- * Nothing reaches a plugin that does not listen.
2325
+ * describes now (without `mode`), and then the one of
2326
+ * {@link TestHost.nvidiaMotion}, as the player does when they change; a
2327
+ * plugin listening with `plugin.video.motion(engine).onChange` receives
2328
+ * its engine's. Nothing reaches a plugin that does not listen.
2299
2329
  *
2300
2330
  * @example The GPU fell behind
2301
2331
  * The player turned the converter off for this video; the plugin's
@@ -279,7 +279,9 @@ export class TestHost {
279
279
  * Why the plugin listens to each event of {@link TestHost.listening}:
280
280
  * every listener and stream, as the player's log says them (`a listener
281
281
  * added at main.ts:12`, `a stream opened at main.ts:20`), in the order
282
- * they came.
282
+ * they came. A binding's or command field's read of the event's state is
283
+ * listed beside them (with "— use plugin.when" where a condition exists);
284
+ * it is never a reason on its own.
283
285
  *
284
286
  * @since 1.5.40
285
287
  */
@@ -1778,11 +1780,49 @@ export class TestHost {
1778
1780
  displayFps: 60,
1779
1781
  gpu: "AMD Radeon 780M Graphics",
1780
1782
  };
1783
+ /**
1784
+ * NVIDIA's engine behind `plugin.video.motion("nvidia")`: the same model
1785
+ * as {@link TestHost.motion} (AMD's), its own state, answered the same
1786
+ * way. The defaults are a player where both modes work on a 24 fps video
1787
+ * and a 60 Hz display, converting on an RTX 4070 Laptop GPU. One
1788
+ * converter at a time, as the player: the first engine set to a mode (or
1789
+ * preset to one, `amd` first) holds it while its mode is not `off`, and
1790
+ * the other engine's modes report `other-engine`, in the player's order:
1791
+ * a model's own run-long, renderer, `upscaling` or `doubling` reason
1792
+ * comes first, its `failed`, `overload`, `rate`, `format` or `size` after.
1793
+ * A test of "another plugin holds AMD's converter" sets
1794
+ * `host.motion.mode`.
1795
+ *
1796
+ * @example Test an NVIDIA plugin without an RTX 30 or newer GPU
1797
+ * The same reason on both modes is what the player answers there: the
1798
+ * plugin shows it and keeps the mode off, since `no-gpu` holds for the run.
1799
+ * ```ts
1800
+ * declare const host: TestHost;
1801
+ * // ---cut---
1802
+ * const reason = { code: "no-gpu", message: "no NVIDIA GPU" };
1803
+ * host.nvidiaMotion.double = reason;
1804
+ * host.nvidiaMotion.display = reason;
1805
+ * ```
1806
+ *
1807
+ * @since 1.11.1
1808
+ */
1809
+ nvidiaMotion = {
1810
+ mode: "off",
1811
+ double: null,
1812
+ display: null,
1813
+ renderingStarting: false,
1814
+ sourceFps: 24,
1815
+ outputFps: null,
1816
+ performance: false,
1817
+ displayFps: 60,
1818
+ gpu: "NVIDIA GeForce RTX 4070 Laptop GPU",
1819
+ };
1781
1820
  /**
1782
1821
  * Send `video.motion.changed` with the state {@link TestHost.motion}
1783
- * describes now (without `mode`), as the player does when it changes; a
1784
- * plugin listening with `plugin.video.motion("amd").onChange` receives it.
1785
- * Nothing reaches a plugin that does not listen.
1822
+ * describes now (without `mode`), and then the one of
1823
+ * {@link TestHost.nvidiaMotion}, as the player does when they change; a
1824
+ * plugin listening with `plugin.video.motion(engine).onChange` receives
1825
+ * its engine's. Nothing reaches a plugin that does not listen.
1786
1826
  *
1787
1827
  * @example The GPU fell behind
1788
1828
  * The player turned the converter off for this video; the plugin's
@@ -1800,8 +1840,10 @@ export class TestHost {
1800
1840
  motionChanged() {
1801
1841
  if (!this.subscriptions.has("video.motion.changed"))
1802
1842
  return;
1803
- const { mode: _, ...state } = motionState(this);
1804
- this.emit("video.motion.changed", state);
1843
+ for (const engine of ["amd", "nvidia"]) {
1844
+ const { mode: _, ...state } = motionState(this, engine);
1845
+ this.emit("video.motion.changed", state);
1846
+ }
1805
1847
  }
1806
1848
  /** What `player.chapters()` lists while media is ready. */
1807
1849
  chapters = [];
@@ -52,6 +52,7 @@ export declare function failVideoRender(host: TestHost, _inner: Internals, code:
52
52
  export declare function failVideoShaders(host: TestHost, _inner: Internals, id: string, message: string, code?: "failed" | "previous-crash"): void;
53
53
  /** Implements `TestHost.upscalingDecoding`. */
54
54
  export declare function upscalingDecoding(host: TestHost, _inner: Internals, cause: UpscalingDecodingCause, plugins?: readonly UpscalingPlugin[]): UpscalingReason;
55
- export declare function motionState(host: TestHost): WireMotionState;
55
+ /** `video.motion.state` of an engine from its model (`amd` by default). */
56
+ export declare function motionState(host: TestHost, engine?: "amd" | "nvidia"): WireMotionState;
56
57
  /** The default handlers of this area's wire methods, by method name. */
57
58
  export declare function processingHandlers(host: TestHost, inner: Internals): Record<string, Handler>;
@@ -247,54 +247,73 @@ export function upscalingDecoding(host, _inner, cause, plugins = []) {
247
247
  host.upscaling.hwdecCurrent = current;
248
248
  return reason;
249
249
  }
250
- /** `video.motion.state` from {@link TestHost.motion}. */
251
- /** The player's message for the reserved engine (as playback/motion.rs). */
252
- const NO_NVIDIA = {
253
- code: "engine",
254
- message: "this player has no NVIDIA frame-rate converter; motion smoothing works with AMD's (engine amd)",
255
- };
256
- /** `video.motion.state` of the reserved `nvidia` engine: every mode `engine`. */
257
- function nvidiaState(host) {
258
- return {
259
- engine: "nvidia",
260
- mode: "off",
261
- active: "off",
262
- double: { ...NO_NVIDIA },
263
- display: { ...NO_NVIDIA },
264
- searchMode: null,
265
- sourceFps: host.motion.sourceFps,
266
- outputFps: null,
267
- displayFps: host.motion.displayFps,
268
- gpu: null,
269
- inChain: false,
270
- };
271
- }
272
250
  /** The engine a request names, checked as the player does. */
273
251
  function engineOf(p) {
274
252
  if (p.engine !== "amd" && p.engine !== "nvidia")
275
253
  throw new HostError("invalid", 'engine must be "amd" or "nvidia"');
276
254
  return p.engine;
277
255
  }
278
- export function motionState(host) {
279
- const { mode, double, display, sourceFps, displayFps, gpu } = host.motion;
256
+ /** The model of an engine: {@link TestHost.motion} (`amd`) or {@link TestHost.nvidiaMotion}. */
257
+ function modelOf(host, engine) {
258
+ return engine === "amd" ? host.motion : host.nvidiaMotion;
259
+ }
260
+ /** The engine whose converter is in the chain, as the player keeps it: the first one set to a mode, while its mode is not `off`. */
261
+ const motionHolder = new WeakMap();
262
+ /** Which engine holds the converter now: the one recorded while it is on, else the first that is on (`amd` first). */
263
+ function holderOf(host) {
264
+ const on = (engine) => modelOf(host, engine).mode !== "off";
265
+ const recorded = motionHolder.get(host);
266
+ if (recorded && on(recorded))
267
+ return recorded;
268
+ const next = on("amd") ? "amd" : on("nvidia") ? "nvidia" : null;
269
+ if (next)
270
+ motionHolder.set(host, next);
271
+ else
272
+ motionHolder.delete(host);
273
+ return next;
274
+ }
275
+ /** The player's message while the other engine holds the converter (as playback/motion.rs). */
276
+ function otherEngine(holder) {
277
+ const vendor = holder === "amd" ? "AMD" : "NVIDIA";
278
+ return {
279
+ code: "other-engine",
280
+ message: `${vendor} motion smoothing is on (another plugin); one converter runs at a time, so this waits until it is off`,
281
+ };
282
+ }
283
+ /**
284
+ * The reasons the player checks after the other engine holding the
285
+ * converter (playback/motion.rs `check`: the system, the filter, the
286
+ * renderer, AI upscaling and frame doubling come first; then
287
+ * `other-engine`; then these).
288
+ */
289
+ const AFTER_OTHER_ENGINE = ["failed", "overload", "rate", "format", "size"];
290
+ /** `video.motion.state` of an engine from its model (`amd` by default). */
291
+ export function motionState(host, engine = "amd") {
292
+ const model = modelOf(host, engine);
293
+ const { mode, sourceFps, displayFps, gpu } = model;
294
+ // The model's reason and the other engine holding the converter, in the
295
+ // player's order.
296
+ const holder = holderOf(host);
297
+ const waits = holder !== null && holder !== engine ? otherEngine(holder) : null;
298
+ const first = (own) => own === null || (waits !== null && AFTER_OTHER_ENGINE.includes(own.code))
299
+ ? (waits ?? own)
300
+ : own;
301
+ const double = first(model.double);
302
+ const display = first(model.display);
280
303
  const reasonOf = (wanted) => wanted === "double" ? double : wanted === "display" ? display : null;
281
304
  const works = mode !== "off" && reasonOf(mode) === null && sourceFps !== null;
282
305
  const active = works ? mode : "off";
283
306
  const copy = (reason) => reason ? structuredClone(reason) : null;
284
307
  return {
285
- engine: "amd",
308
+ engine,
286
309
  mode,
287
310
  active,
288
311
  double: copy(double),
289
312
  display: copy(display),
290
- searchMode: works
291
- ? host.motion.performance
292
- ? "performance"
293
- : "native"
294
- : null,
313
+ searchMode: works ? (model.performance ? "performance" : "native") : null,
295
314
  sourceFps,
296
315
  outputFps: works
297
- ? (host.motion.outputFps ?? Math.round(sourceFps * 20) / 10)
316
+ ? (model.outputFps ?? Math.round(sourceFps * 20) / 10)
298
317
  : null,
299
318
  displayFps,
300
319
  gpu,
@@ -356,25 +375,25 @@ export function processingHandlers(host, inner) {
356
375
  return upscalingState(host, inner);
357
376
  },
358
377
  // As the player 0.8.1 (see TestHost.motion for the model).
359
- "video.motion.state": (p) => engineOf(p) === "amd" ? motionState(host) : nvidiaState(host),
378
+ "video.motion.state": (p) => motionState(host, engineOf(p)),
360
379
  "video.motion.set": (p) => {
361
380
  const engine = engineOf(p);
362
381
  const mode = p.mode;
363
382
  if (mode !== "off" && mode !== "double" && mode !== "display")
364
383
  throw new HostError("invalid", 'mode must be "off", "double" or "display"');
365
- if (engine === "nvidia") {
366
- if (mode !== "off")
367
- throw new HostError("unsupported", `motion smoothing cannot work here: ${NO_NVIDIA.message}`);
368
- return nvidiaState(host);
369
- }
384
+ const model = modelOf(host, engine);
370
385
  if (mode !== "off") {
371
- const reason = host.motion[mode];
372
- const passes = reason?.code === "rendering" && host.motion.renderingStarting;
386
+ const reason = model[mode];
387
+ const passes = reason?.code === "rendering" && model.renderingStarting;
373
388
  if (reason && MOTION_FIXED.includes(reason.code) && !passes)
374
389
  throw new HostError("unsupported", `motion smoothing cannot work here: ${reason.message}`);
375
390
  }
376
- host.motion.mode = mode;
377
- return motionState(host);
391
+ model.mode = mode;
392
+ // The first engine set to a mode holds the converter while it is on.
393
+ if (mode !== "off" && holderOf(host) === null)
394
+ motionHolder.set(host, engine);
395
+ holderOf(host);
396
+ return motionState(host, engine);
378
397
  },
379
398
  "video.view.set": (p) => {
380
399
  const owner = host.videoView.owner;
@@ -282,8 +282,9 @@ export interface Scope extends Disposable {
282
282
  readonly upscaling: VideoUpscaling;
283
283
  /**
284
284
  * Motion smoothing with one GPU vendor's frame-rate converter: whether it works here and why not, and this
285
- * plugin's mode. `amd` is AMD AMF's on Windows; `nvidia` is reserved
286
- * (every mode reports `engine` until a player has it).
285
+ * plugin's mode. `amd` is AMD AMF's on Windows; `nvidia` is NVIDIA's
286
+ * (FFmpeg's `fruc_vulkan`, GeForce RTX 30 and newer, on Windows; an
287
+ * older player reports `engine` for every mode).
287
288
  *
288
289
  * @param engine - The converter: `"amd"` or `"nvidia"`.
289
290
  * @returns A {@link VideoMotion} for that converter.
@@ -929,9 +929,12 @@ export interface VideoUpscaling {
929
929
  }
930
930
  /**
931
931
  * A GPU vendor's frame-rate converter for motion smoothing: `amd` (AMD
932
- * AMF's, on Windows with an AMD Radeon GPU); `nvidia` is reserved for
933
- * NVIDIA's converter, which no player has yet (every mode reports
934
- * `engine`). Each vendor's motion smoothing is its own plugin.
932
+ * AMF's, on Windows with an AMD Radeon GPU) and `nvidia` (FFmpeg's
933
+ * `fruc_vulkan` on the optical flow hardware of NVIDIA GeForce RTX 30 and
934
+ * newer GPUs, on Windows with driver 573.38 or newer; a player before it
935
+ * reports `engine` for every mode). Each vendor's motion smoothing is its
936
+ * own plugin. One converter runs at a time: while one engine's is on for
937
+ * some plugin, the other engine's modes report `other-engine` and wait.
935
938
  *
936
939
  * @player 0.8.1
937
940
  * @since 1.7.19
@@ -958,16 +961,17 @@ export type MotionMode = "off" | "double" | "display";
958
961
  *
959
962
  * | Code | Meaning |
960
963
  * | --- | --- |
961
- * | `engine` | The player has no converter of this engine (`nvidia`, until a player has it). |
964
+ * | `engine` | The player has no converter of this engine on this system (`nvidia` on a player before it). |
962
965
  * | `platform` | The player has no frame-rate converter on this system (macOS, Linux). |
963
- * | `no-gpu` | No GPU with a frame-rate converter (Windows: no AMD Radeon GPU). |
964
- * | `runtime` | The GPU's runtime is missing (Windows: AMD's AMF runtime, installed with the AMD driver), or the converter failed to start the same way on two videos in this run (an older GPU AMF does not serve). |
966
+ * | `no-gpu` | No GPU with this engine's converter (Windows: no AMD Radeon GPU; no NVIDIA GeForce RTX 30 or newer GPU). |
967
+ * | `runtime` | The GPU's runtime is missing or too old (Windows: AMD's AMF runtime, installed with the AMD driver; an NVIDIA driver before 573.38), or the converter cannot start on this system (AMD: it failed to start the same way on two videos in this run, an older GPU AMF does not serve; NVIDIA: no Vulkan device or optical flow from the driver, at the first try). |
965
968
  * | `filter` | The player's video library has no frame-rate converter (a player built without it). |
966
969
  * | `rendering` | Match Display only: the player renders in software, or GPU rendering is still starting ({@link Rendering}). |
967
970
  * | `upscaling` | AI upscaling is on ({@link VideoUpscaling}); the two cannot run together. |
968
971
  * | `doubling` | A plugin's video filter already raises the frame rate (a `frameBlend` node, such as Frame Doubling); the two cannot run together. |
972
+ * | `other-engine` | The other engine's converter is on for another plugin (the message names it); one converter runs at a time, so this waits until that one is off. |
969
973
  * | `failed` | The converter stopped on this video; the message has its error. The next video tries again. |
970
- * | `overload` | The GPU could not keep up with this video, even with the faster motion search. The next video tries again. |
974
+ * | `overload` | The output could not keep up with this video: the GPU, even with the faster motion search, or, with software rendering, the CPU drawing the doubled frames (the message says which, and that GPU Rendering helps then). The next video tries again. |
971
975
  * | `rate` | The converter's input rate ({@link MotionState.sourceFps}: 25i deinterlaced by field reads 50) does not fit: outside 10–30 fps (the rates measured), doubled above the display's refresh rate, or (software rendering, Double) twice it is not the display's rate. |
972
976
  * | `format` | The video's format was not measured: 10-bit or deeper, or HDR. |
973
977
  * | `size` | The video is too large for this mode on this renderer: its width × height × the doubled rate is more than the player measured it keeps up with (on the reference laptop: software rendering up to 1080p at 30 fps, GPU rendering's Double up to 4K at 24 fps, Match Display up to 1080p on a 60 Hz display, counted at the display's refresh rate). The next video may fit. |
@@ -995,7 +999,7 @@ export type MotionMode = "off" | "double" | "display";
995
999
  * @since 1.7.19
996
1000
  * @category Processing
997
1001
  */
998
- export type MotionReasonCode = "engine" | "platform" | "no-gpu" | "runtime" | "filter" | "rendering" | "upscaling" | "doubling" | "failed" | "overload" | "rate" | "format" | "size" | (string & {});
1002
+ export type MotionReasonCode = "engine" | "platform" | "no-gpu" | "runtime" | "filter" | "rendering" | "upscaling" | "doubling" | "other-engine" | "failed" | "overload" | "rate" | "format" | "size" | (string & {});
999
1003
  /**
1000
1004
  * Why a motion smoothing mode does not work: a stable
1001
1005
  * {@link MotionReasonCode} to branch on and a sentence to show, the same
@@ -1060,9 +1064,11 @@ export interface MotionState {
1060
1064
  /** Why Match Display cannot work now; `null` while it can. */
1061
1065
  readonly display: MotionReason | null;
1062
1066
  /**
1063
- * The converter's motion search while it runs: `native` on the full
1064
- * frames, `performance` on downscaled ones (the first step when the GPU
1065
- * falls behind); `null` while off.
1067
+ * The converter's motion search while it runs: `native`, the player's
1068
+ * setting for this video, or `performance`, the faster one (the first
1069
+ * step when the GPU falls behind: AMD searches downscaled frames, NVIDIA
1070
+ * uses its fast optical flow, which it already uses above 1440p); `null`
1071
+ * while off.
1066
1072
  */
1067
1073
  readonly searchMode: "native" | "performance" | null;
1068
1074
  /**
@@ -1085,7 +1091,8 @@ export interface MotionState {
1085
1091
  }
1086
1092
  /**
1087
1093
  * `plugin.video.motion(engine)`: motion smoothing, the video's frame rate doubled by
1088
- * the GPU's frame-rate converter (AMD AMF's on Windows).
1094
+ * a GPU vendor's frame-rate converter (AMD AMF's or NVIDIA's
1095
+ * `fruc_vulkan`, on Windows).
1089
1096
  * Read whether it works here and why not; choose a mode for this plugin.
1090
1097
  *
1091
1098
  * @remarks
@@ -1108,8 +1115,13 @@ export interface MotionState {
1108
1115
  * Doubling makes film look like video (the "soap-opera effect"): offer it
1109
1116
  * off by default.
1110
1117
  *
1111
- * **Windows:** an AMD Radeon GPU with the AMD driver (AMF). On a laptop
1112
- * with two GPUs the converter runs on the AMD one, whichever GPU renders.
1118
+ * **Windows:** `amd`: an AMD Radeon GPU with the AMD driver (AMF);
1119
+ * `nvidia`: an NVIDIA GeForce RTX 30 or newer GPU with driver 573.38 or
1120
+ * newer (the converter gets a Vulkan device of its own while it runs, the
1121
+ * renderer is not involved; it starts on slow optical flow on a 4-pixel
1122
+ * grid, fast above 1440p). On a laptop with two GPUs the converter runs on
1123
+ * the engine's GPU, whichever GPU renders. One engine's converter at a
1124
+ * time: the other's modes wait with `other-engine`.
1113
1125
  * **macOS, Linux:** every mode reports `platform`.
1114
1126
  *
1115
1127
  * @example Offer the three modes as radio commands
@@ -1164,7 +1176,7 @@ export interface VideoMotion {
1164
1176
  *
1165
1177
  * @remarks
1166
1178
  * The mode stays this plugin's request until it changes it or stops; the
1167
- * player applies it whenever it can work (a `rate`, `size`, `format`, `doubling`, `upscaling`,
1179
+ * player applies it whenever it can work (a `rate`, `size`, `format`, `doubling`, `other-engine`, `upscaling`,
1168
1180
  * `failed` or `overload` reason can pass with the next video). `off`
1169
1181
  * takes the converter out at once unless another plugin asks for it. The
1170
1182
  * mode is a request of the whole plugin, not of a {@link Scope}.
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vestra Player SDK
2
2
 
3
- > @vestra-player/sdk 1.11.0-rc.5: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
3
+ > @vestra-player/sdk 1.11.1: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
4
4
 
5
5
  ## Read the documentation
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestra-player/sdk",
3
- "version": "1.11.0-rc.5",
3
+ "version": "1.11.1",
4
4
  "description": "Plugin API types, test host and plugin CLI for Vestra Player (apiVersion vestra/1)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -55,10 +55,10 @@ export global Icons {
55
55
  // Three sliders with their knobs (the adjust column, `host/adjust`),
56
56
  // the default 14 × 12 box.
57
57
  if name == "sliders" { return "M 1.5 2.5 H 7.6 M 10.4 2.5 H 12.5 M 10.4 2.5 A 1.4 1.4 0 1 1 7.6 2.5 A 1.4 1.4 0 1 1 10.4 2.5 Z M 1.5 6 H 3.1 M 5.9 6 H 12.5 M 5.9 6 A 1.4 1.4 0 1 1 3.1 6 A 1.4 1.4 0 1 1 5.9 6 Z M 1.5 9.5 H 6.6 M 9.4 9.5 H 12.5 M 9.4 9.5 A 1.4 1.4 0 1 1 6.6 9.5 A 1.4 1.4 0 1 1 9.4 9.5 Z"; }
58
- // A speech bubble open at its top right, where the AI icon's sparkle
59
- // breaks out ("ask": the palette's strip cell while a plugin holds its
60
- // first row, `palette.lead`), the default 14 × 12 box.
61
- if name == "search-ai" { return "M 7 3 H 3.25 Q 1.25 3 1.25 5 V 7.75 Q 1.25 9.75 3.25 9.75 V 11.25 L 5.5 9.75 H 8 Q 10 9.75 10 7.75 V 6.75 M 11 0.7 Q 11.29 2.61 13.2 2.9 Q 11.29 3.19 11 5.1 Q 10.71 3.19 8.8 2.9 Q 10.71 2.61 11 0.7 Z"; }
58
+ // A magnifier with the AI icon's four-point sparkle at its top right
59
+ // (the palette's strip cell while a plugin holds its first row,
60
+ // `palette.lead`), the default 14 × 12 box.
61
+ if name == "search-ai" { return "M 8.6 6.4 A 3.5 3.5 0 1 1 1.6 6.4 A 3.5 3.5 0 1 1 8.6 6.4 Z M 7.6 8.9 L 10.2 11.1 M 11.05 0.75 Q 11.336 2.664 13.25 2.95 Q 11.336 3.236 11.05 5.15 Q 10.764 3.236 8.85 2.95 Q 10.764 2.664 11.05 0.75 Z"; }
62
62
  return "";
63
63
  }
64
64
  // Line width.