Loading...
Searching...
No Matches
VideoOutputStrategy.hpp File Reference

Vendor-neutral interface for GPU-direct video OUTPUT strategies. More...

Detailed Description

Vendor-neutral interface for GPU-direct video OUTPUT strategies.

Any peer device that can "give me a GPU pointer I can DMA from" (capture cards via a vendor pin/register call, plus NVIDIA DVP and SMPTE 2110 variants) can hang strategies off the same dispatch chain inside its addon.

Concrete implementations live in each vendor's addon; only the interface and the supporting helpers (ImportedGpuBufferRing, InteropFence, ComputeRingDispatcher, RdmaVideoOutput) live here, so a per-vendor file shrinks to ~50 lines: construct a RdmaVideoOutput, fill in the pin/unpin callbacks.

Lifecycle:

  1. Vendor addon picks a strategy based on backend + feature availability + vendor-specific format constraints; constructs it with the vendor-specific bits (card handle, format enum, channel, ...) as constructor args.
  2. Addon calls init(VideoOutputStrategyConfig{rhi, state, sourceTex, w, h, frameByteSize}). On failure (no CUDA, format unsupported, vendor refused to pin), strategy releases its partial state and returns false; addon falls back to the next strategy (or CPU staging).
  3. Per frame:
    • encodeFrame(cb) inside the offscreen frame.
    • prepareNextFrame() after endOffscreenFrame returns the GPU pointer to feed the vendor submission API (AutoCirculateTransfer.SetVideoBuffer, MWCaptureVideoFrameToPhysicalAddress, rmx_output_*_send_chunk, ...).
  4. release() at shutdown.

Go to the source code of this file.

Classes

struct  score::gfx::interop::VideoOutputStrategyConfig
 Generic config passed to VideoOutputStrategy::init. Vendor- specific bits (card handle, pixel-format enum, ...) live on the strategy class itself. More...
 
struct  score::gfx::interop::VideoOutputStrategy
 Per-graphics-API strategy interface for vendor GPU-direct output. Each addon implements one impl per (graphics API, vendor interop family) tuple. More...
 

Namespaces

namespace  score
 Base toolkit upon which the software is built.
 
namespace  score::gfx
 Graphics rendering pipeline for ossia score.