oa::FnVideo

FnVideo namespace in the OA Vision public surface.

NsC++ public headers

Public Functions

oa::Vector<oa::U8> oa::FnVideo::emitNalAnnexB(const oa::Span<const NalUnit> & inUnits)
oa::Vector<oa::U8> oa::FnVideo::extractPps(const oa::Span<const oa::U8> & inNalBytes)
oa::Vector<oa::U8> oa::FnVideo::extractPpsH265(const oa::Span<const oa::U8> & inNalBytes)
oa::Vector<oa::U8> oa::FnVideo::extractSps(const oa::Span<const oa::U8> & inNalBytes)
oa::Vector<oa::U8> oa::FnVideo::extractSpsH265(const oa::Span<const oa::U8> & inNalBytes)
oa::Vector<oa::U8> oa::FnVideo::extractVpsH265(const oa::Span<const oa::U8> & inNalBytes)
oa::Result<VideoFrame> oa::FnVideo::fromTexture(const oa::Texture & inTexture, oa::U64 inPts = 0ULL, oa::Event inReady = = {})
oa::Vector<NalUnit> oa::FnVideo::parseNalAnnexB(const oa::Span<const oa::U8> & inBytes)

Function Documentation

oa::Vector<oa::U8> oa::FnVideo::emitNalAnnexB( const oa::Span<const NalUnit> & inUnits )
Concatenate NAL payloads with 4-byte start codes (00 00 00 01). Caller-owned output buffer.

Parameters

inUnits
const oa::Span<const NalUnit> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Vector<oa::U8> oa::FnVideo::extractPps( const oa::Span<const oa::U8> & inNalBytes )
Same for the first PPS unit.

Parameters

inNalBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Vector<oa::U8> oa::FnVideo::extractPpsH265( const oa::Span<const oa::U8> & inNalBytes )
No public source comment is attached to this declaration.

Parameters

inNalBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Vector<oa::U8> oa::FnVideo::extractSps( const oa::Span<const oa::U8> & inNalBytes )
Return the raw bytes (including NAL header) of the first SPS unit found in inNalBytes; empty if none.

Parameters

inNalBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Vector<oa::U8> oa::FnVideo::extractSpsH265( const oa::Span<const oa::U8> & inNalBytes )
No public source comment is attached to this declaration.

Parameters

inNalBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Vector<oa::U8> oa::FnVideo::extractVpsH265( const oa::Span<const oa::U8> & inNalBytes )
HEVC parameter-set extraction. H.265 uses a two-byte NAL header and different type encoding, so these are deliberately codec-explicit.

Parameters

inNalBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<oa::U8>

The declared return value.

oa::Result<VideoFrame> oa::FnVideo::fromTexture( const oa::Texture & inTexture, oa::U64 inPts = 0ULL, oa::Event inReady = = {} )
Wrap a buffer- or image-backed render target in the common video-frame contract. The texture remains producer-owned; image readiness can be supplied without a host wait.

Parameters

inTexture
const oa::Texture &

inPts
oa::U64

Default: 0ULL

inReady
oa::Event

Default: = {}

Returns

oa::Result<VideoFrame>

The declared return value.

oa::Vector<NalUnit> oa::FnVideo::parseNalAnnexB( const oa::Span<const oa::U8> & inBytes )
split an Annex-B byte stream into NAL units (skip 00 00 00 01 / 00 00 01 start codes). Payloads alias back into inBytes; do not outlive the input buffer.

Parameters

inBytes
const oa::Span<const oa::U8> &

Returns

oa::Vector<NalUnit>

The declared return value.