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

Generic "try GPU-direct output strategies in order" picker. More...

Detailed Description

Generic "try GPU-direct output strategies in order" picker.

Every output addon walks the same DVP -> RDMA -> (CPU) candidate chain: construct a strategy, init() it, on success keep it, on failure release and try the next. Only the candidate list (which is backend- and vendor- specific, gated by if macros) differs. This helper owns the init/log/release/ fallback loop so each addon just builds the candidate factories.

The per-vendor strategy classes stay in the addon (they hold the card handle and pixel-format enum); the addon passes factory thunks that construct them.

Go to the source code of this file.

Namespaces

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

Functions

std::unique_ptr< VideoOutputStrategyscore::gfx::interop::selectVideoOutputStrategy (const VideoOutputStrategyConfig &cfg, std::vector< std::function< std::unique_ptr< VideoOutputStrategy >()> > candidates, const std::function< void(const char *)> &onEngaged={}, const std::function< void(const char *)> &onFailed={})
 

Function Documentation

◆ selectVideoOutputStrategy()

std::unique_ptr< VideoOutputStrategy > score::gfx::interop::selectVideoOutputStrategy ( const VideoOutputStrategyConfig cfg,
std::vector< std::function< std::unique_ptr< VideoOutputStrategy >()> >  candidates,
const std::function< void(const char *)> &  onEngaged = {},
const std::function< void(const char *)> &  onFailed = {} 
)
inline

Try each candidate factory in order against cfg. The first whose init() succeeds is returned (ownership transfers to the caller, which must release() it at shutdown). Failed candidates are release()d and skipped, as are null factories and null results. Returns nullptr if none succeed.

onEngaged(name) / onFailed(name) are optional logging callbacks invoked with the strategy's name() so the caller can report which path engaged.