|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Zero-copy typed view over one frame of container storage. More...
#include <NDData.hpp>
Collaboration diagram for MayaFlux::Kakshya::FrameView:Public Member Functions | |
| template<DataVariantElement T> | |
| std::span< const T > | as () const |
| Return a typed span over the frame data without conversion. | |
| std::type_index | element_type () const |
| Runtime query for the native element type of this frame. | |
| bool | empty () const |
| Returns true if the view holds no elements. | |
| FrameView ()=default | |
| Construct an empty FrameView. | |
| FrameView (DataSpanVariant span) | |
| Construct from a DataSpanVariant produced by get_frame_span_impl(). | |
| const DataSpanVariant & | raw () const |
| Direct access to the underlying DataSpanVariant for internal use. | |
| size_t | size () const |
| Number of elements in the frame, in units of the native element type. | |
Private Attributes | |
| DataSpanVariant | m_span |
Zero-copy typed view over one frame of container storage.
FrameView is the return type of NDDataContainer::get_frame(). It holds a DataSpanVariant — a span into the container's live storage — without copying or converting data. The active span alternative matches the container's native element type: uint8_t for 8-bit image and video, uint16_t for 16-bit image, float for HDR image, double for audio.
Callers retrieve typed data via as(), which returns an empty span on type mismatch rather than throwing. element_type() provides a runtime query for callers whose branch depends on the native type.
Definition at line 621 of file NDData.hpp.