Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::VideoStream Struct Reference

Archetype: Video stream consisting of raw video chunks. More...

#include <rerun/archetypes/video_stream.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 VideoStream (VideoStream &&other)=default
 
 VideoStream (const VideoStream &other)=default
 
VideoStreamoperator= (const VideoStream &other)=default
 
VideoStreamoperator= (VideoStream &&other)=default
 
 VideoStream (rerun::components::VideoSample _sample, rerun::components::VideoCodec _codec)
 
VideoStream with_sample (const rerun::components::VideoSample &_sample) &&
 Video sample data (also known as "video chunk").
 
VideoStream with_many_sample (const Collection< rerun::components::VideoSample > &_sample) &&
 This method makes it possible to pack multiple sample in a single component batch.
 
VideoStream with_codec (const rerun::components::VideoCodec &_codec) &&
 The codec used to encode the video chunks.
 
VideoStream with_many_codec (const Collection< rerun::components::VideoCodec > &_codec) &&
 This method makes it possible to pack multiple codec in a single component batch.
 
VideoStream with_draw_order (const rerun::components::DrawOrder &_draw_order) &&
 An optional floating point value that specifies the 2D drawing order.
 
VideoStream with_many_draw_order (const Collection< rerun::components::DrawOrder > &_draw_order) &&
 This method makes it possible to pack multiple draw_order in a single component batch.
 
Collection< ComponentColumncolumns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumncolumns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static VideoStream update_fields ()
 Update only some specific fields of a VideoStream.
 
static VideoStream clear_fields ()
 Clear all the fields of a VideoStream.
 

Public Attributes

std::optional< ComponentBatchsample
 Video sample data (also known as "video chunk").
 
std::optional< ComponentBatchcodec
 The codec used to encode the video chunks.
 
std::optional< ComponentBatchdraw_order
 An optional floating point value that specifies the 2D drawing order.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 
static constexpr const char ArchetypeName [] = "rerun.archetypes.VideoStream"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_sample
 ComponentDescriptor for the sample field.
 
static constexpr auto Descriptor_codec
 ComponentDescriptor for the codec field.
 
static constexpr auto Descriptor_draw_order
 ComponentDescriptor for the draw_order field.
 

Detailed Description

Archetype: Video stream consisting of raw video chunks.

For logging video containers like mp4, refer to archetypes::AssetVideo and archetypes::VideoFrameReference. To learn more about video support in Rerun, check the video reference.

All components except sample are typically logged statically once per entity. sample is then logged repeatedly for each frame on the timeline.

TODO(#7484): Add snippet.

This type is unstable and may change significantly in a way that the data won't be backwards compatible.

Member Function Documentation

◆ with_sample()

VideoStream rerun::archetypes::VideoStream::with_sample ( const rerun::components::VideoSample _sample) &&
inline

Video sample data (also known as "video chunk").

The current timestamp is used as presentation timestamp (PTS) for all data in this sample. There is currently no way to log differing decoding timestamps, meaning that there is no support for B-frames. See https://github.com/rerun-io/rerun/issues/10090 for more details.

Unlike any other data in Rerun, video samples are not allowed to be logged out of order, as this may break live video playback. I.e. any appended sample should have a timestamp greater than all previously logged samples.

The samples are expected to be encoded using the codec field. Each video sample must contain enough data for exactly one video frame (this restriction may be relaxed in the future for some codecs).

See components::VideoCodec for codec specific requirements.

◆ with_many_sample()

VideoStream rerun::archetypes::VideoStream::with_many_sample ( const Collection< rerun::components::VideoSample > &  _sample) &&
inline

This method makes it possible to pack multiple sample in a single component batch.

This only makes sense when used in conjunction with columns. with_sample should be used when logging a single row's worth of data.

◆ with_codec()

VideoStream rerun::archetypes::VideoStream::with_codec ( const rerun::components::VideoCodec _codec) &&
inline

The codec used to encode the video chunks.

This property is expected to be constant over time and is ideally logged statically once per stream.

◆ with_many_codec()

VideoStream rerun::archetypes::VideoStream::with_many_codec ( const Collection< rerun::components::VideoCodec > &  _codec) &&
inline

This method makes it possible to pack multiple codec in a single component batch.

This only makes sense when used in conjunction with columns. with_codec should be used when logging a single row's worth of data.

◆ with_draw_order()

VideoStream rerun::archetypes::VideoStream::with_draw_order ( const rerun::components::DrawOrder _draw_order) &&
inline

An optional floating point value that specifies the 2D drawing order.

Objects with higher values are drawn on top of those with lower values. Defaults to -15.0.

◆ with_many_draw_order()

VideoStream rerun::archetypes::VideoStream::with_many_draw_order ( const Collection< rerun::components::DrawOrder > &  _draw_order) &&
inline

This method makes it possible to pack multiple draw_order in a single component batch.

This only makes sense when used in conjunction with columns. with_draw_order should be used when logging a single row's worth of data.

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::VideoStream::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.

This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.

The specified lengths must sum to the total length of the component batch.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::archetypes::VideoStream::columns ( )

Partitions the component data into unit-length sub-batches.

This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.

Member Data Documentation

◆ sample

std::optional<ComponentBatch> rerun::archetypes::VideoStream::sample

Video sample data (also known as "video chunk").

The current timestamp is used as presentation timestamp (PTS) for all data in this sample. There is currently no way to log differing decoding timestamps, meaning that there is no support for B-frames. See https://github.com/rerun-io/rerun/issues/10090 for more details.

Unlike any other data in Rerun, video samples are not allowed to be logged out of order, as this may break live video playback. I.e. any appended sample should have a timestamp greater than all previously logged samples.

The samples are expected to be encoded using the codec field. Each video sample must contain enough data for exactly one video frame (this restriction may be relaxed in the future for some codecs).

See components::VideoCodec for codec specific requirements.

◆ codec

std::optional<ComponentBatch> rerun::archetypes::VideoStream::codec

The codec used to encode the video chunks.

This property is expected to be constant over time and is ideally logged statically once per stream.

◆ draw_order

std::optional<ComponentBatch> rerun::archetypes::VideoStream::draw_order

An optional floating point value that specifies the 2D drawing order.

Objects with higher values are drawn on top of those with lower values. Defaults to -15.0.

◆ IndicatorComponentName

constexpr const char rerun::archetypes::VideoStream::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.components.VideoStreamIndicator"

◆ Descriptor_sample

constexpr auto rerun::archetypes::VideoStream::Descriptor_sample
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "sample",
Loggable<rerun::components::VideoSample>::Descriptor.component_name
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition video_stream.hpp:70

ComponentDescriptor for the sample field.

◆ Descriptor_codec

constexpr auto rerun::archetypes::VideoStream::Descriptor_codec
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "codec",
Loggable<rerun::components::VideoCodec>::Descriptor.component_name
)

ComponentDescriptor for the codec field.

◆ Descriptor_draw_order

constexpr auto rerun::archetypes::VideoStream::Descriptor_draw_order
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "draw_order",
Loggable<rerun::components::DrawOrder>::Descriptor.component_name
)

ComponentDescriptor for the draw_order field.


The documentation for this struct was generated from the following file: