vision

May 15, 2026 ยท View on GitHub

{#visionmodule}

vision

Video intelligence primitives for sampled frame processing and event output.

Namespaces

NameDescription
vision

{#vision}

vision

Classes

NameDescription
DetectionQueueAsync queue for normalized detector-ready frames.
DetectorBase interface for detectors that consume normalized vision frames.
FrameNormalizerConverts sampled decoded video into owned detector-ready frames.
FrameSamplerPacketProcessor that forwards a sampled subset of decoded video frames.
MotionDetector
VisionEventEmitter
Detection
FrameNormalizerConfig
FrameNormalizerStats
FrameSamplerConfig
FrameSamplerStats
MotionDetectorConfig
MotionDetectorStats
Region
Track
VisionEvent
VisionFrameContext
VisionFramePacketOwned detector-ready frame buffer carrying stable frame metadata.

Typedefs

ReturnNameDescription
Signal< void(const VisionEvent &)>VisionEventSignal
VisionFrameContextFrameRef

{#visioneventsignal}

VisionEventSignal

using VisionEventSignal = Signal< void(const VisionEvent &)>

{#frameref}

FrameRef

using FrameRef = VisionFrameContext

Functions

ReturnNameDescription
Vision_APIVisionFrameContextmakeVisionFrameContext nodiscard
FrameRefmakeFrameRef inline nodiscard
Vision_APIjson::ValuetoJson nodiscard
Vision_APIjson::ValuetoJson nodiscard
Vision_APIjson::ValuetoJson nodiscard
Vision_APIjson::ValuetoJson nodiscard
Vision_APIjson::ValuetoJson nodiscard

{#makevisionframecontext}

makeVisionFrameContext

nodiscard

[[nodiscard]] Vision_APIVisionFrameContext makeVisionFrameContext(const av::PlanarVideoPacket & packet, uint64_t frameId = 0, const std::string & sourceId = {}, const std::string & streamId = {}, int64_t receivedAtUsec = 0)

{#makeframeref}

makeFrameRef

inline nodiscard

[[nodiscard]] inline FrameRef makeFrameRef(const av::PlanarVideoPacket & packet, uint64_t sequence = 0, const std::string & sourceId = {}, const std::string & streamId = {}, int64_t receivedAtUsec = 0)

{#tojson-3}

toJson

nodiscard

[[nodiscard]] Vision_APIjson::Value toJson(const Region & region)

{#tojson-4}

toJson

nodiscard

[[nodiscard]] Vision_APIjson::Value toJson(const VisionFrameContext & frame)

{#tojson-5}

toJson

nodiscard

[[nodiscard]] Vision_APIjson::Value toJson(const Detection & detection)

{#tojson-6}

toJson

nodiscard

[[nodiscard]] Vision_APIjson::Value toJson(const Track & track)

{#tojson-7}

toJson

nodiscard

[[nodiscard]] Vision_APIjson::Value toJson(const VisionEvent & event)

{#detectionqueue}

DetectionQueue

#include <icy/vision/detectionqueue.h>
class DetectionQueue

Defined in src/vision/include/icy/vision/detectionqueue.h:30

Inherits: AsyncPacketQueue< VisionFramePacket >

Async queue for normalized detector-ready frames.

This is the intentional async boundary for detection work. Upstream stages can stay borrowed until [FrameNormalizer](#framenormalizer) materializes an owned [VisionFramePacket](#visionframepacket), after which this queue bounds in-flight detection work by dropping the oldest queued frames first.

List of all members

NameKindOwner
DetectionQueuefunctionDeclared here
QueuetypedefInherited from AsyncPacketQueue
ProcessortypedefInherited from AsyncPacketQueue
emittervariableInherited from AsyncPacketQueue
AsyncPacketQueuefunctionInherited from AsyncPacketQueue
~AsyncPacketQueuefunctionInherited from AsyncPacketQueue
closefunctionInherited from AsyncPacketQueue
processfunctionInherited from AsyncPacketQueue
acceptsfunctionInherited from AsyncPacketQueue
retentionfunctionInherited from AsyncPacketQueue
dispatchfunctionInherited from AsyncPacketQueue
onStreamStateChangefunctionInherited from AsyncPacketQueue
QueuetypedefInherited from AsyncQueue
_threadvariableInherited from AsyncQueue
AsyncQueuefunctionInherited from AsyncQueue
cancelfunctionInherited from AsyncQueue
~AsyncQueuefunctionInherited from AsyncQueue
ondispatchvariableInherited from RunnableQueue
_limitvariableInherited from RunnableQueue
_timeoutvariableInherited from RunnableQueue
_droppedvariableInherited from RunnableQueue
RunnableQueuefunctionInherited from RunnableQueue
~RunnableQueuefunctionInherited from RunnableQueue
pushfunctionInherited from RunnableQueue
flushfunctionInherited from RunnableQueue
clearfunctionInherited from RunnableQueue
runfunctionInherited from RunnableQueue
runTimeoutfunctionInherited from RunnableQueue
dispatchfunctionInherited from RunnableQueue
timeoutfunctionInherited from RunnableQueue
setTimeoutfunctionInherited from RunnableQueue
droppedfunctionInherited from RunnableQueue
RunnableQueuefunctionInherited from RunnableQueue
operator=functionInherited from RunnableQueue
RunnableQueuefunctionInherited from RunnableQueue
operator=functionInherited from RunnableQueue
popNextfunctionInherited from RunnableQueue
dispatchNextfunctionInherited from RunnableQueue
_queuevariableInherited from Queue
_mutexvariableInherited from Queue
pushfunctionInherited from Queue
pushfunctionInherited from Queue
emptyfunctionInherited from Queue
frontfunctionInherited from Queue
backfunctionInherited from Queue
popfunctionInherited from Queue
sortfunctionInherited from Queue
sizefunctionInherited from Queue
queuefunctionInherited from Queue
RunnablefunctionInherited from Runnable
runfunctionInherited from Runnable
cancelfunctionInherited from Runnable
cancelledfunctionInherited from Runnable
exitvariableInherited from Runnable
PacketProcessorfunctionInherited from PacketProcessor
processfunctionInherited from PacketProcessor
acceptsfunctionInherited from PacketProcessor
operator<<functionInherited from PacketProcessor
_emittervariableInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
~PacketStreamAdapterfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
getEmitterfunctionInherited from PacketStreamAdapter
retentionfunctionInherited from PacketStreamAdapter
onStreamStateChangefunctionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter

Inherited from AsyncPacketQueue

KindNameDescription
typedefQueue
typedefProcessor
variableemitter
functionAsyncPacketQueue inline
function~AsyncPacketQueue virtual inline
functionclose virtual inlineFlushes remaining packets, cancels the queue, and joins the dispatch thread.
functionprocess virtual inline overrideClones the incoming packet and pushes it onto the async queue. This queue is therefore an explicit PacketStream ownership boundary. Drops the packet with a warning if the queue has been cancelled.
functionaccepts virtual inline overrideReturns true if the packet can be cast to type T.
functionretention virtual const inline nodiscard overrideReturns how this adapter treats incoming packet lifetime. Most adapters are synchronous and therefore only borrow the packet for the current call chain. Queue-style adapters override this to advertise that they clone before deferred use. Callers may treat the first adapter reporting Cloned or Retained as the explicit ownership boundary in the stream graph.
functiondispatch inline overrideEmits the packet to downstream processors from the async thread.
functiononStreamStateChange virtual inline overrideCloses the queue on [Error](base.md#error) or Closed stream state transitions.

Inherited from AsyncQueue

KindNameDescription
typedefQueue
variable_thread
functionAsyncQueue inline
functioncancel virtual inline overrideCancels the queue and joins the dispatch thread.
function~AsyncQueue virtual inline

Inherited from RunnableQueue

KindNameDescription
variableondispatchThe default dispatch function. Must be set before the queue is running.
variable_limit
variable_timeout
variable_dropped
functionRunnableQueue inline
function~RunnableQueue virtual inline
functionpush virtual inlinePush an item onto the queue. The queue takes ownership of the item pointer.
functionflush virtual inlineFlush all outgoing items.
functionclear inline
functionrun virtual inline overrideCalled asynchronously to dispatch queued items. If not timeout is set this method blocks until cancel() is called, otherwise runTimeout() will be called.
functionrunTimeout virtual inlineCalled asynchronously to dispatch queued items until the queue is empty or the timeout expires. Pseudo protected for std::bind compatability.
functiondispatch virtual inlineDispatch a single item to listeners.
functiontimeout inline
functionsetTimeout inlineSets the dispatch timeout. Must only be called when the queue is empty.
functiondropped const inline
functionRunnableQueueDeleted constructor.
functionoperator=Deleted assignment operator.
functionRunnableQueueDeleted constructor.
functionoperator=Deleted assignment operator.
functionpopNext virtual inlinePops the next waiting item.
functiondispatchNext virtual inlinePops and dispatches the next waiting item.

Inherited from Queue

KindNameDescription
variable_queue
variable_mutex
functionpush inlineAppends an item to the back of the queue (thread-safe).
functionpush inlineAppends an item to the back of the queue by move (thread-safe).
functionempty const inline
functionfront const inline
functionback const inline
functionpop inlineRemoves the front item from the queue (thread-safe).
functionsort inlineSorts all queued items using the given comparator (thread-safe).
functionsize const inline
functionqueue const inline

Inherited from Runnable

KindNameDescription
functionRunnable inline
functionrun virtualThe run method will be called by the asynchronous context.
functioncancel virtual inlineCancel the current task. The run() method should return ASAP.
functioncancelled virtual const inlineReturns true when the task has been cancelled.
variableexit

Inherited from PacketProcessor

KindNameDescription
functionPacketProcessor inline
functionprocess virtualThis method performs processing on the given packet and emits the result.
functionaccepts virtual inlineThis method ensures compatibility with the given packet type. Return false to reject the packet.
functionoperator<< virtual inlineStream operator alias for process().

Inherited from PacketStreamAdapter

KindNameDescription
variable_emitter
functionPacketStreamAdapterConstruct the adapter, binding it to the given packet signal.
function~PacketStreamAdapter virtual inline
functionemit virtualEmit a mutable raw buffer as a packet.
functionemit virtualEmit a read-only raw buffer as a packet (data is copied internally).
functionemit virtualEmit a string as a packet (data is copied internally).
functionemit virtualEmit a flag-only packet carrying no payload data.
functionemit virtualEmit an existing packet directly onto the outgoing signal.
functiongetEmitterReturns a reference to the outgoing packet signal.
functionretention virtual const nodiscardReturns how this adapter treats incoming packet lifetime. Most adapters are synchronous and therefore only borrow the packet for the current call chain. Queue-style adapters override this to advertise that they clone before deferred use. Callers may treat the first adapter reporting Cloned or Retained as the explicit ownership boundary in the stream graph.
functiononStreamStateChange virtual inlineCalled by the PacketStream to notify when the internal Stream state changes. On receiving the Stopped state, it is the responsibility of the adapter to have ceased all outgoing packet transmission, especially in multi-thread scenarios.
functionPacketStreamAdapterNonCopyable and NonMovable.
functionoperator=Deleted assignment operator.
functionPacketStreamAdapterDeleted constructor.
functionoperator=Deleted assignment operator.

Public Methods

ReturnNameDescription
DetectionQueue inline explicit

{#detectionqueue-1}

DetectionQueue

inline explicit

inline explicit DetectionQueue(int maxFrames = 32)

Defined in src/vision/include/icy/vision/detectionqueue.h:33

{#detector-1}

Detector

#include <icy/vision/detector.h>
class Detector

Defined in src/vision/include/icy/vision/detector.h:25

Subclassed by: MotionDetector

Base interface for detectors that consume normalized vision frames.

List of all members

NameKindOwner
EventvariableDeclared here
resetfunctionDeclared here
processfunctionDeclared here

Public Attributes

ReturnNameDescription
VisionEventSignalEvent

{#event-6}

Event

VisionEventSignal Event

Defined in src/vision/include/icy/vision/detector.h:30

Public Methods

ReturnNameDescription
voidreset virtual
voidprocess virtual

{#reset-16}

reset

virtual

virtual void reset()

Defined in src/vision/include/icy/vision/detector.h:32

Reimplemented by

{#process-8}

process

virtual

virtual void process(const VisionFramePacket & packet)

Defined in src/vision/include/icy/vision/detector.h:33

Reimplemented by

{#framenormalizer}

FrameNormalizer

#include <icy/vision/framenormalizer.h>
class FrameNormalizer

Defined in src/vision/include/icy/vision/framenormalizer.h:49

Inherits: PacketProcessor

Converts sampled decoded video into owned detector-ready frames.

List of all members

NameKindOwner
emittervariableDeclared here
FrameNormalizerfunctionDeclared here
setConfigfunctionDeclared here
configfunctionDeclared here
statsfunctionDeclared here
resetfunctionDeclared here
processfunctionDeclared here
acceptsfunctionDeclared here
_configvariableDeclared here
_seenvariableDeclared here
_emittedvariableDeclared here
_droppedvariableDeclared here
_convertedvariableDeclared here
_frameIdvariableDeclared here
_statevariableDeclared here
normalizefunctionDeclared here
sanitizefunctionDeclared here
PacketProcessorfunctionInherited from PacketProcessor
processfunctionInherited from PacketProcessor
acceptsfunctionInherited from PacketProcessor
operator<<functionInherited from PacketProcessor
_emittervariableInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
~PacketStreamAdapterfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
getEmitterfunctionInherited from PacketStreamAdapter
retentionfunctionInherited from PacketStreamAdapter
onStreamStateChangefunctionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter

Inherited from PacketProcessor

KindNameDescription
functionPacketProcessor inline
functionprocess virtualThis method performs processing on the given packet and emits the result.
functionaccepts virtual inlineThis method ensures compatibility with the given packet type. Return false to reject the packet.
functionoperator<< virtual inlineStream operator alias for process().

Inherited from PacketStreamAdapter

KindNameDescription
variable_emitter
functionPacketStreamAdapterConstruct the adapter, binding it to the given packet signal.
function~PacketStreamAdapter virtual inline
functionemit virtualEmit a mutable raw buffer as a packet.
functionemit virtualEmit a read-only raw buffer as a packet (data is copied internally).
functionemit virtualEmit a string as a packet (data is copied internally).
functionemit virtualEmit a flag-only packet carrying no payload data.
functionemit virtualEmit an existing packet directly onto the outgoing signal.
functiongetEmitterReturns a reference to the outgoing packet signal.
functionretention virtual const nodiscardReturns how this adapter treats incoming packet lifetime. Most adapters are synchronous and therefore only borrow the packet for the current call chain. Queue-style adapters override this to advertise that they clone before deferred use. Callers may treat the first adapter reporting Cloned or Retained as the explicit ownership boundary in the stream graph.
functiononStreamStateChange virtual inlineCalled by the PacketStream to notify when the internal Stream state changes. On receiving the Stopped state, it is the responsibility of the adapter to have ceased all outgoing packet transmission, especially in multi-thread scenarios.
functionPacketStreamAdapterNonCopyable and NonMovable.
functionoperator=Deleted assignment operator.
functionPacketStreamAdapterDeleted constructor.
functionoperator=Deleted assignment operator.

Public Attributes

ReturnNameDescription
PacketSignalemitter

{#emitter-8}

emitter

PacketSignal emitter

Defined in src/vision/include/icy/vision/framenormalizer.h:52

Public Methods

ReturnNameDescription
FrameNormalizer explicit
voidsetConfig
FrameNormalizerConfigconfig const nodiscard
FrameNormalizerStatsstats const nodiscard
voidreset
voidprocess virtual overrideThis method performs processing on the given packet and emits the result.
boolaccepts virtual inline overrideThis method ensures compatibility with the given packet type. Return false to reject the packet.

{#framenormalizer-1}

FrameNormalizer

explicit

explicit FrameNormalizer(FrameNormalizerConfig config = {})

Defined in src/vision/include/icy/vision/framenormalizer.h:54


{#setconfig-1}

setConfig

void setConfig(FrameNormalizerConfig config)

Defined in src/vision/include/icy/vision/framenormalizer.h:57


{#config-1}

config

const nodiscard

[[nodiscard]] FrameNormalizerConfig config() const

Defined in src/vision/include/icy/vision/framenormalizer.h:58


{#stats-1}

stats

const nodiscard

[[nodiscard]] FrameNormalizerStats stats() const

Defined in src/vision/include/icy/vision/framenormalizer.h:59


{#reset-17}

reset

void reset()

Defined in src/vision/include/icy/vision/framenormalizer.h:60


{#process-9}

process

virtual override

virtual void process(IPacket & packet) override

Defined in src/vision/include/icy/vision/framenormalizer.h:62

This method performs processing on the given packet and emits the result.

Processors that defer work asynchronously must either clone the packet or retain an owned equivalent. See retention().

Reimplements

{#accepts-3}

accepts

virtual inline override

virtual inline bool accepts(IPacket *) override

Defined in src/vision/include/icy/vision/framenormalizer.h:63

This method ensures compatibility with the given packet type. Return false to reject the packet.

Reimplements

Private Attributes

ReturnNameDescription
FrameNormalizerConfig_config
std::atomic< uint64_t >_seen
std::atomic< uint64_t >_emitted
std::atomic< uint64_t >_dropped
std::atomic< uint64_t >_converted
std::atomic< uint64_t >_frameId
std::unique_ptr< State >_state

{#_config-1}

_config

FrameNormalizerConfig _config

Defined in src/vision/include/icy/vision/framenormalizer.h:76


{#_seen-1}

_seen

std::atomic< uint64_t > _seen {0}

Defined in src/vision/include/icy/vision/framenormalizer.h:77


{#_emitted-1}

_emitted

std::atomic< uint64_t > _emitted {0}

Defined in src/vision/include/icy/vision/framenormalizer.h:78


{#_dropped}

_dropped

std::atomic< uint64_t > _dropped {0}

Defined in src/vision/include/icy/vision/framenormalizer.h:79


{#_converted}

_converted

std::atomic< uint64_t > _converted {0}

Defined in src/vision/include/icy/vision/framenormalizer.h:80


{#_frameid}

_frameId

std::atomic< uint64_t > _frameId {0}

Defined in src/vision/include/icy/vision/framenormalizer.h:81


{#_state-3}

_state

std::unique_ptr< State > _state

Defined in src/vision/include/icy/vision/framenormalizer.h:82

Private Methods

ReturnNameDescription
VisionFramePacketnormalize nodiscard

{#normalize-1}

normalize

nodiscard

[[nodiscard]] VisionFramePacket normalize(const av::PlanarVideoPacket & packet)

Defined in src/vision/include/icy/vision/framenormalizer.h:74

Private Static Methods

ReturnNameDescription
FrameNormalizerConfigsanitize static

{#sanitize-1}

sanitize

static

static FrameNormalizerConfig sanitize(FrameNormalizerConfig config)

Defined in src/vision/include/icy/vision/framenormalizer.h:72

{#framesampler}

FrameSampler

#include <icy/vision/framesampler.h>
class FrameSampler

Defined in src/vision/include/icy/vision/framesampler.h:49

Inherits: PacketProcessor

PacketProcessor that forwards a sampled subset of decoded video frames.

The sampler is intentionally zero-copy on its synchronous path: sampled frames are forwarded by reference and dropped frames are discarded before any queue hop. Pair it with DetectionQueue when a worker-thread boundary is required.

List of all members

NameKindOwner
emittervariableDeclared here
FrameSamplerfunctionDeclared here
setConfigfunctionDeclared here
configfunctionDeclared here
statsfunctionDeclared here
resetfunctionDeclared here
processfunctionDeclared here
acceptsfunctionDeclared here
_configvariableDeclared here
_seenvariableDeclared here
_forwardedvariableDeclared here
_droppedvariableDeclared here
_lastForwardedTimeUsecvariableDeclared here
shouldForwardfunctionDeclared here
kUnsetTimeUsecvariableDeclared here
sanitizefunctionDeclared here
PacketProcessorfunctionInherited from PacketProcessor
processfunctionInherited from PacketProcessor
acceptsfunctionInherited from PacketProcessor
operator<<functionInherited from PacketProcessor
_emittervariableInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
~PacketStreamAdapterfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
getEmitterfunctionInherited from PacketStreamAdapter
retentionfunctionInherited from PacketStreamAdapter
onStreamStateChangefunctionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter

Inherited from PacketProcessor

KindNameDescription
functionPacketProcessor inline
functionprocess virtualThis method performs processing on the given packet and emits the result.
functionaccepts virtual inlineThis method ensures compatibility with the given packet type. Return false to reject the packet.
functionoperator<< virtual inlineStream operator alias for process().

Inherited from PacketStreamAdapter

KindNameDescription
variable_emitter
functionPacketStreamAdapterConstruct the adapter, binding it to the given packet signal.
function~PacketStreamAdapter virtual inline
functionemit virtualEmit a mutable raw buffer as a packet.
functionemit virtualEmit a read-only raw buffer as a packet (data is copied internally).
functionemit virtualEmit a string as a packet (data is copied internally).
functionemit virtualEmit a flag-only packet carrying no payload data.
functionemit virtualEmit an existing packet directly onto the outgoing signal.
functiongetEmitterReturns a reference to the outgoing packet signal.
functionretention virtual const nodiscardReturns how this adapter treats incoming packet lifetime. Most adapters are synchronous and therefore only borrow the packet for the current call chain. Queue-style adapters override this to advertise that they clone before deferred use. Callers may treat the first adapter reporting Cloned or Retained as the explicit ownership boundary in the stream graph.
functiononStreamStateChange virtual inlineCalled by the PacketStream to notify when the internal Stream state changes. On receiving the Stopped state, it is the responsibility of the adapter to have ceased all outgoing packet transmission, especially in multi-thread scenarios.
functionPacketStreamAdapterNonCopyable and NonMovable.
functionoperator=Deleted assignment operator.
functionPacketStreamAdapterDeleted constructor.
functionoperator=Deleted assignment operator.

Public Attributes

ReturnNameDescription
PacketSignalemitter

{#emitter-9}

emitter

PacketSignal emitter

Defined in src/vision/include/icy/vision/framesampler.h:52

Public Methods

ReturnNameDescription
FrameSampler inline explicit
voidsetConfig inline
FrameSamplerConfigconfig const inline nodiscard
FrameSamplerStatsstats const inline nodiscard
voidreset inline
voidprocess virtual inline overrideThis method performs processing on the given packet and emits the result.
boolaccepts virtual inline overrideThis method ensures compatibility with the given packet type. Return false to reject the packet.

{#framesampler-1}

FrameSampler

inline explicit

inline explicit FrameSampler(FrameSamplerConfig config = {})

Defined in src/vision/include/icy/vision/framesampler.h:54


{#setconfig-2}

setConfig

inline

inline void setConfig(FrameSamplerConfig config)

Defined in src/vision/include/icy/vision/framesampler.h:60


{#config-2}

config

const inline nodiscard

[[nodiscard]] inline FrameSamplerConfig config() const

Defined in src/vision/include/icy/vision/framesampler.h:66


{#stats-2}

stats

const inline nodiscard

[[nodiscard]] inline FrameSamplerStats stats() const

Defined in src/vision/include/icy/vision/framesampler.h:71


{#reset-18}

reset

inline

inline void reset()

Defined in src/vision/include/icy/vision/framesampler.h:80


{#process-10}

process

virtual inline override

virtual inline void process(IPacket & packet) override

Defined in src/vision/include/icy/vision/framesampler.h:88

This method performs processing on the given packet and emits the result.

Processors that defer work asynchronously must either clone the packet or retain an owned equivalent. See retention().

Reimplements

{#accepts-4}

accepts

virtual inline override

virtual inline bool accepts(IPacket *) override

Defined in src/vision/include/icy/vision/framesampler.h:107

This method ensures compatibility with the given packet type. Return false to reject the packet.

Reimplements

Private Attributes

ReturnNameDescription
FrameSamplerConfig_config
std::atomic< uint64_t >_seen
std::atomic< uint64_t >_forwarded
std::atomic< uint64_t >_dropped
std::atomic< int64_t >_lastForwardedTimeUsec

{#_config-2}

_config

FrameSamplerConfig _config

Defined in src/vision/include/icy/vision/framesampler.h:141


{#_seen-2}

_seen

std::atomic< uint64_t > _seen {0}

Defined in src/vision/include/icy/vision/framesampler.h:142


{#_forwarded}

_forwarded

std::atomic< uint64_t > _forwarded {0}

Defined in src/vision/include/icy/vision/framesampler.h:143


{#_dropped-1}

_dropped

std::atomic< uint64_t > _dropped {0}

Defined in src/vision/include/icy/vision/framesampler.h:144


{#_lastforwardedtimeusec}

_lastForwardedTimeUsec

std::atomic< int64_t > _lastForwardedTimeUsec {kUnsetTimeUsec}

Defined in src/vision/include/icy/vision/framesampler.h:145

Private Methods

ReturnNameDescription
boolshouldForward const inline

{#shouldforward}

shouldForward

const inline

inline bool shouldForward(const av::PlanarVideoPacket & frame, uint64_t seen) const

Defined in src/vision/include/icy/vision/framesampler.h:124

Private Static Attributes

ReturnNameDescription
int64_tkUnsetTimeUsec static constexpr

{#kunsettimeusec}

kUnsetTimeUsec

static constexpr

int64_t kUnsetTimeUsec = std::numeric_limits<int64_t>::min()

Defined in src/vision/include/icy/vision/framesampler.h:115

Private Static Methods

ReturnNameDescription
FrameSamplerConfigsanitize static inline

{#sanitize-2}

sanitize

static inline

static inline FrameSamplerConfig sanitize(FrameSamplerConfig config)

Defined in src/vision/include/icy/vision/framesampler.h:117

{#motiondetector}

MotionDetector

#include <icy/vision/motiondetector.h>
class MotionDetector

Defined in src/vision/include/icy/vision/motiondetector.h:49

Inherits: Detector

List of all members

NameKindOwner
MotionDetectorfunctionDeclared here
setConfigfunctionDeclared here
configfunctionDeclared here
statsfunctionDeclared here
resetfunctionDeclared here
processfunctionDeclared here
_configvariableDeclared here
_seenvariableDeclared here
_emittedvariableDeclared here
_warmedFramesvariableDeclared here
_widthvariableDeclared here
_heightvariableDeclared here
_lastEventTimeUsecvariableDeclared here
_lastScorevariableDeclared here
_previousGridvariableDeclared here
_currentGridvariableDeclared here
sampleLumaGridfunctionDeclared here
diffScorefunctionDeclared here
emitEventfunctionDeclared here
sanitizefunctionDeclared here
EventvariableInherited from Detector
resetfunctionInherited from Detector
processfunctionInherited from Detector

Inherited from Detector

KindNameDescription
variableEvent
functionreset virtual
functionprocess virtual

Public Methods

ReturnNameDescription
MotionDetector explicit
voidsetConfig
MotionDetectorConfigconfig const nodiscard
MotionDetectorStatsstats const nodiscard
voidreset virtual override
voidprocess virtual override

{#motiondetector-1}

MotionDetector

explicit

explicit MotionDetector(MotionDetectorConfig config = {})

Defined in src/vision/include/icy/vision/motiondetector.h:52


{#setconfig-3}

setConfig

void setConfig(MotionDetectorConfig config)

Defined in src/vision/include/icy/vision/motiondetector.h:54


{#config-3}

config

const nodiscard

[[nodiscard]] MotionDetectorConfig config() const

Defined in src/vision/include/icy/vision/motiondetector.h:55


{#stats-3}

stats

const nodiscard

[[nodiscard]] MotionDetectorStats stats() const

Defined in src/vision/include/icy/vision/motiondetector.h:56


{#reset-19}

reset

virtual override

virtual void reset() override

Defined in src/vision/include/icy/vision/motiondetector.h:57

Reimplements

{#process-11}

process

virtual override

virtual void process(const VisionFramePacket & packet) override

Defined in src/vision/include/icy/vision/motiondetector.h:59

Reimplements

Private Attributes

ReturnNameDescription
MotionDetectorConfig_config
uint64_t_seen
uint64_t_emitted
uint32_t_warmedFrames
int_width
int_height
int64_t_lastEventTimeUsec
float_lastScore
std::vector< uint8_t >_previousGrid
std::vector< uint8_t >_currentGrid

{#_config-3}

_config

MotionDetectorConfig _config

Defined in src/vision/include/icy/vision/motiondetector.h:67


{#_seen-3}

_seen

uint64_t _seen = 0

Defined in src/vision/include/icy/vision/motiondetector.h:68


{#_emitted-2}

_emitted

uint64_t _emitted = 0

Defined in src/vision/include/icy/vision/motiondetector.h:69


{#_warmedframes}

_warmedFrames

uint32_t _warmedFrames = 0

Defined in src/vision/include/icy/vision/motiondetector.h:70


{#_width}

_width

int _width = 0

Defined in src/vision/include/icy/vision/motiondetector.h:71


{#_height}

_height

int _height = 0

Defined in src/vision/include/icy/vision/motiondetector.h:72


{#_lasteventtimeusec}

_lastEventTimeUsec

int64_t _lastEventTimeUsec = 0

Defined in src/vision/include/icy/vision/motiondetector.h:73


{#_lastscore}

_lastScore

float _lastScore = 0.0f

Defined in src/vision/include/icy/vision/motiondetector.h:74


{#_previousgrid}

_previousGrid

std::vector< uint8_t > _previousGrid

Defined in src/vision/include/icy/vision/motiondetector.h:75


{#_currentgrid}

_currentGrid

std::vector< uint8_t > _currentGrid

Defined in src/vision/include/icy/vision/motiondetector.h:76

Private Methods

ReturnNameDescription
voidsampleLumaGrid const
floatdiffScore const
voidemitEvent

{#samplelumagrid}

sampleLumaGrid

const

void sampleLumaGrid(const VisionFramePacket & packet, std::vector< uint8_t > & out) const

Defined in src/vision/include/icy/vision/motiondetector.h:63


{#diffscore}

diffScore

const

float diffScore(const std::vector< uint8_t > & current) const

Defined in src/vision/include/icy/vision/motiondetector.h:64


{#emitevent-1}

emitEvent

void emitEvent(const VisionFramePacket & packet, float score)

Defined in src/vision/include/icy/vision/motiondetector.h:65

Private Static Methods

ReturnNameDescription
MotionDetectorConfigsanitize static

{#sanitize-3}

sanitize

static

static MotionDetectorConfig sanitize(MotionDetectorConfig config)

Defined in src/vision/include/icy/vision/motiondetector.h:62

{#visioneventemitter}

VisionEventEmitter

#include <icy/vision/eventemitter.h>
class VisionEventEmitter

Defined in src/vision/include/icy/vision/eventemitter.h:29

List of all members

NameKindOwner
EventvariableDeclared here
emitfunctionDeclared here

Public Attributes

ReturnNameDescription
VisionEventSignalEvent

{#event-7}

Event

VisionEventSignal Event

Defined in src/vision/include/icy/vision/eventemitter.h:32

Public Methods

ReturnNameDescription
voidemit inline

{#emit-1}

emit

inline

inline void emit(const VisionEvent & event)

Defined in src/vision/include/icy/vision/eventemitter.h:34

{#detection}

Detection

#include <icy/vision/types.h>
struct Detection

Defined in src/vision/include/icy/vision/types.h:52

List of all members

NameKindOwner
labelvariableDeclared here
confidencevariableDeclared here
trackIdvariableDeclared here
regionvariableDeclared here
datavariableDeclared here

Public Attributes

ReturnNameDescription
std::stringlabel
floatconfidence
int64_ttrackId
Regionregion
json::Valuedata

{#label-1}

label

std::string label

Defined in src/vision/include/icy/vision/types.h:54


{#confidence}

confidence

float confidence = 0.0f

Defined in src/vision/include/icy/vision/types.h:55


{#trackid}

trackId

int64_t trackId = -1

Defined in src/vision/include/icy/vision/types.h:56


{#region}

region

Region region

Defined in src/vision/include/icy/vision/types.h:57


{#data-7}

data

json::Value data = json::Value::object()

Defined in src/vision/include/icy/vision/types.h:58

{#framenormalizerconfig}

FrameNormalizerConfig

#include <icy/vision/framenormalizer.h>
struct FrameNormalizerConfig

Defined in src/vision/include/icy/vision/framenormalizer.h:29

List of all members

NameKindOwner
sourceIdvariableDeclared here
streamIdvariableDeclared here
widthvariableDeclared here
heightvariableDeclared here
pixelFmtvariableDeclared here

Public Attributes

ReturnNameDescription
std::stringsourceId
std::stringstreamId
intwidth
intheight
std::stringpixelFmt

{#sourceid}

sourceId

std::string sourceId

Defined in src/vision/include/icy/vision/framenormalizer.h:31


{#streamid}

streamId

std::string streamId

Defined in src/vision/include/icy/vision/framenormalizer.h:32


{#width-3}

width

int width = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:33


{#height-3}

height

int height = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:34


{#pixelfmt-2}

pixelFmt

std::string pixelFmt

Defined in src/vision/include/icy/vision/framenormalizer.h:35

{#framenormalizerstats}

FrameNormalizerStats

#include <icy/vision/framenormalizer.h>
struct FrameNormalizerStats

Defined in src/vision/include/icy/vision/framenormalizer.h:39

List of all members

NameKindOwner
seenvariableDeclared here
emittedvariableDeclared here
droppedvariableDeclared here
convertedvariableDeclared here

Public Attributes

ReturnNameDescription
uint64_tseen
uint64_temitted
uint64_tdropped
uint64_tconverted

{#seen-1}

seen

uint64_t seen = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:41


{#emitted-1}

emitted

uint64_t emitted = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:42


{#dropped}

dropped

uint64_t dropped = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:43


{#converted}

converted

uint64_t converted = 0

Defined in src/vision/include/icy/vision/framenormalizer.h:44

{#framesamplerconfig}

FrameSamplerConfig

#include <icy/vision/framesampler.h>
struct FrameSamplerConfig

Defined in src/vision/include/icy/vision/framesampler.h:28

List of all members

NameKindOwner
everyNthFramevariableDeclared here
minIntervalUsecvariableDeclared here

Public Attributes

ReturnNameDescription
uint32_teveryNthFrame
int64_tminIntervalUsec

{#everynthframe}

everyNthFrame

uint32_t everyNthFrame = 1

Defined in src/vision/include/icy/vision/framesampler.h:30


{#minintervalusec}

minIntervalUsec

int64_t minIntervalUsec = 0

Defined in src/vision/include/icy/vision/framesampler.h:31

{#framesamplerstats}

FrameSamplerStats

#include <icy/vision/framesampler.h>
struct FrameSamplerStats

Defined in src/vision/include/icy/vision/framesampler.h:35

List of all members

NameKindOwner
seenvariableDeclared here
forwardedvariableDeclared here
droppedvariableDeclared here

Public Attributes

ReturnNameDescription
uint64_tseen
uint64_tforwarded
uint64_tdropped

{#seen-2}

seen

uint64_t seen = 0

Defined in src/vision/include/icy/vision/framesampler.h:37


{#forwarded}

forwarded

uint64_t forwarded = 0

Defined in src/vision/include/icy/vision/framesampler.h:38


{#dropped-1}

dropped

uint64_t dropped = 0

Defined in src/vision/include/icy/vision/framesampler.h:39

{#motiondetectorconfig}

MotionDetectorConfig

#include <icy/vision/motiondetector.h>
struct MotionDetectorConfig

Defined in src/vision/include/icy/vision/motiondetector.h:28

List of all members

NameKindOwner
sourcevariableDeclared here
streamIdvariableDeclared here
detectorNamevariableDeclared here
gridWidthvariableDeclared here
gridHeightvariableDeclared here
warmupFramesvariableDeclared here
thresholdvariableDeclared here
minEventIntervalUsecvariableDeclared here

Public Attributes

ReturnNameDescription
std::stringsource
std::stringstreamId
std::stringdetectorName
uint32_tgridWidth
uint32_tgridHeight
uint32_twarmupFrames
floatthreshold
int64_tminEventIntervalUsec

{#source-2}

source

std::string source

Defined in src/vision/include/icy/vision/motiondetector.h:30


{#streamid-1}

streamId

std::string streamId

Defined in src/vision/include/icy/vision/motiondetector.h:31


{#detectorname-1}

detectorName

std::string detectorName = "motion"

Defined in src/vision/include/icy/vision/motiondetector.h:32


{#gridwidth}

gridWidth

uint32_t gridWidth = 32

Defined in src/vision/include/icy/vision/motiondetector.h:33


{#gridheight}

gridHeight

uint32_t gridHeight = 18

Defined in src/vision/include/icy/vision/motiondetector.h:34


{#warmupframes}

warmupFrames

uint32_t warmupFrames = 2

Defined in src/vision/include/icy/vision/motiondetector.h:35


{#threshold}

threshold

float threshold = 0.08f

Defined in src/vision/include/icy/vision/motiondetector.h:36


{#mineventintervalusec}

minEventIntervalUsec

int64_t minEventIntervalUsec = 500000

Defined in src/vision/include/icy/vision/motiondetector.h:37

{#motiondetectorstats}

MotionDetectorStats

#include <icy/vision/motiondetector.h>
struct MotionDetectorStats

Defined in src/vision/include/icy/vision/motiondetector.h:41

List of all members

NameKindOwner
seenvariableDeclared here
emittedvariableDeclared here
lastScorevariableDeclared here

Public Attributes

ReturnNameDescription
uint64_tseen
uint64_temitted
floatlastScore

{#seen-3}

seen

uint64_t seen = 0

Defined in src/vision/include/icy/vision/motiondetector.h:43


{#emitted-2}

emitted

uint64_t emitted = 0

Defined in src/vision/include/icy/vision/motiondetector.h:44


{#lastscore}

lastScore

float lastScore = 0.0f

Defined in src/vision/include/icy/vision/motiondetector.h:45

{#region-1}

Region

#include <icy/vision/types.h>
struct Region

Defined in src/vision/include/icy/vision/types.h:43

List of all members

NameKindOwner
xvariableDeclared here
yvariableDeclared here
widthvariableDeclared here
heightvariableDeclared here

Public Attributes

ReturnNameDescription
floatx
floaty
floatwidth
floatheight

{#x}

x

float x = 0.0f

Defined in src/vision/include/icy/vision/types.h:45


{#y}

y

float y = 0.0f

Defined in src/vision/include/icy/vision/types.h:46


{#width-4}

width

float width = 0.0f

Defined in src/vision/include/icy/vision/types.h:47


{#height-4}

height

float height = 0.0f

Defined in src/vision/include/icy/vision/types.h:48

{#track}

Track

#include <icy/vision/types.h>
struct Track

Defined in src/vision/include/icy/vision/types.h:62

List of all members

NameKindOwner
trackIdvariableDeclared here
labelvariableDeclared here
confidencevariableDeclared here
regionvariableDeclared here
datavariableDeclared here

Public Attributes

ReturnNameDescription
int64_ttrackId
std::stringlabel
floatconfidence
Regionregion
json::Valuedata

{#trackid-1}

trackId

int64_t trackId = -1

Defined in src/vision/include/icy/vision/types.h:64


{#label-2}

label

std::string label

Defined in src/vision/include/icy/vision/types.h:65


{#confidence-1}

confidence

float confidence = 0.0f

Defined in src/vision/include/icy/vision/types.h:66


{#region-2}

region

Region region

Defined in src/vision/include/icy/vision/types.h:67


{#data-8}

data

json::Value data = json::Value::object()

Defined in src/vision/include/icy/vision/types.h:68

{#visionevent}

VisionEvent

#include <icy/vision/event.h>
struct VisionEvent

Defined in src/vision/include/icy/vision/event.h:30

List of all members

NameKindOwner
schemavariableDeclared here
typevariableDeclared here
sourcevariableDeclared here
detectorvariableDeclared here
emittedAtUsecvariableDeclared here
framevariableDeclared here
detectionsvariableDeclared here
tracksvariableDeclared here
datavariableDeclared here

Public Attributes

ReturnNameDescription
std::stringschema
std::stringtype
std::stringsource
std::stringdetector
int64_temittedAtUsec
VisionFrameContextframe
std::vector< Detection >detections
std::vector< Track >tracks
json::Valuedata

{#schema}

schema

std::string schema = "vision.event.v1"

Defined in src/vision/include/icy/vision/event.h:32


{#type-24}

type

std::string type = "detect"

Defined in src/vision/include/icy/vision/event.h:33


{#source-3}

source

std::string source

Defined in src/vision/include/icy/vision/event.h:34


{#detector-2}

detector

std::string detector

Defined in src/vision/include/icy/vision/event.h:35


{#emittedatusec-1}

emittedAtUsec

int64_t emittedAtUsec = 0

Defined in src/vision/include/icy/vision/event.h:36


{#frame-2}

frame

VisionFrameContext frame

Defined in src/vision/include/icy/vision/event.h:37


{#detections}

detections

std::vector< Detection > detections

Defined in src/vision/include/icy/vision/event.h:38


{#tracks}

tracks

std::vector< Track > tracks

Defined in src/vision/include/icy/vision/event.h:39


{#data-9}

data

json::Value data = json::Value::object()

Defined in src/vision/include/icy/vision/event.h:40

{#visionframecontext}

VisionFrameContext

#include <icy/vision/types.h>
struct VisionFrameContext

Defined in src/vision/include/icy/vision/types.h:26

List of all members

NameKindOwner
sourceIdvariableDeclared here
streamIdvariableDeclared here
frameIdvariableDeclared here
ptsUsecvariableDeclared here
receivedAtUsecvariableDeclared here
widthvariableDeclared here
heightvariableDeclared here
pixelFmtvariableDeclared here
keyframevariableDeclared here

Public Attributes

ReturnNameDescription
std::stringsourceId
std::stringstreamId
uint64_tframeId
int64_tptsUsec
int64_treceivedAtUsec
intwidth
intheight
std::stringpixelFmt
boolkeyframe

{#sourceid-1}

sourceId

std::string sourceId

Defined in src/vision/include/icy/vision/types.h:28


{#streamid-2}

streamId

std::string streamId

Defined in src/vision/include/icy/vision/types.h:29


{#frameid}

frameId

uint64_t frameId = 0

Defined in src/vision/include/icy/vision/types.h:30


{#ptsusec}

ptsUsec

int64_t ptsUsec = 0

Defined in src/vision/include/icy/vision/types.h:31


{#receivedatusec}

receivedAtUsec

int64_t receivedAtUsec = 0

Defined in src/vision/include/icy/vision/types.h:32


{#width-5}

width

int width = 0

Defined in src/vision/include/icy/vision/types.h:33


{#height-5}

height

int height = 0

Defined in src/vision/include/icy/vision/types.h:34


{#pixelfmt-3}

pixelFmt

std::string pixelFmt

Defined in src/vision/include/icy/vision/types.h:35


{#keyframe}

keyframe

bool keyframe = false

Defined in src/vision/include/icy/vision/types.h:36

{#visionframepacket}

VisionFramePacket

#include <icy/vision/framepacket.h>
struct VisionFramePacket

Defined in src/vision/include/icy/vision/framepacket.h:25

Inherits: PlanarVideoPacket

Owned detector-ready frame buffer carrying stable frame metadata.

List of all members

NameKindOwner
contextvariableDeclared here
VisionFramePacketfunctionDeclared here
VisionFramePacketfunctionDeclared here
VisionFramePacketfunctionDeclared here
clonefunctionDeclared here
classNamefunctionDeclared here
validfunctionDeclared here
buffervariableInherited from PlanarVideoPacket
linesizevariableInherited from PlanarVideoPacket
pixelFmtvariableInherited from PlanarVideoPacket
owns_buffervariableInherited from PlanarVideoPacket
avframevariableInherited from PlanarVideoPacket
PlanarVideoPacketfunctionInherited from PlanarVideoPacket
PlanarVideoPacketfunctionInherited from PlanarVideoPacket
clonefunctionInherited from PlanarVideoPacket
classNamefunctionInherited from PlanarVideoPacket
widthvariableInherited from VideoPacket
heightvariableInherited from VideoPacket
iframevariableInherited from VideoPacket
avpacketvariableInherited from VideoPacket
VideoPacketfunctionInherited from VideoPacket
VideoPacketfunctionInherited from VideoPacket
clonefunctionInherited from VideoPacket
classNamefunctionInherited from VideoPacket
timevariableInherited from MediaPacket
MediaPacketfunctionInherited from MediaPacket
MediaPacketfunctionInherited from MediaPacket
MediaPacketfunctionInherited from MediaPacket
clonefunctionInherited from MediaPacket
classNamefunctionInherited from MediaPacket
_datavariableInherited from RawPacket
_sizevariableInherited from RawPacket
_ownedvariableInherited from RawPacket
RawPacketfunctionInherited from RawPacket
RawPacketfunctionInherited from RawPacket
RawPacketfunctionInherited from RawPacket
~RawPacketfunctionInherited from RawPacket
clonefunctionInherited from RawPacket
copyDatafunctionInherited from RawPacket
readfunctionInherited from RawPacket
writefunctionInherited from RawPacket
datafunctionInherited from RawPacket
sizefunctionInherited from RawPacket
classNamefunctionInherited from RawPacket
ownsBufferfunctionInherited from RawPacket
opaquevariableInherited from IPacket
infovariableInherited from IPacket
flagsvariableInherited from IPacket
IPacketfunctionInherited from IPacket
IPacketfunctionInherited from IPacket
operator=functionInherited from IPacket
clonefunctionInherited from IPacket
~IPacketfunctionInherited from IPacket
readfunctionInherited from IPacket
writefunctionInherited from IPacket
sizefunctionInherited from IPacket
hasDatafunctionInherited from IPacket
datafunctionInherited from IPacket
constDatafunctionInherited from IPacket
classNamefunctionInherited from IPacket
printfunctionInherited from IPacket
operator<<friendInherited from IPacket

Inherited from PlanarVideoPacket

KindNameDescription
variablebuffer
variablelinesize
variablepixelFmt
variableowns_buffer
variableavframeNon-owning pointer to the decoded AVFrame from FFmpeg. Set by VideoDecoder.
functionPlanarVideoPacketConstruct a planar video packet, copying the plane pointers (not the pixel data).
functionPlanarVideoPacketCopy constructor. Performs a deep copy of the owned buffer if owns_buffer is set.
functionclone virtual const inline override
functionclassName virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.

Inherited from VideoPacket

KindNameDescription
variablewidthFrame width in pixels.
variableheightFrame height in pixels.
variableiframeTrue if this is an intra (keyframe) frame.
variableavpacketNon-owning pointer to the encoded AVPacket from FFmpeg. Set by VideoEncoder, read by MultiplexEncoder.
functionVideoPacket inlineConstruct a video packet with an interleaved buffer.
functionVideoPacket inlineCopy constructor. The avpacket pointer is shallow-copied (non-owning).
functionclone virtual const inline override
functionclassName virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.

Inherited from MediaPacket

KindNameDescription
variabletimePresentation timestamp in microseconds.
functionMediaPacket inlineConstruct with a non-owning or owning mutable buffer.
functionMediaPacket inlineConstruct with const data (copied, owning).
functionMediaPacket inlineCopy constructor.
functionclone virtual const inline override
functionclassName virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.

Inherited from RawPacket

KindNameDescription
variable_data
variable_size
variable_owned
functionRawPacket inlineConstruct with borrowed (non-owning) buffer.
functionRawPacket inlineConstruct with const data (copied, owning).
functionRawPacket inlineCopy constructor (always copies data).
function~RawPacket virtualDefaulted destructor.
functionclone virtual const inline override
functioncopyData virtual inlineCopies data into an internally owned buffer, replacing any prior content.
functionread virtual inline overrideReads from the buffer by copying its contents into an owned buffer.
functionwrite virtual const inline overrideAppends the packet data to the given output buffer.
functiondata virtual const inline override
functionsize virtual const inline override
functionclassName virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.
functionownsBuffer const inline

Inherited from IPacket

KindNameDescription
variableopaqueOptional type-safe context data. Use std::any_cast to retrieve. Lifetime of the stored value is tied to the packet's lifetime.
variableinfoOptional extra information about the packet.
variableflagsProvides basic information about the packet.
functionIPacket inline
functionIPacket inlineCopy constructor; clones the info object if present.
functionoperator= inlineCopy assignment; clones the info object if present.
functionclone virtual constReturns a heap-allocated deep copy of this packet.
function~IPacket virtualDefaulted destructor.
functionread virtualRead/parse to the packet from the given input buffer. The number of bytes read is returned.
functionwrite virtual constCopy/generate to the packet given output buffer. The number of bytes written can be obtained from the buffer.
functionsize virtual const inlineThe size of the packet in bytes.
functionhasData virtual const inlineReturns true if the packet has a non-null data pointer.
functiondata virtual const inlineThe packet data pointer for buffered packets.
functionconstData virtual const inlineThe const packet data pointer for buffered packets.
functionclassName virtual constReturns the class name of this packet type for logging and diagnostics.
functionprint virtual const inlinePrints a human-readable representation to the given stream.
friendoperator<< inlineStream insertion operator; delegates to print().

Public Attributes

ReturnNameDescription
VisionFrameContextcontext

{#context-5}

context

VisionFrameContext context

Defined in src/vision/include/icy/vision/framepacket.h:27

Public Methods

ReturnNameDescription
VisionFramePacket
VisionFramePacket
VisionFramePacketDeleted constructor.
std::unique_ptr< IPacket >clone virtual const inline override
const char *className virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.
boolvalid const inline nodiscard

{#visionframepacket-1}

VisionFramePacket

VisionFramePacket(const av::PlanarVideoPacket & packet, VisionFrameContext context = {})

Defined in src/vision/include/icy/vision/framepacket.h:29


{#visionframepacket-2}

VisionFramePacket

VisionFramePacket(const VisionFramePacket & that)

Defined in src/vision/include/icy/vision/framepacket.h:31


{#visionframepacket-3}

VisionFramePacket

VisionFramePacket(VisionFramePacket &&) = delete

Defined in src/vision/include/icy/vision/framepacket.h:33

Deleted constructor.


{#clone-19}

clone

virtual const inline override

virtual inline std::unique_ptr< IPacket > clone() const override

Defined in src/vision/include/icy/vision/framepacket.h:37

Returns

A heap-allocated deep copy of this packet.

Reimplements

{#classname-11}

className

virtual const inline override

virtual inline const char * className() const override

Defined in src/vision/include/icy/vision/framepacket.h:42

Returns the class name of this packet type for logging and diagnostics.

Reimplements

{#valid-17}

valid

const inline nodiscard

[[nodiscard]] inline bool valid() const

Defined in src/vision/include/icy/vision/framepacket.h:44