oa::VideoPlayer

VideoPlayer class in the OA Vision public surface.

Public Methods

oa::Status oa::VideoPlayer::close()
const VideoFrame & oa::VideoPlayer::currentFrame()
oa::Usize oa::VideoPlayer::currentFrameIndex()
oa::Result<oa::Image> oa::VideoPlayer::currentFrameToImage(bool inNormalizeImageNet = true)
oa::Result<Matrix> oa::VideoPlayer::currentFrameToMatrix(bool inNormalizeImageNet = true)
oa::U64 oa::VideoPlayer::durationUs()
oa::Status oa::VideoPlayer::flush()
oa::Usize oa::VideoPlayer::frameCount()
oa::F32 oa::VideoPlayer::frameIntervalMs()
oa::U32 oa::VideoPlayer::frameRate()
const VideoContainerInfo & oa::VideoPlayer::getContainerInfo()
const VideoDemuxerStats & oa::VideoPlayer::getDemuxerStats()
const VideoPlayerStats & oa::VideoPlayer::getPlaybackStats()
bool oa::VideoPlayer::hasAudio()
oa::U32 oa::VideoPlayer::height()
oa::I64 oa::VideoPlayer::index()
bool oa::VideoPlayer::isDone()
bool oa::VideoPlayer::isEos()
bool oa::VideoPlayer::isLooping()
bool oa::VideoPlayer::isPlaying()
void oa::VideoPlayer::markCurrentFrameConsumed(const oa::Event & inConsumed)
oa::Status oa::VideoPlayer::next()
void oa::VideoPlayer::pause()
void oa::VideoPlayer::play()
oa::U64 oa::VideoPlayer::positionUs()
oa::Result<oa::Vector<oa::U8>> oa::VideoPlayer::readbackCurrentRgba()
void oa::VideoPlayer::reset()
oa::Status oa::VideoPlayer::seek(oa::U64 inTimestamp)
oa::Status oa::VideoPlayer::seekFrame(oa::Usize inFrameIndex)
oa::Status oa::VideoPlayer::seekUs(oa::U64 inTimestampUs)
void oa::VideoPlayer::setLoop(bool inLoop)
oa::Status oa::VideoPlayer::stepBackward()
oa::Status oa::VideoPlayer::stepFrames(oa::I32 inFrameDelta)
void oa::VideoPlayer::tick(oa::F32 inDeltaMs)
void oa::VideoPlayer::togglePlay()
oa::U32 oa::VideoPlayer::width()

Static Public Methods

static oa::Result<VideoPlayer> oa::VideoPlayer::open(Engine & inEngine, const VideoPlayerConfig & inConfig)

Constructor & Destructor Documentation

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

Public Method Documentation

oa::Status oa::VideoPlayer::close()
Explicit completion and resource-release boundary. Waits exact retained frame-consumer events before releasing decoder-owned image storage.

Returns

oa::Status

The declared return value.

const VideoFrame & oa::VideoPlayer::currentFrame()
Most recently decoded frame. imageView is VK_NULL_HANDLE until the first successful decode.

Returns

const VideoFrame &

The declared return value.

oa::Usize oa::VideoPlayer::currentFrameIndex()
No public source comment is attached to this declaration.

Returns

oa::Usize

The declared return value.

oa::Result<oa::Image> oa::VideoPlayer::currentFrameToImage( bool inNormalizeImageNet = true )
No public source comment is attached to this declaration.

Parameters

inNormalizeImageNet
bool

Default: true

Returns

oa::Result<oa::Image>

The declared return value.

oa::Result<Matrix> oa::VideoPlayer::currentFrameToMatrix( bool inNormalizeImageNet = true )
convert the current decoder-owned frame to an ML tensor. conversion lives on VideoPlayer rather than VideoFrame because the decoder session owns the image views, YCbCr metadata, synchronization and conversion resources.

Parameters

inNormalizeImageNet
bool

Default: true

Returns

oa::Result<Matrix>

The declared return value.

oa::U64 oa::VideoPlayer::durationUs()
Unified viewer transport timebase. Public timeline APIs use microseconds; container-specific ticks remain private to VideoPlayer::seek.

Returns

oa::U64

The declared return value.

oa::Status oa::VideoPlayer::flush()
drain outstanding GPU work and clear queued display frames.

Returns

oa::Status

The declared return value.

oa::Usize oa::VideoPlayer::frameCount()
No public source comment is attached to this declaration.

Returns

oa::Usize

The declared return value.

oa::F32 oa::VideoPlayer::frameIntervalMs()
No public source comment is attached to this declaration.

Returns

oa::F32

The declared return value.

oa::U32 oa::VideoPlayer::frameRate()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

