@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface RenderOptions

    The GPU renderer's options, from plugin.video.render() . Single owner, like VideoView; the two are independent handles.

    Platforms: macOS renders on the GPU by default; Windows does since version 0.5.14 of the player when the user turns on the Picture panel's GPU Rendering (off by default, Rendering). Under software rendering (Windows by default, Linux, headless, fallback) every set fails with unsupported; SystemInfo.rendering tells which renderer draws without creating the handle. macOS OpenGL 4.1 has no compute shaders, so peakDetect is accepted but has no effect; output is always SDR.

    On a GPU-rendering player HDR video is tone-mapped with BT.2390 for a 250-nit display; under software rendering the plugin hides its HDR menu. set merges the values into the plugin's render options and the player reports the result through onStatus: failed with unsupported means the player renders in software (Linux, or Windows while GPU rendering is off).

    const render = plugin.video.render();
    render.onStatus((s) => {
    if (s.state === "failed" && s.error.code === "unsupported") hideHdrMenu();
    });
    render.set({ toneMapping: "bt.2390", targetPeak: 250 }); // nits

    GPU renderer options (tone mapping, peak detection, shaders, interpolation). Only the GPU renderer has them (macOS; Windows with GPU rendering turned on); under software rendering the handle is failed with unsupported after the player's first answer to render() (reported to onError too), and so is every set. Single owner, like VideoView. set never throws; the result shows in status. For shaders that several plugins add at the same time, use VideoShaders. After a run of the player that ended abnormally while plugin shaders were drawing, a set whose merged values hold a non-empty shaders list is refused with previous-crash (the rules are on VideoShaders). Every set sends all the values set so far, the refused shaders included, so include shaders: [] in the next set to go on without them.

    1.0.0

    interface RenderOptions {
        dispose(): Promise<void>;
        set(value: Partial<RenderSettings>): void;
        status: FilterStatus;
        onStatus(listener: (status: FilterStatus) => void): Disposable;
    }

    Hierarchy (View Summary)

    Index
    • Release the resource. Resolves once the player confirmed the release (or immediately for purely local resources). Never rejects.

      Returns Promise<void>

      Never.

      A "Turn feature off" item removes the feature's own menu item at once, before the plugin stops. dispose takes the command out of the menu and the binding table and resolves once the player confirmed it; the id can be added again later.

      const extra = plugin.commands.add({ id: "extra", path: ["Tools", "Extra"], run() {} });
      plugin.commands.add({
      id: "extra-off",
      path: ["Tools", "Turn extra off"],
      run: () => extra.dispose(), // never rejects
      });

      1.0.0

    • Merged into the current settings; last write wins.

      Parameters

      Returns void

      Motion becomes smoother on the GPU renderer. set merges the field into the plugin's render options; under software rendering the status turns failed with unsupported instead.

      plugin.video.render().set({ interpolation: true });
      

      1.0.0

    • The status changed (including later pushes such as shader compile errors).

      Parameters

      Returns Disposable

      The OSD shows mpv's message when a shader the plugin set fails to compile. The player pushes that failure after the set was accepted, so it arrives through onStatus, not as a rejected call.

      const render = plugin.video.render();
      render.onStatus((status) => {
      if (status.state === "failed") void plugin.osd.show("Render: {}", [status.error.message]);
      });

      1.0.0

    status: FilterStatus

    failed with unsupported while the player renders in software; failed with failed when mpv cannot compile a shader (pushed later; while other plugins' VideoShaders are on too, the player cannot tell whose shader failed and says so in the message); failed with previous-crash when a set with a non-empty shaders list comes after a run of the player that ended abnormally while plugin shaders were drawing (the rules are the same as for VideoShaders). The handle keeps the refused list among its values and every set sends them all, so a later set without shaders is refused again: include shaders: [] in it (set({ shaders: [], toneMapping: "bt.2390" })); dispose always works.