oa::Viewer

Windowed or headless application session for inspecting OA images, video, audio and live GPU output. The Viewer owns UI, input, window and presenter state. It either creates one engine for run() or borrows the caller's engine for run(oa::Engine & ); it never creates a second device runtime in that path.

Public Methods

oa::Status oa::Viewer::run()
oa::Status oa::Viewer::run(oa::Engine & inEngine)
void oa::Viewer::setConfig(const ViewerConfig & inConfig)
void oa::Viewer::setMode(ViewerMode inMode)
void oa::Viewer::setPath(const char * inPath)
void oa::Viewer::setPath(const oa::String & inPath)

Static Public Methods

static oa::Status oa::Viewer::preview(const char * inPath, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(const oa::String & inPath, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, const char * inPath, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, const oa::Image & inImage, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, const oa::Matrix & inMatrix, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, const oa::String & inPath, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, const oa::Texture & inTexture, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::preview(oa::Engine & inEngine, oa::Renderer & inRenderer, const oa::RenderFrame & inFrame, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::save(oa::Engine & inEngine, const oa::Texture & inTexture, const char * inPath)
static oa::Status oa::Viewer::show(oa::Engine & inEngine, const oa::Image & inImage, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::show(oa::Engine & inEngine, const oa::Matrix & inMatrix, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::show(oa::Engine & inEngine, const oa::Texture & inTexture, const ViewerConfig & inConfig = {})
static oa::Status oa::Viewer::show(oa::Engine & inEngine, oa::Renderer & inRenderer, const oa::RenderFrame & inFrame, const ViewerConfig & inConfig = {})

Examples

Constructor & Destructor Documentation

oa::Viewer::Viewer()
No public source comment is attached to this declaration.
oa::Viewer::Viewer( const ViewerConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inConfig
const ViewerConfig &

oa::Viewer::Viewer( const char * inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const char *

oa::Viewer::Viewer( const oa::String & inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const oa::String &

void oa::Viewer::~Viewer()
No public source comment is attached to this declaration.

Public Method Documentation

oa::Status oa::Viewer::run()
No public source comment is attached to this declaration.

Returns

oa::Status

The declared return value.

oa::Status oa::Viewer::run( oa::Engine & inEngine )
run the windowed session against an existing presentation-capable engine. The viewer borrows the engine and closes only its presenter/window state.

Parameters

inEngine
oa::Engine &

Returns

oa::Status

The declared return value.

void oa::Viewer::setConfig( const ViewerConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inConfig
const ViewerConfig &

Returns

void

The declared return value.

void oa::Viewer::setMode( ViewerMode inMode )
No public source comment is attached to this declaration.

Parameters

inMode
ViewerMode

Returns

void

The declared return value.

void oa::Viewer::setPath( const char * inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const char *

Returns

void

The declared return value.

void oa::Viewer::setPath( const oa::String & inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const oa::String &

Returns

void

The declared return value.

static oa::Status oa::Viewer::preview( const char * inPath, const ViewerConfig & inConfig = {} )
Unified blocking preview front door. Paths are decoder-probed as image, video, then audio and may either own an application engine or borrow the caller's presentation-capable engine. Direct GPU values always borrow the caller's engine and retain the exact completion contract of show().

Parameters

inPath
const char *

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( const oa::String & inPath, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inPath
const oa::String &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, const char * inPath, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inPath
const char *

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, const oa::Image & inImage, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inImage
const oa::Image &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, const oa::Matrix & inMatrix, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inMatrix
const oa::Matrix &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, const oa::String & inPath, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inPath
const oa::String &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, const oa::Texture & inTexture, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inTexture
const oa::Texture &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::preview( oa::Engine & inEngine, oa::Renderer & inRenderer, const oa::RenderFrame & inFrame, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inRenderer
oa::Renderer &

inFrame
const oa::RenderFrame &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::save( oa::Engine & inEngine, const oa::Texture & inTexture, const char * inPath )
Headless sink for a ready buffer-backed texture. Image-backed renderer frames use their owning session's saveTo/consumeReadback contract.

Parameters

inEngine
oa::Engine &

inTexture
const oa::Texture &

inPath
const char *

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::show( oa::Engine & inEngine, const oa::Image & inImage, const ViewerConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inImage
const oa::Image &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::show( oa::Engine & inEngine, const oa::Matrix & inMatrix, const ViewerConfig & inConfig = {} )
Compatibility spelling for blocking one-shot display sinks. Matrix and image overloads record the RGBA8 conversion into the engine's matching private recorder, submit it once, and pass its exact completion into presentation. New code uses preview() so file-backed and direct values share one discoverable verb.

Parameters

inEngine
oa::Engine &

inMatrix
const oa::Matrix &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::show( oa::Engine & inEngine, const oa::Texture & inTexture, const ViewerConfig & inConfig = {} )
Ready buffer-backed textures can be displayed without conversion.

Parameters

inEngine
oa::Engine &

inTexture
const oa::Texture &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.

static oa::Status oa::Viewer::show( oa::Engine & inEngine, oa::Renderer & inRenderer, const oa::RenderFrame & inFrame, const ViewerConfig & inConfig = {} )
Image-backed renderer targets require their generation-safe frame and owning session. The blocking viewer returns its final graphics completion to that session before the presentation timelines are destroyed.

Parameters

inEngine
oa::Engine &

inRenderer
oa::Renderer &

inFrame
const oa::RenderFrame &

inConfig
const ViewerConfig &

Default: {}

Returns

oa::Status

The declared return value.