const VideoContainerInfo & oa::VideoPlayer::getContainerInfo()
No public source comment is attached to this declaration.

Returns

const VideoContainerInfo &

The declared return value.

const VideoDemuxerStats & oa::VideoPlayer::getDemuxerStats()
No public source comment is attached to this declaration.

Returns

const VideoDemuxerStats &

The declared return value.

const VideoPlayerStats & oa::VideoPlayer::getPlaybackStats()
No public source comment is attached to this declaration.

Returns

const VideoPlayerStats &

The declared return value.

bool oa::VideoPlayer::hasAudio()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::U32 oa::VideoPlayer::height()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

oa::I64 oa::VideoPlayer::index()
Returns the number of frames decoded since the most recent rewind.

Returns

oa::I64

The declared return value.

bool oa::VideoPlayer::isDone()
isDone() is permanently false in looping mode. in non-looping mode, flips to true once the underlying stream's EOS has been observed and the last decoded frame consumed.

Returns

bool

The declared return value.

bool oa::VideoPlayer::isEos()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::VideoPlayer::isLooping()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::VideoPlayer::isPlaying()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

void oa::VideoPlayer::markCurrentFrameConsumed( const oa::Event & inConsumed )
Record the compute submission that most recently sampled currentFrame(). The session will not recycle that RGBA image until inConsumed completes. frames advanced without being rendered remain immediately reusable.

Parameters

inConsumed
const oa::Event &

Returns

void

The declared return value.

oa::Status oa::VideoPlayer::next()
Advances by exactly one decoded frame (ignores playing_, ignores the wall-clock accumulator). Use tick() for time-paced playback. advance to the next display-order frame. open() presents the first frame, so the initial currentFrame() is immediately usable. next() reports decode, demux and synchronization failures instead of hiding them.

Returns

oa::Status

The declared return value.

void oa::VideoPlayer::pause()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

void oa::VideoPlayer::play()
─── playback control ─────────────────────────────────────────────────

Returns

void

The declared return value.

oa::U64 oa::VideoPlayer::positionUs()
No public source comment is attached to this declaration.

Returns

oa::U64

The declared return value.

oa::Result<oa::Vector<oa::U8>> oa::VideoPlayer::readbackCurrentRgba()
Read back the current converted RGBA frame. This is intended for CPU reference overlays and diagnostics; realtime inference should consume currentFrame() directly on the GPU.

Returns

oa::Result<oa::Vector<oa::U8>>

The declared return value.

void oa::VideoPlayer::reset()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

oa::Status oa::VideoPlayer::seek( oa::U64 inTimestamp )
Seek in the container video-track timebase. Ordinary seeks flush decoder state without destroying reusable RGBA allocations; genuine stream-format generation changes recreate the decoder.

Parameters

inTimestamp
oa::U64

Returns

oa::Status

The declared return value.

oa::Status oa::VideoPlayer::seekFrame( oa::Usize inFrameIndex )
Select an exact display-order frame. The caller owns play/pause policy; timestamp rounding remains confined to time-based seekUs().

Parameters

inFrameIndex
oa::Usize

Returns

oa::Status

The declared return value.

oa::Status oa::VideoPlayer::seekUs( oa::U64 inTimestampUs )
No public source comment is attached to this declaration.

Parameters

inTimestampUs
oa::U64

Returns

oa::Status

The declared return value.

void oa::VideoPlayer::setLoop( bool inLoop )
No public source comment is attached to this declaration.

Parameters

inLoop
bool

Returns

void

The declared return value.

oa::Status oa::VideoPlayer::stepBackward()
Present the previous display-order frame. Cache-resident history does no decode work; a miss seeks to the preceding keyframe and rebuilds a bounded presentation window.

Returns

oa::Status

The declared return value.

oa::Status oa::VideoPlayer::stepFrames( oa::I32 inFrameDelta )
Scrub by a signed number of display-order frames. Positive movement advances normally; negative movement uses retained presentation history first and replays through the reorder path only on a cache miss.

Parameters

inFrameDelta
oa::I32

Returns

oa::Status

The declared return value.

void oa::VideoPlayer::tick( oa::F32 inDeltaMs )
advance by wall clock when playing. When paused, accumulates nothing (no implicit frame skipping after un-pause).

Parameters

inDeltaMs
oa::F32

Returns

void

The declared return value.

void oa::VideoPlayer::togglePlay()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

oa::U32 oa::VideoPlayer::width()
─── stream metadata passthroughs ─────────────────────────────────────

Returns

oa::U32

The declared return value.

static oa::Result<VideoPlayer> oa::VideoPlayer::open( Engine & inEngine, const VideoPlayerConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inEngine
Engine &

inConfig
const VideoPlayerConfig &

Returns

oa::Result<VideoPlayer>

The declared return value.